@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.22 → 2.2.0-next.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements-manifest.config.mjs +2 -1
- package/custom-elements.json +312 -17
- package/llms/components/obc-accordion-card.md +141 -0
- package/llms/components/obc-accordion-item.md +90 -0
- package/llms/components/obc-advice-button.md +87 -0
- package/llms/components/obc-advice-floating-item.md +113 -0
- package/llms/components/obc-advice-menu-item.md +87 -0
- package/llms/components/obc-advice-message-item.md +138 -0
- package/llms/components/obc-alert-button-item.md +117 -0
- package/llms/components/obc-alert-button.md +134 -0
- package/llms/components/obc-alert-counter-item.md +74 -0
- package/llms/components/obc-alert-detail-page.md +45 -0
- package/llms/components/obc-alert-floating-item.md +53 -0
- package/llms/components/obc-alert-frame.md +142 -0
- package/llms/components/obc-alert-icon.md +79 -0
- package/llms/components/obc-alert-list-details-experimental.md +89 -0
- package/llms/components/obc-alert-list-details.md +38 -0
- package/llms/components/obc-alert-list-page-small.md +39 -0
- package/llms/components/obc-alert-list.md +37 -0
- package/llms/components/obc-alert-menu-item.md +128 -0
- package/llms/components/obc-alert-menu.md +115 -0
- package/llms/components/obc-alert-subsystem-button.md +88 -0
- package/llms/components/obc-alert-subsystem-counter.md +110 -0
- package/llms/components/obc-analog-threeway-valve.md +106 -0
- package/llms/components/obc-analog-valve.md +74 -0
- package/llms/components/obc-app-button.md +83 -0
- package/llms/components/obc-app-menu.md +69 -0
- package/llms/components/obc-area-graph.md +333 -0
- package/llms/components/obc-attachment-list-item.md +49 -0
- package/llms/components/obc-audio-output.md +59 -0
- package/llms/components/obc-audio-recording-item.md +91 -0
- package/llms/components/obc-automation-badge.md +66 -0
- package/llms/components/obc-automation-button-readout-stack.md +71 -0
- package/llms/components/obc-automation-button.md +86 -0
- package/llms/components/obc-automation-input-modal.md +48 -0
- package/llms/components/obc-automation-readout.md +32 -0
- package/llms/components/obc-automation-tank.md +156 -0
- package/llms/components/obc-azimuth-thruster-labeled.md +56 -0
- package/llms/components/obc-azimuth-thruster.md +80 -0
- package/llms/components/obc-badge-command.md +26 -0
- package/llms/components/obc-badge.md +151 -0
- package/llms/components/obc-bar-horizontal.md +123 -0
- package/llms/components/obc-bar-vertical.md +125 -0
- package/llms/components/obc-battery-icon.md +38 -0
- package/llms/components/obc-bearing-indicator.md +27 -0
- package/llms/components/obc-bipolar-transistor.md +64 -0
- package/llms/components/obc-breadcrumb.md +58 -0
- package/llms/components/obc-brilliance-menu.md +115 -0
- package/llms/components/obc-bus.md +64 -0
- package/llms/components/obc-button.md +110 -0
- package/llms/components/obc-calendar.md +91 -0
- package/llms/components/obc-capacitor.md +64 -0
- package/llms/components/obc-card.md +103 -0
- package/llms/components/obc-chart-object-vessel-button.md +103 -0
- package/llms/components/obc-chat-message.md +35 -0
- package/llms/components/obc-check-button.md +104 -0
- package/llms/components/obc-checkbox-item.md +95 -0
- package/llms/components/obc-checkbox-list.md +73 -0
- package/llms/components/obc-checkbox.md +97 -0
- package/llms/components/obc-circular-progress.md +36 -0
- package/llms/components/obc-clock.md +86 -0
- package/llms/components/obc-command-button.md +56 -0
- package/llms/components/obc-command-menu.md +135 -0
- package/llms/components/obc-communication-table.md +31 -0
- package/llms/components/obc-compass-flat.md +79 -0
- package/llms/components/obc-compass-indicator.md +61 -0
- package/llms/components/obc-compass-sector.md +110 -0
- package/llms/components/obc-compass.md +157 -0
- package/llms/components/obc-context-menu-input.md +191 -0
- package/llms/components/obc-converter.md +64 -0
- package/llms/components/obc-corner-line.md +29 -0
- package/llms/components/obc-current.md +79 -0
- package/llms/components/obc-damper.md +62 -0
- package/llms/components/obc-date-item.md +66 -0
- package/llms/components/obc-depth-actual.md +69 -0
- package/llms/components/obc-depth-indicator.md +31 -0
- package/llms/components/obc-depth-top-band.md +43 -0
- package/llms/components/obc-depth.md +94 -0
- package/llms/components/obc-diagnostic-button.md +71 -0
- package/llms/components/obc-diagnostic-menu.md +88 -0
- package/llms/components/obc-digital-threeway-valve.md +112 -0
- package/llms/components/obc-digital-valve.md +78 -0
- package/llms/components/obc-diodes.md +64 -0
- package/llms/components/obc-direction-line.md +28 -0
- package/llms/components/obc-divider.md +44 -0
- package/llms/components/obc-donut-chart.md +116 -0
- package/llms/components/obc-draft-trim.md +67 -0
- package/llms/components/obc-dropdown-button.md +99 -0
- package/llms/components/obc-electricity-battery.md +83 -0
- package/llms/components/obc-elevated-card-radio-group.md +103 -0
- package/llms/components/obc-elevated-card-radio.md +104 -0
- package/llms/components/obc-elevated-card.md +146 -0
- package/llms/components/obc-end-point-line.md +29 -0
- package/llms/components/obc-event-item.md +47 -0
- package/llms/components/obc-event-list.md +37 -0
- package/llms/components/obc-fan.md +68 -0
- package/llms/components/obc-filter-chip.md +91 -0
- package/llms/components/obc-filter.md +64 -0
- package/llms/components/obc-floating-item.md +125 -0
- package/llms/components/obc-form-container.md +45 -0
- package/llms/components/obc-form-footer-container.md +34 -0
- package/llms/components/obc-form-group.md +80 -0
- package/llms/components/obc-form-item.md +95 -0
- package/llms/components/obc-gauge-bar-indicator.md +46 -0
- package/llms/components/obc-gauge-generator.md +102 -0
- package/llms/components/obc-gauge-horizontal.md +169 -0
- package/llms/components/obc-gauge-motors-and-pumps.md +110 -0
- package/llms/components/obc-gauge-proportional.md +134 -0
- package/llms/components/obc-gauge-radial-indicator.md +76 -0
- package/llms/components/obc-gauge-radial.md +163 -0
- package/llms/components/obc-gauge-trend-indicator.md +53 -0
- package/llms/components/obc-gauge-trend.md +271 -0
- package/llms/components/obc-gauge-valve.md +114 -0
- package/llms/components/obc-gauge-vertical.md +169 -0
- package/llms/components/obc-gnss-skyplot.md +80 -0
- package/llms/components/obc-graph-mini.md +28 -0
- package/llms/components/obc-ground.md +64 -0
- package/llms/components/obc-heading-indicator.md +42 -0
- package/llms/components/obc-heading.md +106 -0
- package/llms/components/obc-heat-exchanger.md +80 -0
- package/llms/components/obc-heat-pump.md +79 -0
- package/llms/components/obc-heave-indicator.md +38 -0
- package/llms/components/obc-heave.md +60 -0
- package/llms/components/obc-horizontal-line.md +29 -0
- package/llms/components/obc-hydraulic-check-valve.md +36 -0
- package/llms/components/obc-hydraulic-separator.md +80 -0
- package/llms/components/obc-hydraulic-valve-4-3.md +71 -0
- package/llms/components/obc-hydraulic-valve-x-2.md +68 -0
- package/llms/components/obc-icon-button.md +117 -0
- package/llms/components/obc-icon-check-button.md +85 -0
- package/llms/components/obc-indicator-battery.md +69 -0
- package/llms/components/obc-indicator-engine.md +39 -0
- package/llms/components/obc-indicator-generator.md +59 -0
- package/llms/components/obc-indicator-graph.md +33 -0
- package/llms/components/obc-indicator-tank-atmospheric.md +69 -0
- package/llms/components/obc-input-chip.md +96 -0
- package/llms/components/obc-instrument-field.md +172 -0
- package/llms/components/obc-instrument-radial.md +77 -0
- package/llms/components/obc-integration-app-bar.md +41 -0
- package/llms/components/obc-integration-bar-dropdown.md +71 -0
- package/llms/components/obc-integration-bar.md +72 -0
- package/llms/components/obc-integration-button.md +62 -0
- package/llms/components/obc-integration-dropdown-button.md +75 -0
- package/llms/components/obc-integration-fleet-button.md +41 -0
- package/llms/components/obc-integration-tabs.md +28 -0
- package/llms/components/obc-integration-vessel-menu.md +58 -0
- package/llms/components/obc-integration-vessel-selector.md +32 -0
- package/llms/components/obc-keyboard-full.md +175 -0
- package/llms/components/obc-keyboard-numeric.md +77 -0
- package/llms/components/obc-line-cross.md +28 -0
- package/llms/components/obc-line-graph.md +164 -0
- package/llms/components/obc-line-overlap.md +28 -0
- package/llms/components/obc-logic.md +64 -0
- package/llms/components/obc-main-engine-indicator.md +55 -0
- package/llms/components/obc-main-engine.md +54 -0
- package/llms/components/obc-menu-button.md +158 -0
- package/llms/components/obc-message-menu-item.md +165 -0
- package/llms/components/obc-modal-window.md +139 -0
- package/llms/components/obc-mosfet.md +64 -0
- package/llms/components/obc-motor.md +73 -0
- package/llms/components/obc-navigation-item-group.md +82 -0
- package/llms/components/obc-navigation-item.md +138 -0
- package/llms/components/obc-navigation-menu.md +135 -0
- package/llms/components/obc-non-return-valve.md +79 -0
- package/llms/components/obc-notification-badge-button.md +87 -0
- package/llms/components/obc-notification-button.md +92 -0
- package/llms/components/obc-notification-floating-item.md +121 -0
- package/llms/components/obc-notification-menu-item.md +87 -0
- package/llms/components/obc-notification-message-item.md +127 -0
- package/llms/components/obc-number-input-field.md +97 -0
- package/llms/components/obc-pagination.md +95 -0
- package/llms/components/obc-pie-chart.md +120 -0
- package/llms/components/obc-pitch-indicator.md +39 -0
- package/llms/components/obc-pitch-roll-heave.md +86 -0
- package/llms/components/obc-pitch-roll-yaw.md +72 -0
- package/llms/components/obc-pitch-roll.md +63 -0
- package/llms/components/obc-pitch.md +81 -0
- package/llms/components/obc-pivot-item-group.md +79 -0
- package/llms/components/obc-pivot-item.md +75 -0
- package/llms/components/obc-poi-aton.md +68 -0
- package/llms/components/obc-poi-button-aton.md +54 -0
- package/llms/components/obc-poi-button-data.md +53 -0
- package/llms/components/obc-poi-button-vessel.md +55 -0
- package/llms/components/obc-poi-button.md +94 -0
- package/llms/components/obc-poi-card-header.md +90 -0
- package/llms/components/obc-poi-card.md +110 -0
- package/llms/components/obc-poi-controller.md +151 -0
- package/llms/components/obc-poi-data.md +72 -0
- package/llms/components/obc-poi-graphic-line.md +70 -0
- package/llms/components/obc-poi-group.md +85 -0
- package/llms/components/obc-poi-header.md +71 -0
- package/llms/components/obc-poi-layer-stack.md +85 -0
- package/llms/components/obc-poi-layer.md +110 -0
- package/llms/components/obc-poi-line.md +70 -0
- package/llms/components/obc-poi-object-aton.md +45 -0
- package/llms/components/obc-poi-object-data.md +48 -0
- package/llms/components/obc-poi-object-vessel.md +95 -0
- package/llms/components/obc-poi-object.md +82 -0
- package/llms/components/obc-poi-pointer.md +70 -0
- package/llms/components/obc-poi-selection-frame.md +66 -0
- package/llms/components/obc-poi-vessel.md +70 -0
- package/llms/components/obc-poi.md +140 -0
- package/llms/components/obc-polar-chart.md +126 -0
- package/llms/components/obc-position-deviation.md +84 -0
- package/llms/components/obc-pressure-reduction-valve.md +88 -0
- package/llms/components/obc-pressure-sustain-valve.md +85 -0
- package/llms/components/obc-progress-bar.md +102 -0
- package/llms/components/obc-progress-button.md +111 -0
- package/llms/components/obc-progress-indicator-dots.md +57 -0
- package/llms/components/obc-propulsion-azimuth-indicator.md +48 -0
- package/llms/components/obc-pump.md +76 -0
- package/llms/components/obc-radial-bar-chart.md +103 -0
- package/llms/components/obc-radio.md +82 -0
- package/llms/components/obc-rate-of-turn.md +95 -0
- package/llms/components/obc-readout-block.md +137 -0
- package/llms/components/obc-readout-list-item.md +142 -0
- package/llms/components/obc-readout-list.md +85 -0
- package/llms/components/obc-readout.md +169 -0
- package/llms/components/obc-resistor.md +64 -0
- package/llms/components/obc-rich-button.md +92 -0
- package/llms/components/obc-roll-indicator.md +38 -0
- package/llms/components/obc-roll.md +56 -0
- package/llms/components/obc-rot-indicator.md +32 -0
- package/llms/components/obc-rot-linear.md +68 -0
- package/llms/components/obc-rot-sector.md +125 -0
- package/llms/components/obc-router.md +64 -0
- package/llms/components/obc-rudder-indicator.md +54 -0
- package/llms/components/obc-rudder.md +112 -0
- package/llms/components/obc-ruler-pointer.md +57 -0
- package/llms/components/obc-scrollbar.md +57 -0
- package/llms/components/obc-sequence-card.md +119 -0
- package/llms/components/obc-sequence-connector.md +70 -0
- package/llms/components/obc-sequence-item.md +64 -0
- package/llms/components/obc-sequence-loading-spinner.md +70 -0
- package/llms/components/obc-sequence-modal.md +89 -0
- package/llms/components/obc-sequence-step.md +48 -0
- package/llms/components/obc-sequence-toolbar.md +108 -0
- package/llms/components/obc-slide-button.md +111 -0
- package/llms/components/obc-slider-double.md +137 -0
- package/llms/components/obc-slider.md +143 -0
- package/llms/components/obc-source.md +64 -0
- package/llms/components/obc-speed-arrows.md +39 -0
- package/llms/components/obc-speed-directions.md +66 -0
- package/llms/components/obc-speed-gauge.md +124 -0
- package/llms/components/obc-speed-indicator.md +37 -0
- package/llms/components/obc-split-button.md +144 -0
- package/llms/components/obc-start-stop-switch.md +126 -0
- package/llms/components/obc-status-indicator.md +30 -0
- package/llms/components/obc-stepper-box.md +90 -0
- package/llms/components/obc-surge-sway-yaw.md +95 -0
- package/llms/components/obc-switch.md +69 -0
- package/llms/components/obc-system-button.md +112 -0
- package/llms/components/obc-system-menu.md +67 -0
- package/llms/components/obc-tab-item.md +161 -0
- package/llms/components/obc-tab-row.md +151 -0
- package/llms/components/obc-tabbed-card.md +148 -0
- package/llms/components/obc-table-header-item.md +42 -0
- package/llms/components/obc-table.md +124 -0
- package/llms/components/obc-tag.md +41 -0
- package/llms/components/obc-text-input-field.md +94 -0
- package/llms/components/obc-textarea-field.md +186 -0
- package/llms/components/obc-textbox.md +80 -0
- package/llms/components/obc-three-way-line.md +29 -0
- package/llms/components/obc-thruster.md +64 -0
- package/llms/components/obc-title-container.md +81 -0
- package/llms/components/obc-toggle-button-group.md +184 -0
- package/llms/components/obc-toggle-button-option.md +126 -0
- package/llms/components/obc-toggle-button-three-state.md +38 -0
- package/llms/components/obc-toggle-button-vertical-group.md +142 -0
- package/llms/components/obc-toggle-button-vertical-option.md +110 -0
- package/llms/components/obc-toggle-switch.md +126 -0
- package/llms/components/obc-toggletip.md +135 -0
- package/llms/components/obc-tooltip.md +106 -0
- package/llms/components/obc-top-bar.md +194 -0
- package/llms/components/obc-top-view-propulsion.md +84 -0
- package/llms/components/obc-topbar-message-item.md +150 -0
- package/llms/components/obc-transformer.md +64 -0
- package/llms/components/obc-transmitter-button.md +101 -0
- package/llms/components/obc-transmitter-stack.md +79 -0
- package/llms/components/obc-transmitter.md +114 -0
- package/llms/components/obc-tree-navigation-group.md +69 -0
- package/llms/components/obc-tree-navigation-item.md +110 -0
- package/llms/components/obc-tree-navigation.md +73 -0
- package/llms/components/obc-tunnel-thruster.md +59 -0
- package/llms/components/obc-user-button.md +107 -0
- package/llms/components/obc-user-menu.md +154 -0
- package/llms/components/obc-valve-analog-three-way-icon.md +69 -0
- package/llms/components/obc-valve-analog-two-way-icon.md +39 -0
- package/llms/components/obc-velocity-projection-plot.md +34 -0
- package/llms/components/obc-vendor-button.md +63 -0
- package/llms/components/obc-vertical-line.md +33 -0
- package/llms/components/obc-watch-flat.md +54 -0
- package/llms/components/obc-watch.md +206 -0
- package/llms/components/obc-wind-indicator.md +52 -0
- package/llms/components/obc-wind-propulsion.md +92 -0
- package/llms/components/obc-wind.md +46 -0
- package/llms/docs/ar-poi-projection.md +36 -0
- package/llms/docs/automation-sequence-step-diagram-playground.md +13 -0
- package/llms/docs/building-blocks-advice.md +31 -0
- package/llms/docs/building-blocks-external-scale.md +138 -0
- package/llms/docs/building-blocks-setpoint.md +119 -0
- package/llms/docs/introduction-advice-system.md +161 -0
- package/llms/docs/introduction-getting-started.md +94 -0
- package/llms/docs/introduction-introduction.md +27 -0
- package/llms/docs/introduction-join-the-project.md +11 -0
- package/llms/docs/introduction-migration-guide-2-0-to-2-1.md +126 -0
- package/llms/docs/introduction-migration-guide-2-1-to-2-2.md +106 -0
- package/llms/docs/introduction-migration-guide.md +1063 -0
- package/llms/docs/palettes-categorical-colour.md +9 -0
- package/llms/llms-full.txt +28380 -0
- package/llms/llms.txt +368 -0
- package/package.json +12 -2
- package/script/cem-plugins/lifecycle.d.mts +6 -0
- package/script/cem-plugins/lifecycle.mjs +48 -0
- package/script/cem-plugins.test.ts +52 -1
- package/script/generate-llms-txt.ts +34 -0
- package/script/llms/channel.test.ts +69 -0
- package/script/llms/channel.ts +63 -0
- package/script/llms/generate.test.ts +143 -0
- package/script/llms/generate.ts +229 -0
- package/script/llms/manifest.test.ts +160 -0
- package/script/llms/manifest.ts +109 -0
- package/script/llms/markdown.test.ts +22 -0
- package/script/llms/markdown.ts +37 -0
- package/script/llms/mdx.test.ts +172 -0
- package/script/llms/mdx.ts +171 -0
- package/script/llms/render-component.test.ts +290 -0
- package/script/llms/render-component.ts +208 -0
- package/script/llms/render-guides.test.ts +105 -0
- package/script/llms/render-guides.ts +51 -0
- package/script/llms/render-llms-txt.test.ts +222 -0
- package/script/llms/render-llms-txt.ts +185 -0
- package/script/llms/sources.test.ts +118 -0
- package/script/llms/sources.ts +89 -0
- package/script/llms/stories.test.ts +193 -0
- package/script/llms/stories.ts +256 -0
- package/script/llms/types.ts +95 -0
- package/script/prepare-full-bundle.ts +1 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# `<obc-gauge-horizontal>`
|
|
2
|
+
|
|
3
|
+
A horizontal gauge component with bar and scale background.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-gauge-horizontal--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/gauge-horizontal/gauge-horizontal.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-gauge-horizontal>` – A horizontal gauge component with bar and scale background.
|
|
8
|
+
|
|
9
|
+
Use `obc-gauge-horizontal` when you need a standalone horizontal gauge with a visible scale
|
|
10
|
+
and bar. This is ideal for displaying single values like speed, power, or progress where
|
|
11
|
+
the scale context is always needed.
|
|
12
|
+
|
|
13
|
+
This is the same as `obc-bar-horizontal` (both use `external-scale.ts`)
|
|
14
|
+
but with several properties fixed for consistent gauge appearance.
|
|
15
|
+
Unlike `obc-bar-horizontal`, this component always shows the bar and scale background.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
- **Fixed Layout:** Width (384px), padding (32px), bar/tick/label thicknesses, and border radius are fixed for consistent gauge appearance. 384 px is the length the design is drawn at, not a layout limit: see `fixedAspectRatio`.
|
|
21
|
+
- **Scale Configuration:**
|
|
22
|
+
- Configurable `minValue` and `maxValue` for the value range.
|
|
23
|
+
- Optional main, primary, secondary, and tertiary tickmarks at specified intervals.
|
|
24
|
+
- Labels shown at primary tickmark intervals (controlled via `showLabels`).
|
|
25
|
+
- **Side Positioning:** Can be placed on the `top` or `bottom` side via the `side` property.
|
|
26
|
+
- **Value Display:**
|
|
27
|
+
- `value` property drives the bar fill.
|
|
28
|
+
- `fillMode` controls visualization: `fill` shows bar from `fillMin` to `fillMax`; `tint` adds a marker at the `value` position.
|
|
29
|
+
- Set `priority` to `Priority.enhanced` to use the blue/enhanced color palette for bar fill and setpoint (default: `Priority.regular`).
|
|
30
|
+
- **Setpoint Marker:**
|
|
31
|
+
- Optional `setpoint` value displays a marker.
|
|
32
|
+
- Automatic at-setpoint detection with configurable deadband.
|
|
33
|
+
- **Advice Overlays:** Render advice ranges with different types and hinted states.
|
|
34
|
+
- **Fixed Aspect Ratio:** `fixedAspectRatio` scales the whole gauge to its container like a vector image while the label font size stays put; `scaleReferenceSize` is the container width at which it draws 1:1.
|
|
35
|
+
- **Dimension Reporting:** Dispatches `scale-dimensions-changed` events for parent chart integration.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Fixed Properties (not configurable)
|
|
40
|
+
- `width`: 384px
|
|
41
|
+
- `paddingLeft`/`paddingRight`: 32px (`CHART_DIMENSIONS.CANVAS_PADDING`)
|
|
42
|
+
- `barThickness`: 48px
|
|
43
|
+
- `tickThickness`: 24px
|
|
44
|
+
- `labelThickness`: 60px
|
|
45
|
+
- `borderRadius`: 8px (matches obc-component-size-medium)
|
|
46
|
+
- `scaleType`: regular
|
|
47
|
+
- `frameStyle`: regular
|
|
48
|
+
- `hasBar`: true
|
|
49
|
+
- `hasScale`: true
|
|
50
|
+
- `scaleBackground`: true
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Implementation
|
|
55
|
+
This is a higher fidelity implementation of the concept shown in `instrument-linear.ts`,
|
|
56
|
+
providing a complete gauge with container, scale background, tickmarks, labels, advice overlays, and setpoint marker.
|
|
57
|
+
|
|
58
|
+
This is a thin web-component wrapper around the pure SVG building-block renderer in `external-scale.ts`.
|
|
59
|
+
It sets up the outer `<svg>`/`viewBox` for a horizontal scale and delegates rendering/layout to:
|
|
60
|
+
- `computeExternalScaleLayout(...)`
|
|
61
|
+
- `renderExternalScale(config)`
|
|
62
|
+
|
|
63
|
+
For renderer documentation see: **Building Blocks/External Scale**.
|
|
64
|
+
|
|
65
|
+
For a version where these properties are user-configurable, see **Bars and Graphs/Bar Horizontal**.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Events
|
|
70
|
+
- `scale-dimensions-changed` – Fired when layout-affecting properties (`side`, `showLabels`) change, reporting dimensions to parent chart components.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Example
|
|
75
|
+
|
|
76
|
+
```html
|
|
77
|
+
<obc-gauge-horizontal
|
|
78
|
+
min-value="0"
|
|
79
|
+
max-value="100"
|
|
80
|
+
value="75"
|
|
81
|
+
primary-tickmark-interval="20"
|
|
82
|
+
secondary-tickmark-interval="10"
|
|
83
|
+
setpoint="80"
|
|
84
|
+
side="bottom"
|
|
85
|
+
></obc-gauge-horizontal>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Properties
|
|
89
|
+
|
|
90
|
+
| Property | Attribute | Type | Default | Description |
|
|
91
|
+
| --- | --- | --- | --- | --- |
|
|
92
|
+
| minValue | minValue | `number` | `0` | Minimum scale value |
|
|
93
|
+
| maxValue | maxValue | `number` | `100` | Maximum scale value |
|
|
94
|
+
| reverse | reverse | `boolean` | `false` | Plot `minValue` at the right so values grow leftward. |
|
|
95
|
+
| side | side | `ExternalScaleSide` | | Which side of the chart area this scale lives on (top or bottom) |
|
|
96
|
+
| fixedAspectRatio | fixedAspectRatio | `boolean` | `false` | Scale the whole gauge to its container like a vector image, keeping the label font size: the SVG fills the host, so size the host. Off, the gauge draws at its 384 px reference width. |
|
|
97
|
+
| scaleReferenceSize | scaleReferenceSize | `number` | `384` | Container width at which a `fixedAspectRatio` gauge draws 1:1 with the design. A wider container enlarges the drawing proportionally, a narrower one shrinks it. Available when `fixedAspectRatio==true`. |
|
|
98
|
+
| showLabels | | `boolean` | `true` | Show numerical value labels at primary tickmarks |
|
|
99
|
+
| mainTickmarks | | `number[] \| undefined` | `[]` | Array of values for main tickmarks. When undefined, no main tickmarks shown. When empty array [], defaults to [minValue, 0, maxValue]. |
|
|
100
|
+
| primaryTickmarkInterval | primaryTickmarkInterval | `number \| undefined` | `undefined` | Interval for primary (longest) tickmarks with labels |
|
|
101
|
+
| secondaryTickmarkInterval | secondaryTickmarkInterval | `number \| undefined` | `undefined` | Interval for secondary (medium) tickmarks |
|
|
102
|
+
| tertiaryTickmarkInterval | tertiaryTickmarkInterval | `number \| undefined` | `undefined` | Interval for tertiary (shortest) tickmarks |
|
|
103
|
+
| borderRadiusPosition | | `BorderRadiusPosition \| undefined` | | Border radius position based on component layout |
|
|
104
|
+
| priority | priority | `Priority` | | Color priority: enhanced uses blue instrument colors for bar fill and setpoint |
|
|
105
|
+
| fillMode | fillMode | `FillMode` | | Fill visualization mode: 'fill' shows bar from fillMin to fillMax; 'tint' adds a marker at the value position |
|
|
106
|
+
| fillMin | fillMin | `number \| undefined` | `undefined` | Minimum fill value (defaults to 0) |
|
|
107
|
+
| fillMax | fillMax | `number \| undefined` | `undefined` | Maximum fill value (defaults to value) |
|
|
108
|
+
| value | value | `number \| undefined` | `undefined` | Current value (bar fill level) |
|
|
109
|
+
| state | state | `InstrumentState` | | Instrument state: active, loading, or off |
|
|
110
|
+
| focused | focused | `boolean` | `false` | Earlier name for `touching`: a change to it sets `touching`, unless `touching` changes in the same update, which then wins. It is not updated from `touching`, so it does not read back the current value. |
|
|
111
|
+
| highlightCurrentValue | highlightCurrentValue | `boolean` | `false` | When true, displays a dot indicator at the current value position. The dot is rendered in the scale band, touching its inner edge (towards the chart). This provides an alternative to bar fill for highlighting the current value. |
|
|
112
|
+
| advices | advices | `AdviceInput[]` | `[]` | Advice/alert overlays with min, max, type, and hinted state. When undefined or empty, no advice shown. |
|
|
113
|
+
| adviceTrigger | adviceTrigger | `AdviceTrigger` | | Which readings trigger an advice: the value, the setpoint, or either. Available when `adviceTrigger advices!=[]`. |
|
|
114
|
+
| adviceEmphasis | adviceEmphasis | `boolean` | `false` | The design's go-to / no-go emphasis rules. Available when `adviceEmphasis advices!=[]`. |
|
|
115
|
+
| setpoint | setpoint | `number \| undefined` | | Target setpoint value. `undefined` = no setpoint marker shown. |
|
|
116
|
+
| newSetpoint | newSetpoint | `number \| undefined` | | Adjustment preview for 2-step interface. When defined, two markers are shown: original (dimmed) + new (focus). Available when `setpoint!=undefined`. |
|
|
117
|
+
| atSetpoint | | `boolean` | `false` | Manual at-setpoint override (used when `autoAtSetpoint` is false). Available when `setpoint!=undefined && autoAtSetpoint==false`. |
|
|
118
|
+
| touching | touching | `boolean` | `false` | User is physically interacting with the control. Suppresses at-setpoint calculation and triggers focus visual. Available when `setpoint!=undefined`. |
|
|
119
|
+
| autoAtSetpoint | | `boolean` | `true` | When false, uses manual `atSetpoint` boolean instead of auto-calculation. Available when `setpoint!=undefined`. |
|
|
120
|
+
| autoAtSetpointDeadband | autoAtSetpointDeadband | `number` | `defaultDeadband` | Tolerance for auto at-setpoint detection. Available when `setpoint!=undefined && autoAtSetpoint==true`. |
|
|
121
|
+
| setpointAtZeroDeadband | setpointAtZeroDeadband | `number` | `defaultZeroDeadband` | Tolerance for zero-snap visual state. Available when `setpoint!=undefined`. |
|
|
122
|
+
| setpointOverride | setpointOverride | `boolean` | `false` | Override to derive the setpoint color from the instrument's `priority` regardless of instrument state. Available when `setpoint!=undefined`. |
|
|
123
|
+
| animateSetpoint | animateSetpoint | `boolean` | `false` | Enable CSS-animated confirm transition. Available when `setpoint!=undefined`. |
|
|
124
|
+
| departingNewSetpoint | | `number \| undefined` | | Public getter for renderers/wrappers to access the departing value. |
|
|
125
|
+
|
|
126
|
+
## Events
|
|
127
|
+
|
|
128
|
+
| Event | Type | Description |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| scale-dimensions-changed | `CustomEvent` | Fired when layout-affecting properties change, providing dimension info for parent chart integration. It bubbles to the chart slot the gauge sits in and does not leave the shadow root around it. |
|
|
131
|
+
|
|
132
|
+
## Slots
|
|
133
|
+
|
|
134
|
+
None.
|
|
135
|
+
|
|
136
|
+
## Stories
|
|
137
|
+
|
|
138
|
+
- [Default (bottom side, labels, advice)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--default-bottom)
|
|
139
|
+
- [Component Size Comparison (regular/medium/large/xl)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--component-size-comparison)
|
|
140
|
+
- [Default (top side, labels)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--default-top)
|
|
141
|
+
- [Negative Range (-100 to 100)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--negative-range)
|
|
142
|
+
- [Small Range (0 to 10)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--small-range)
|
|
143
|
+
- [With Bar Fill (bottom side, enhanced)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--with-bar-fill-bottom)
|
|
144
|
+
- [With Bar Fill (top side)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--with-bar-fill-top)
|
|
145
|
+
- [Fill Mode Comparison, Enhanced (fill vs tint)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--fill-mode-comparison)
|
|
146
|
+
- [Tint Mode With Advice Overlays](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--tint-mode-with-advice)
|
|
147
|
+
- [With Advice Overlays](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--with-advice)
|
|
148
|
+
- [With Setpoint (value at setpoint)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--with-setpoint-at-value)
|
|
149
|
+
- [With Setpoint (value away from setpoint)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--with-setpoint-away-from-value)
|
|
150
|
+
- [State Comparison](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--state-comparison)
|
|
151
|
+
- [Reversed (0 at Right, Minutes Ago)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--reversed): `reverse` puts `minValue` at the right edge so a "minutes ago" axis reads with positive numbers and 0 (now) on the right.
|
|
152
|
+
- [Fixed Aspect Ratio Comparison](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-horizontal--fixed-aspect-ratio-comparison): `obc-gauge-horizontal` is a fixed-config gauge: it draws at the design's 384 px reference width with the bar, tick and label bands at their design thickness. That number is where the drawing is 1:1, not a layout limit.
|
|
153
|
+
|
|
154
|
+
- **fixedAspectRatio=false (default)**: a 384 px wide SVG, whatever the box does.
|
|
155
|
+
- **fixedAspectRatio=true**: the whole gauge scales to the width of its host
|
|
156
|
+
like a vector image and the labels keep their font size; `scaleReferenceSize`
|
|
157
|
+
is the host width at which it is 1:1. Size the host, the gauge fills it.
|
|
158
|
+
|
|
159
|
+
For a scale whose length follows the layout while the bands keep their design
|
|
160
|
+
thickness, use `obc-bar-horizontal` with `width` from a ResizeObserver, as the
|
|
161
|
+
table's bar cells and the chart slots do.
|
|
162
|
+
|
|
163
|
+
Drag the corner of each box to resize it.
|
|
164
|
+
|
|
165
|
+
## See also
|
|
166
|
+
|
|
167
|
+
- [Advice System](https://openbridge-next-storybook.web.app/docs/introduction-advice-system.md)
|
|
168
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
169
|
+
- [Building Blocks/Setpoint](https://openbridge-next-storybook.web.app/docs/building-blocks-setpoint.md)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# `<obc-gauge-motors-and-pumps>`
|
|
2
|
+
|
|
3
|
+
Proportional radial gauge preset for motorized devices (the "Gauge-motors-and-pumps" design).
|
|
4
|
+
|
|
5
|
+
Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-gauge-motors-and-pumps--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/gauge-motors-and-pumps/gauge-motors-and-pumps.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-gauge-motors-and-pumps>` — Proportional radial gauge preset for
|
|
8
|
+
motorized devices (the "Gauge-motors-and-pumps" design).
|
|
9
|
+
|
|
10
|
+
A device-named preset of ObcGaugeProportional: the open `270`
|
|
11
|
+
sector and a baked-in pump symbol, with every gauge property (`value`,
|
|
12
|
+
`secondaryValue`, `large`, `tag`, `advices`, setpoint bundle, …) inherited
|
|
13
|
+
unchanged.
|
|
14
|
+
|
|
15
|
+
## Features / Variants
|
|
16
|
+
|
|
17
|
+
- `type`: `regular` (single value), `negative` (bipolar scale on the
|
|
18
|
+
pos/neg sector — `minValue` defaults to `-maxValue`; set `minValue`
|
|
19
|
+
yourself for an asymmetric scale), or `double` (primary-secondary
|
|
20
|
+
frame; feed the second lane and readout row via `secondaryValue`).
|
|
21
|
+
The sector follows the type; do not set `sector` directly on this
|
|
22
|
+
component.
|
|
23
|
+
- `large` shows the detailed face (readout and name row); the compact
|
|
24
|
+
default shows the icon-only face with the readout stack below. Unlike
|
|
25
|
+
the base gauge, `hasReadout` defaults to `true` so the large face is
|
|
26
|
+
detailed out of the box.
|
|
27
|
+
- Ships the pump symbol as slot fallback; slot `icon` to swap it for a
|
|
28
|
+
motor, fan, or vertical-pump symbol. The compact stack's secondary row
|
|
29
|
+
ships the design's battery icon the same way (slot `secondary-icon`).
|
|
30
|
+
- Overload zones render via `advices` (hatched caution arc).
|
|
31
|
+
|
|
32
|
+
## Usage Guidelines
|
|
33
|
+
|
|
34
|
+
Use for motor/pump speed or load on overview displays. For the schematic
|
|
35
|
+
(button) representation of the same devices, use `obc-pump` or
|
|
36
|
+
`obc-motor`; for a generic gauge with a custom device symbol, use
|
|
37
|
+
`obc-gauge-proportional` directly.
|
|
38
|
+
|
|
39
|
+
## Slots
|
|
40
|
+
|
|
41
|
+
| Slot | Purpose |
|
|
42
|
+
| ---------------- | -------------------------------------------------------------- |
|
|
43
|
+
| `icon` | Replaces the default pump symbol (`obi-*` icon) |
|
|
44
|
+
| `secondary-icon` | Replaces the battery icon on the compact stack's secondary row |
|
|
45
|
+
|
|
46
|
+
## Properties
|
|
47
|
+
|
|
48
|
+
| Property | Attribute | Type | Default | Description |
|
|
49
|
+
| --- | --- | --- | --- | --- |
|
|
50
|
+
| type | type | `GaugeMotorsAndPumpsType` | | The design's Type axis; drives the sector and the split frame. |
|
|
51
|
+
| hasReadout | hasReadout | `boolean` | `true` | When `true`, shows the center readout (and the secondary readout when the split frame renders — dashed until `secondaryValue` is set). Default `false`. Available when `large==true`. |
|
|
52
|
+
| advices | advices | `AdviceInput[]` | `[]` | Advice ranges and points in the instrument's unit; see `svghelpers/advice.ts`. |
|
|
53
|
+
| adviceTrigger | adviceTrigger | `AdviceTrigger` | | Which readings trigger an advice: the value, the setpoint, or either. Available when `adviceTrigger advices!=[]`. |
|
|
54
|
+
| adviceEmphasis | adviceEmphasis | `boolean` | `false` | The design's go-to / no-go emphasis rules. Available when `adviceEmphasis advices!=[]`. |
|
|
55
|
+
| setpoint | setpoint | `number \| undefined` | | Target setpoint value. `undefined` = no setpoint marker shown. |
|
|
56
|
+
| newSetpoint | newSetpoint | `number \| undefined` | | Adjustment preview for 2-step interface. When defined, two markers are shown: original (dimmed) + new (focus). Available when `setpoint!=undefined`. |
|
|
57
|
+
| atSetpoint | | `boolean` | `false` | Manual at-setpoint override (used when `autoAtSetpoint` is false). Available when `setpoint!=undefined && autoAtSetpoint==false`. |
|
|
58
|
+
| touching | touching | `boolean` | `false` | User is physically interacting with the control. Suppresses at-setpoint calculation and triggers focus visual. Available when `setpoint!=undefined`. |
|
|
59
|
+
| autoAtSetpoint | | `boolean` | `true` | When false, uses manual `atSetpoint` boolean instead of auto-calculation. Available when `setpoint!=undefined`. |
|
|
60
|
+
| autoAtSetpointDeadband | autoAtSetpointDeadband | `number` | `defaultDeadband` | Tolerance for auto at-setpoint detection. Available when `setpoint!=undefined && autoAtSetpoint==true`. |
|
|
61
|
+
| setpointAtZeroDeadband | setpointAtZeroDeadband | `number` | `defaultZeroDeadband` | Tolerance for zero-snap visual state. Available when `setpoint!=undefined`. |
|
|
62
|
+
| setpointOverride | setpointOverride | `boolean` | `false` | Override to derive the setpoint color from the instrument's `priority` regardless of instrument state. Available when `setpoint!=undefined`. |
|
|
63
|
+
| animateSetpoint | animateSetpoint | `boolean` | `false` | Enable CSS-animated confirm transition. Available when `setpoint!=undefined`. |
|
|
64
|
+
| departingNewSetpoint | | `number \| undefined` | | Public getter for renderers/wrappers to access the departing value. |
|
|
65
|
+
| value | value | `number` | `0` | |
|
|
66
|
+
| maxValue | maxValue | `number` | `100` | |
|
|
67
|
+
| minValue | minValue | `number` | `0` | |
|
|
68
|
+
| secondaryValue | secondaryValue | `number \| undefined` | | Secondary value shown as a thin line arc at the band's inner edge with a second readout (the "primary-secondary" frame type). When undefined (default), the regular single-value frame renders. |
|
|
69
|
+
| state | state | `InstrumentState` | | Instrument state (active, loading, off). `priority: off` also renders the off face. |
|
|
70
|
+
| sector | sector | `GaugeProportionalSector` | | |
|
|
71
|
+
| alignment | alignment | `GaugeProportionalAlignment` | | Available when `large==true`. |
|
|
72
|
+
| priority | priority | `GaugeProportionalPriority` | | |
|
|
73
|
+
| showLabels | showLabels | `boolean` | `false` | |
|
|
74
|
+
| primaryTickmarkInterval | primaryTickmarkInterval | `number \| undefined` | `50` | Interval for primary tickmarks in value units. When undefined or <= 0, no primary tickmarks are shown. |
|
|
75
|
+
| secondaryTickmarkInterval | secondaryTickmarkInterval | `number \| undefined` | `10` | Interval for secondary tickmarks in value units. When undefined or <= 0, no secondary tickmarks are shown. |
|
|
76
|
+
| tickmarkStyle | tickmarkStyle | `TickmarkStyle` | | |
|
|
77
|
+
| label | label | `string` | `''` | Available when `hasReadout==true`. |
|
|
78
|
+
| unit | unit | `string` | `''` | Unit for the in-dial readout (large) and the compact stack rows. Available when `hasReadout==true`. |
|
|
79
|
+
| secondaryLabel | secondaryLabel | `string` | `''` | Available when `secondaryValue!=undefined`. |
|
|
80
|
+
| secondaryUnit | secondaryUnit | `string` | `''` | Available when `secondaryValue!=undefined`. |
|
|
81
|
+
| fractionDigits | fractionDigits | `number` | `0` | Available when `hasReadout==true`. |
|
|
82
|
+
| name | name | `string` | `''` | Name row shown under the readout (uppercase overline style). Available when `large==true`. |
|
|
83
|
+
| faceDiameter | face-diameter | `number \| undefined` | | Outer-ring diameter in CSS pixels. When set, the instrument renders at a fixed intrinsic size; when unset (default), it fills its container. |
|
|
84
|
+
| large | large | `boolean` | `false` | The design's Large variant: `alignment`-controlled scale labels, in-dial readouts and the name row. When `false` (default), the Small variant renders — the face cropped to the dial with icon-only center content and a readout stack below. The Large face fills its container (or `faceDiameter`); the Small face shrinks with a tight slot but caps at the design's natural 240px dial box, so it always reads smaller than a Large face in the same slot. |
|
|
85
|
+
| hasLabelStack | | `boolean` | `true` | Render the readout stack below the face in the compact variant. Available when `large==false`. |
|
|
86
|
+
| tag | tag | `string` | `''` | Identifier line under the compact readout stack, e.g. '#0001'. Available when `large==false`. |
|
|
87
|
+
|
|
88
|
+
## Events
|
|
89
|
+
|
|
90
|
+
None.
|
|
91
|
+
|
|
92
|
+
## Slots
|
|
93
|
+
|
|
94
|
+
| Slot | Description |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| icon | Replaces the default pump symbol (`obi-*` icon) |
|
|
97
|
+
| secondary-icon | Replaces the battery icon on the compact stack's secondary row |
|
|
98
|
+
|
|
99
|
+
## Stories
|
|
100
|
+
|
|
101
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/automation-gauge-motors-and-pumps--default)
|
|
102
|
+
- [Negative](https://openbridge-next-storybook.web.app/?path=/story/automation-gauge-motors-and-pumps--negative)
|
|
103
|
+
- [Double](https://openbridge-next-storybook.web.app/?path=/story/automation-gauge-motors-and-pumps--double)
|
|
104
|
+
- [Large Regular](https://openbridge-next-storybook.web.app/?path=/story/automation-gauge-motors-and-pumps--large-regular)
|
|
105
|
+
- [Large Negative](https://openbridge-next-storybook.web.app/?path=/story/automation-gauge-motors-and-pumps--large-negative)
|
|
106
|
+
- [Large Double](https://openbridge-next-storybook.web.app/?path=/story/automation-gauge-motors-and-pumps--large-double)
|
|
107
|
+
|
|
108
|
+
## See also
|
|
109
|
+
|
|
110
|
+
- [Advice System](https://openbridge-next-storybook.web.app/docs/introduction-advice-system.md)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# `<obc-gauge-proportional>`
|
|
2
|
+
|
|
3
|
+
Radial gauge whose fill band length is proportional to the value, with an optional secondary value lane and a center readout cluster (the "Watch-face-gauge-proportional" design).
|
|
4
|
+
|
|
5
|
+
Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-gauge-proportional--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/gauge-proportional/gauge-proportional.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-gauge-proportional>` — Radial gauge whose fill band length is
|
|
8
|
+
proportional to the value, with an optional secondary value lane and a
|
|
9
|
+
center readout cluster (the "Watch-face-gauge-proportional" design).
|
|
10
|
+
|
|
11
|
+
The value renders as a band on the track annulus growing from the fill
|
|
12
|
+
origin to the current value, tipped with a needle pill. A setpoint marker
|
|
13
|
+
(via SetpointMixin) and caution/alert advice arcs render on the
|
|
14
|
+
same face.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- **Sectors**: `360` (full circle, fill anchored at 12 o'clock), `270`
|
|
19
|
+
(fill anchored at the scale start), and `270-pos-neg` (fill anchored at
|
|
20
|
+
the scale midpoint/zero, growing toward either side). The watch face is
|
|
21
|
+
always a complete background circle — the sector only limits the
|
|
22
|
+
scale/track arc inside it.
|
|
23
|
+
- **Label alignment**: `outside` (default), `inside`
|
|
24
|
+
(labels inside the ring), and `max-min` (only the min/max labels).
|
|
25
|
+
- **Priority**: `regular`, `enhanced`, `medium` (category color pair via
|
|
26
|
+
`--instrument-enhanced-*` overrides), `off` (silhouette face, value
|
|
27
|
+
graphics hidden, setpoint and readouts remain).
|
|
28
|
+
- **Secondary value**: setting `secondaryValue` renders the
|
|
29
|
+
primary-secondary frame — the track splits into a narrowed primary band
|
|
30
|
+
lane and a secondary line lane with its own track, and a second readout
|
|
31
|
+
renders with a divider.
|
|
32
|
+
- **Center content**: optional readout(s) with `label`/`unit`, a `name`
|
|
33
|
+
row, and an `icon` slot above the readout.
|
|
34
|
+
- **Sizes**: `large` renders the full frame with scale labels, in-dial
|
|
35
|
+
readout(s) and name row. The compact default crops the face to the dial,
|
|
36
|
+
keeps icon, band, ticks, min/max end labels and setpoint, and renders a
|
|
37
|
+
readout stack below (`hasLabelStack`, `tag`) — one value row per value.
|
|
38
|
+
- **Setpoint via mixin**: `setpoint`, `newSetpoint`, `touching`, deadband
|
|
39
|
+
tuning and confirm animation are inherited from `SetpointMixin`.
|
|
40
|
+
|
|
41
|
+
## Usage Guidelines
|
|
42
|
+
|
|
43
|
+
- Use `obc-gauge-radial` for the classic filled/bar/needle gauge with
|
|
44
|
+
90/180/270 sectors; use this component for the proportional band style,
|
|
45
|
+
the full-circle sector, the mid-anchored (pos/neg) fill, the secondary
|
|
46
|
+
value lane, or the medium/off priorities.
|
|
47
|
+
- `priority: off` blanks the value graphics but keeps the instrument
|
|
48
|
+
legible.
|
|
49
|
+
- The compact stack renders whole-number value rows, plus a setpoint row
|
|
50
|
+
when `setpoint` is set. The secondary row's device icon projects
|
|
51
|
+
through the `secondary-icon` slot.
|
|
52
|
+
|
|
53
|
+
## Slots
|
|
54
|
+
|
|
55
|
+
| Slot | Purpose |
|
|
56
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------- |
|
|
57
|
+
| `icon` | Device symbol shown above the readout, scaled with the face (e.g. `<obi-placeholder-device-on useCssColor>`). |
|
|
58
|
+
| `secondary-icon` | Device-specific icon on the compact stack's secondary value row (e.g. a battery icon). |
|
|
59
|
+
|
|
60
|
+
## Properties
|
|
61
|
+
|
|
62
|
+
| Property | Attribute | Type | Default | Description |
|
|
63
|
+
| --- | --- | --- | --- | --- |
|
|
64
|
+
| value | value | `number` | `0` | |
|
|
65
|
+
| maxValue | maxValue | `number` | `100` | |
|
|
66
|
+
| minValue | minValue | `number` | `0` | |
|
|
67
|
+
| secondaryValue | secondaryValue | `number \| undefined` | | Secondary value shown as a thin line arc at the band's inner edge with a second readout (the "primary-secondary" frame type). When undefined (default), the regular single-value frame renders. |
|
|
68
|
+
| state | state | `InstrumentState` | | Instrument state (active, loading, off). `priority: off` also renders the off face. |
|
|
69
|
+
| sector | sector | `GaugeProportionalSector` | | |
|
|
70
|
+
| alignment | alignment | `GaugeProportionalAlignment` | | Available when `large==true`. |
|
|
71
|
+
| priority | priority | `GaugeProportionalPriority` | | |
|
|
72
|
+
| showLabels | showLabels | `boolean` | `false` | |
|
|
73
|
+
| primaryTickmarkInterval | primaryTickmarkInterval | `number \| undefined` | `50` | Interval for primary tickmarks in value units. When undefined or <= 0, no primary tickmarks are shown. |
|
|
74
|
+
| secondaryTickmarkInterval | secondaryTickmarkInterval | `number \| undefined` | `10` | Interval for secondary tickmarks in value units. When undefined or <= 0, no secondary tickmarks are shown. |
|
|
75
|
+
| tickmarkStyle | tickmarkStyle | `TickmarkStyle` | | |
|
|
76
|
+
| hasReadout | hasReadout | `boolean` | `false` | When `true`, shows the center readout (and the secondary readout when the split frame renders — dashed until `secondaryValue` is set). Default `false`. Available when `large==true`. |
|
|
77
|
+
| label | label | `string` | `''` | Available when `hasReadout==true`. |
|
|
78
|
+
| unit | unit | `string` | `''` | Unit for the in-dial readout (large) and the compact stack rows. Available when `hasReadout==true`. |
|
|
79
|
+
| secondaryLabel | secondaryLabel | `string` | `''` | Available when `secondaryValue!=undefined`. |
|
|
80
|
+
| secondaryUnit | secondaryUnit | `string` | `''` | Available when `secondaryValue!=undefined`. |
|
|
81
|
+
| fractionDigits | fractionDigits | `number` | `0` | Available when `hasReadout==true`. |
|
|
82
|
+
| name | name | `string` | `''` | Name row shown under the readout (uppercase overline style). Available when `large==true`. |
|
|
83
|
+
| faceDiameter | face-diameter | `number \| undefined` | | Outer-ring diameter in CSS pixels. When set, the instrument renders at a fixed intrinsic size; when unset (default), it fills its container. |
|
|
84
|
+
| large | large | `boolean` | `false` | The design's Large variant: `alignment`-controlled scale labels, in-dial readouts and the name row. When `false` (default), the Small variant renders — the face cropped to the dial with icon-only center content and a readout stack below. The Large face fills its container (or `faceDiameter`); the Small face shrinks with a tight slot but caps at the design's natural 240px dial box, so it always reads smaller than a Large face in the same slot. |
|
|
85
|
+
| hasLabelStack | | `boolean` | `true` | Render the readout stack below the face in the compact variant. Available when `large==false`. |
|
|
86
|
+
| tag | tag | `string` | `''` | Identifier line under the compact readout stack, e.g. '#0001'. Available when `large==false`. |
|
|
87
|
+
| advices | advices | `AdviceInput[]` | `[]` | Caution/alert arcs in value units. |
|
|
88
|
+
| adviceTrigger | adviceTrigger | `AdviceTrigger` | | Which readings trigger an advice: the value, the setpoint, or either. Available when `adviceTrigger advices!=[]`. |
|
|
89
|
+
| adviceEmphasis | adviceEmphasis | `boolean` | `false` | The design's go-to / no-go emphasis rules. Available when `adviceEmphasis advices!=[]`. |
|
|
90
|
+
| setpoint | setpoint | `number \| undefined` | | Target setpoint value. `undefined` = no setpoint marker shown. |
|
|
91
|
+
| newSetpoint | newSetpoint | `number \| undefined` | | Adjustment preview for 2-step interface. When defined, two markers are shown: original (dimmed) + new (focus). Available when `setpoint!=undefined`. |
|
|
92
|
+
| atSetpoint | | `boolean` | `false` | Manual at-setpoint override (used when `autoAtSetpoint` is false). Available when `setpoint!=undefined && autoAtSetpoint==false`. |
|
|
93
|
+
| touching | touching | `boolean` | `false` | User is physically interacting with the control. Suppresses at-setpoint calculation and triggers focus visual. Available when `setpoint!=undefined`. |
|
|
94
|
+
| autoAtSetpoint | | `boolean` | `true` | When false, uses manual `atSetpoint` boolean instead of auto-calculation. Available when `setpoint!=undefined`. |
|
|
95
|
+
| autoAtSetpointDeadband | autoAtSetpointDeadband | `number` | `defaultDeadband` | Tolerance for auto at-setpoint detection. Available when `setpoint!=undefined && autoAtSetpoint==true`. |
|
|
96
|
+
| setpointAtZeroDeadband | setpointAtZeroDeadband | `number` | `defaultZeroDeadband` | Tolerance for zero-snap visual state. Available when `setpoint!=undefined`. |
|
|
97
|
+
| setpointOverride | setpointOverride | `boolean` | `false` | Override to derive the setpoint color from the instrument's `priority` regardless of instrument state. Available when `setpoint!=undefined`. |
|
|
98
|
+
| animateSetpoint | animateSetpoint | `boolean` | `false` | Enable CSS-animated confirm transition. Available when `setpoint!=undefined`. |
|
|
99
|
+
| departingNewSetpoint | | `number \| undefined` | | Public getter for renderers/wrappers to access the departing value. |
|
|
100
|
+
|
|
101
|
+
## Events
|
|
102
|
+
|
|
103
|
+
None.
|
|
104
|
+
|
|
105
|
+
## Slots
|
|
106
|
+
|
|
107
|
+
| Slot | Description |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| icon | Device symbol shown above the readout, scaled with the face (e.g. `<obi-placeholder-device-on useCssColor>` for the device-token styling). |
|
|
110
|
+
| secondary-icon | Device-specific icon on the compact stack's secondary value row |
|
|
111
|
+
|
|
112
|
+
## Stories
|
|
113
|
+
|
|
114
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--default)
|
|
115
|
+
- [Sector 360](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--sector-360)
|
|
116
|
+
- [Sector 270 Pos Neg](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--sector-270-pos-neg)
|
|
117
|
+
- [Primary Secondary](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--primary-secondary)
|
|
118
|
+
- [Primary Secondary 270](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--primary-secondary-270)
|
|
119
|
+
- [Icon Only](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--icon-only)
|
|
120
|
+
- [Small](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--small)
|
|
121
|
+
- [Small Double](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--small-double)
|
|
122
|
+
- [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--enhanced)
|
|
123
|
+
- [Medium](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--medium)
|
|
124
|
+
- [Off](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--off)
|
|
125
|
+
- [Inside Labels](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--inside-labels)
|
|
126
|
+
- [Sector 360 Inside Labels](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--sector-360-inside-labels)
|
|
127
|
+
- [Max Min Labels](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--max-min-labels)
|
|
128
|
+
- [Primary Secondary Max Min](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--primary-secondary-max-min)
|
|
129
|
+
- [With Advices](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--with-advices)
|
|
130
|
+
- [Bipolar Pos Neg](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-proportional--bipolar-pos-neg)
|
|
131
|
+
|
|
132
|
+
## See also
|
|
133
|
+
|
|
134
|
+
- [Advice System](https://openbridge-next-storybook.web.app/docs/introduction-advice-system.md)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# `<obc-gauge-radial-indicator>`
|
|
2
|
+
|
|
3
|
+
Compact radial gauge cue with selectable sweep, frame style, and optional icon.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/indicators-gauge-radial-indicator--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/gauge-radial-indicator/gauge-radial-indicator.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-gauge-radial-indicator>` – Compact radial gauge cue with selectable sweep, frame style, and optional icon.
|
|
8
|
+
|
|
9
|
+
Renders a fixed 48 x 48 indicator derived from the larger radial gauge
|
|
10
|
+
presentation. The component keeps the same value-to-angle behavior as
|
|
11
|
+
`obc-gauge-radial`, then applies it to a condensed framed sweep with a
|
|
12
|
+
needle overlay and an optional icon anchor.
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- **Sector variants**: `270` renders the wider bowl sweep, while `180`
|
|
17
|
+
renders the shorter half-sweep variant.
|
|
18
|
+
- **Style variants**: `regular` adds the framed outline; `flat` removes the
|
|
19
|
+
outer frame treatment for a lighter presentation.
|
|
20
|
+
- **Gauge-style mapping**: `value`, `minValue`, and `maxValue` map the sweep
|
|
21
|
+
across the selected sector, with centered zero behavior when the range
|
|
22
|
+
crosses zero.
|
|
23
|
+
- **Needle overlay**: A fixed compact pointer and pivot marker show the
|
|
24
|
+
current value angle.
|
|
25
|
+
- **Icon support**: Set `icon` to an `obi-icon` id or provide a custom icon
|
|
26
|
+
element in the `icon` slot. Use `hasIcon` to hide the icon entirely.
|
|
27
|
+
|
|
28
|
+
## Usage Guidelines
|
|
29
|
+
|
|
30
|
+
- Use `sector="270"` when the indicator should mirror the standard radial
|
|
31
|
+
gauge sweep.
|
|
32
|
+
- Use `sector="180"` when the compact indicator should emphasize a shorter
|
|
33
|
+
top sweep.
|
|
34
|
+
- Use `styleType="regular"` for the framed version shown in dense indicator
|
|
35
|
+
grids; switch to `styleType="flat"` when the surrounding layout already
|
|
36
|
+
provides enough visual separation.
|
|
37
|
+
- If `icon` is set, ensure the corresponding icon component is registered, or
|
|
38
|
+
provide the icon directly through the `icon` slot.
|
|
39
|
+
|
|
40
|
+
## Slots
|
|
41
|
+
|
|
42
|
+
| Slot Name | Renders When... | Purpose |
|
|
43
|
+
|-----------|----------------|---------|
|
|
44
|
+
| `icon` | `hasIcon` is true | Replaces the default icon rendered from the `icon` property. |
|
|
45
|
+
|
|
46
|
+
## Properties
|
|
47
|
+
|
|
48
|
+
| Property | Attribute | Type | Default | Description |
|
|
49
|
+
| --- | --- | --- | --- | --- |
|
|
50
|
+
| value | value | `number` | `33` | |
|
|
51
|
+
| minValue | min-value | `number` | `0` | |
|
|
52
|
+
| maxValue | max-value | `number` | `100` | |
|
|
53
|
+
| sector | sector | `number` | `270` | |
|
|
54
|
+
| styleType | style-type | `GaugeRadialIndicatorStyle` | | |
|
|
55
|
+
| icon | icon | `string` | `'placeholder'` | |
|
|
56
|
+
| hasIcon | has-icon | `boolean` | `false` | |
|
|
57
|
+
|
|
58
|
+
## Events
|
|
59
|
+
|
|
60
|
+
None.
|
|
61
|
+
|
|
62
|
+
## Slots
|
|
63
|
+
|
|
64
|
+
| Slot | Description |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| icon | Optional icon element rendered at the bottom anchor of the indicator. |
|
|
67
|
+
|
|
68
|
+
## Stories
|
|
69
|
+
|
|
70
|
+
- [Sector 270 Regular](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-radial-indicator--sector-270-regular)
|
|
71
|
+
- [Sector 180 Regular](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-radial-indicator--sector-180-regular)
|
|
72
|
+
- [Sector 270 Flat](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-radial-indicator--sector-270-flat)
|
|
73
|
+
- [Sector 180 Flat](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-radial-indicator--sector-180-flat)
|
|
74
|
+
- [Value Min](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-radial-indicator--min-value)
|
|
75
|
+
- [Value Middle](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-radial-indicator--middle-value)
|
|
76
|
+
- [Value Max](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-radial-indicator--max-value)
|