@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,163 @@
|
|
|
1
|
+
# `<obc-gauge-radial>`
|
|
2
|
+
|
|
3
|
+
Configurable radial gauge for generic numeric values.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-gauge-radial--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/gauge-radial/gauge-radial.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-gauge-radial>` — Configurable radial gauge for generic numeric values.
|
|
8
|
+
|
|
9
|
+
`ObcGaugeRadial` is a thin wrapper around `<obc-instrument-radial>` that adds
|
|
10
|
+
domain-independent value-to-angle mapping with automatic range handling for
|
|
11
|
+
both positive-only and bipolar (negative-to-positive) scales. It inherits a
|
|
12
|
+
full setpoint property bundle from SetpointMixin, including
|
|
13
|
+
auto at-setpoint detection, dual-marker adjustment preview, and deadband
|
|
14
|
+
tuning — no manual wiring required.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- **Three display types**: `filled` (solid arc), `bar` (thinner arc), and
|
|
19
|
+
`needle` (pointer indicator) via the `type` property.
|
|
20
|
+
- **Sector sweep**: `sector` selects the arc span (`270`, `180`, `90-left`, or `90-right`).
|
|
21
|
+
The configured `minValue..maxValue` always spans the full sector. For the
|
|
22
|
+
centered sectors (`270`, `180`) a symmetric range places `0` at 12 o'clock;
|
|
23
|
+
for `90-left`/`90-right` the range midpoint sits at the middle of the quadrant.
|
|
24
|
+
- **Setpoint via mixin**: `setpoint`, `newSetpoint`, `touching`,
|
|
25
|
+
`autoAtSetpointDeadband`, `setpointOverride`, and all other setpoint
|
|
26
|
+
properties are provided by `SetpointMixin` and forwarded to the inner
|
|
27
|
+
`<obc-instrument-radial>`.
|
|
28
|
+
- **Advice zones**: Pass an array of GaugeRadialAdvice objects to
|
|
29
|
+
render caution/alert arcs on the gauge. Not shown on the `90-left` /
|
|
30
|
+
`90-right` sectors.
|
|
31
|
+
- **Alignment**: The host always fills its container and the dial shrinks to
|
|
32
|
+
fit the smaller of the available width/height, so a short, wide (or tall,
|
|
33
|
+
narrow) container leaves slack on one axis. `horizontalAlignment`
|
|
34
|
+
(`left` | `center` | `right`) and `verticalAlignment`
|
|
35
|
+
(`top` | `center` | `bottom`) position the dial within that slack; both
|
|
36
|
+
default to `center`.
|
|
37
|
+
|
|
38
|
+
## Usage Guidelines
|
|
39
|
+
|
|
40
|
+
- Set `minValue` / `maxValue` to define the scale range.
|
|
41
|
+
- Use `priority` to switch between regular and enhanced color palettes.
|
|
42
|
+
- Provide `primaryTickmarkInterval` and `secondaryTickmarkInterval` to
|
|
43
|
+
control tickmark density.
|
|
44
|
+
- Enable `showLabels` to show numeric labels at primary tickmarks.
|
|
45
|
+
- Enable `hasReadout` with optional `label` and `unit`. Layout depends on `sector`
|
|
46
|
+
and `type`: **270** filled/bar — value at center + a label-only `meta` row in
|
|
47
|
+
the bottom gap (two separate readouts); **180** filled/bar — a single centered
|
|
48
|
+
stack (value + label/unit) at the bottom; **270** needle — bottom stack;
|
|
49
|
+
**180** needle — no readout; **90-left** / **90-right** filled/bar — corner
|
|
50
|
+
readout in a square host; **90** needle — no readout.
|
|
51
|
+
|
|
52
|
+
## Best Practices
|
|
53
|
+
|
|
54
|
+
- Prefer `SetpointMixin` properties (`setpoint`, `touching`, etc.) over
|
|
55
|
+
any legacy aliases — the mixin is the single source of truth.
|
|
56
|
+
- Keep domain-specific logic (units, formatting) in the parent view; this
|
|
57
|
+
component is intentionally unit-agnostic.
|
|
58
|
+
|
|
59
|
+
## Example
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<obc-gauge-radial
|
|
63
|
+
value="42"
|
|
64
|
+
minValue="0"
|
|
65
|
+
maxValue="100"
|
|
66
|
+
type="filled"
|
|
67
|
+
priority="enhanced"
|
|
68
|
+
showLabels
|
|
69
|
+
primaryTickmarkInterval="25"
|
|
70
|
+
secondaryTickmarkInterval="5"
|
|
71
|
+
setpoint="60"
|
|
72
|
+
></obc-gauge-radial>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Properties
|
|
76
|
+
|
|
77
|
+
| Property | Attribute | Type | Default | Description |
|
|
78
|
+
| --- | --- | --- | --- | --- |
|
|
79
|
+
| value | value | `number` | `0` | |
|
|
80
|
+
| maxValue | maxValue | `number` | `100` | |
|
|
81
|
+
| minValue | minValue | `number` | `0` | |
|
|
82
|
+
| showLabels | showLabels | `boolean` | `false` | |
|
|
83
|
+
| primaryTickmarkInterval | primaryTickmarkInterval | `number` | `50` | |
|
|
84
|
+
| secondaryTickmarkInterval | secondaryTickmarkInterval | `number` | `10` | |
|
|
85
|
+
| tertiaryTickmarkInterval | tertiaryTickmarkInterval | `number \| undefined` | `undefined` | Interval for tertiary tickmarks in value units. When undefined or <= 0, no tertiary tickmarks are shown. |
|
|
86
|
+
| state | state | `InstrumentState` | | |
|
|
87
|
+
| priority | priority | `Priority` | | |
|
|
88
|
+
| type | type | `ObcGaugeRadialType` | | |
|
|
89
|
+
| tickmarksInside | tickmarksInside | `boolean` | `false` | |
|
|
90
|
+
| tickmarkStyle | tickmarkStyle | `TickmarkStyle` | | |
|
|
91
|
+
| sector | sector | `GaugeRadialSector` | | |
|
|
92
|
+
| horizontalAlignment | horizontalAlignment | `GaugeRadialHorizontalAlignment` | | Horizontal placement of the dial when the host is wider than the dial (e.g. a short, wide container shrinks the dial to fit the height, leaving horizontal slack). Default `center`. |
|
|
93
|
+
| verticalAlignment | verticalAlignment | `GaugeRadialVerticalAlignment` | | Vertical placement of the dial when the host is taller than the dial (e.g. a tall, narrow container shrinks the dial to fit the width, leaving vertical slack). Default `center`. |
|
|
94
|
+
| hasReadout | hasReadout | `boolean` | `false` | When `true`, shows the centre `<obc-readout>`(s) with the current value (and optional `label`/`unit`). Layout depends on `sector` and `type`. Default `false`. |
|
|
95
|
+
| label | label | `string` | `''` | |
|
|
96
|
+
| unit | unit | `string` | `''` | |
|
|
97
|
+
| fractionDigits | fractionDigits | `number` | `0` | |
|
|
98
|
+
| faceDiameter | face-diameter | `number \| undefined` | | Outer-ring diameter in CSS pixels. When set, the instrument renders at a fixed intrinsic size derived from the ring, arc shape and label reserve — so instruments sharing the same value have identical ring circumference regardless of label width or arc extent (like obc-donut-chart's fixedHeight). When unset (default), the instrument fills its container. |
|
|
99
|
+
| getAngle | | | | |
|
|
100
|
+
| advices | advices | `AdviceInput[]` | `[]` | Caution/alert arcs. Ignored on `sector: 90-left` / `90-right`. |
|
|
101
|
+
| adviceTrigger | adviceTrigger | `AdviceTrigger` | | Which readings trigger an advice: the value, the setpoint, or either. Available when `adviceTrigger advices!=[]`. |
|
|
102
|
+
| adviceEmphasis | adviceEmphasis | `boolean` | `false` | The design's go-to / no-go emphasis rules. Available when `adviceEmphasis advices!=[]`. |
|
|
103
|
+
| setpoint | setpoint | `number \| undefined` | | Target setpoint value. `undefined` = no setpoint marker shown. |
|
|
104
|
+
| newSetpoint | newSetpoint | `number \| undefined` | | Adjustment preview for 2-step interface. When defined, two markers are shown: original (dimmed) + new (focus). Available when `setpoint!=undefined`. |
|
|
105
|
+
| atSetpoint | | `boolean` | `false` | Manual at-setpoint override (used when `autoAtSetpoint` is false). Available when `setpoint!=undefined && autoAtSetpoint==false`. |
|
|
106
|
+
| touching | touching | `boolean` | `false` | User is physically interacting with the control. Suppresses at-setpoint calculation and triggers focus visual. Available when `setpoint!=undefined`. |
|
|
107
|
+
| autoAtSetpoint | | `boolean` | `true` | When false, uses manual `atSetpoint` boolean instead of auto-calculation. Available when `setpoint!=undefined`. |
|
|
108
|
+
| autoAtSetpointDeadband | autoAtSetpointDeadband | `number` | `defaultDeadband` | Tolerance for auto at-setpoint detection. Available when `setpoint!=undefined && autoAtSetpoint==true`. |
|
|
109
|
+
| setpointAtZeroDeadband | setpointAtZeroDeadband | `number` | `defaultZeroDeadband` | Tolerance for zero-snap visual state. Available when `setpoint!=undefined`. |
|
|
110
|
+
| setpointOverride | setpointOverride | `boolean` | `false` | Override to derive the setpoint color from the instrument's `priority` regardless of instrument state. Available when `setpoint!=undefined`. |
|
|
111
|
+
| animateSetpoint | animateSetpoint | `boolean` | `false` | Enable CSS-animated confirm transition. Available when `setpoint!=undefined`. |
|
|
112
|
+
| departingNewSetpoint | | `number \| undefined` | | Public getter for renderers/wrappers to access the departing value. |
|
|
113
|
+
|
|
114
|
+
## Events
|
|
115
|
+
|
|
116
|
+
None.
|
|
117
|
+
|
|
118
|
+
## Slots
|
|
119
|
+
|
|
120
|
+
None.
|
|
121
|
+
|
|
122
|
+
## Stories
|
|
123
|
+
|
|
124
|
+
- [Positive](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--positive)
|
|
125
|
+
- [Negative](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--negative)
|
|
126
|
+
- [Enhanced Filled](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--enhanced-filled)
|
|
127
|
+
- [Enhanced Bar](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--enhanced-bar)
|
|
128
|
+
- [Enhanced Needle](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--enhanced-needle)
|
|
129
|
+
- [With Labels](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--with-labels)
|
|
130
|
+
- [With Advices](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--with-advices)
|
|
131
|
+
- [Limit Point](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--limit-point): A limit as a point advice beside a range: the alarm point is a short tick on the ring, the optimal range is triggered because the value sits in it.
|
|
132
|
+
- [Irregular Range](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--irregular-range)
|
|
133
|
+
- [Sector 270](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sector-270)
|
|
134
|
+
- [Sector 180](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sector-180)
|
|
135
|
+
- [Sector 180 With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sector-180-with-readout)
|
|
136
|
+
- [Sector 180 Wide End Labels](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sector-180-wide-end-labels)
|
|
137
|
+
- [Sector 90 Left](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sector-90-left)
|
|
138
|
+
- [Sector 90 Right](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sector-90-right)
|
|
139
|
+
- [Sector 90 Left With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sector-90-left-with-readout)
|
|
140
|
+
- [Sector 90 Right With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sector-90-right-with-readout)
|
|
141
|
+
- [Short Wide Container](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--short-wide-container)
|
|
142
|
+
- [Short Wide Container 180](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--short-wide-container-180)
|
|
143
|
+
- [Short Wide Aligned Left](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--short-wide-aligned-left)
|
|
144
|
+
- [Short Wide Aligned Right](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--short-wide-aligned-right)
|
|
145
|
+
- [Tall Narrow Aligned Top](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--tall-narrow-aligned-top)
|
|
146
|
+
- [Tall Narrow Aligned Bottom](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--tall-narrow-aligned-bottom)
|
|
147
|
+
- [With Readout](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--with-readout)
|
|
148
|
+
- [With Readout Enhanced](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--with-readout-enhanced)
|
|
149
|
+
- [With Readout Needle](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--with-readout-needle)
|
|
150
|
+
- [Wide Advice Span](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--wide-advice-span)
|
|
151
|
+
- [Label Room — Mixed 2/4-Digit Flex Row (#1021)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--label-room-four-digit-row): The issue #1021 repro: four gauges squeezed in a flex dashboard row. Each dial automatically reserves room for its own labels, so the 4-digit RPM scale gets a wider margin (and a slightly smaller ring) than its 2-digit siblings — nothing is clipped. To keep the rings the same size instead, give every gauge the same `faceDiameter` — see the *Equal Circumference* stories. Try the *Sizing Playground* story to explore interactively.
|
|
152
|
+
- [Label Room — Hide Past Reserve Cap (#1021)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--label-room-degradation-row): The same row squeezed below the label-reserve cap (`LABEL_RESERVE_MAX_FRACTION` in `svghelpers/radial-frame.ts`): when labels would eat more than ~45% of the box, they are hidden entirely instead of clipped — matching the canvas charts' graceful degradation. The threshold is content-aware: 2-digit labels survive smaller cells than 4-digit ones.
|
|
153
|
+
- [Equal Circumference — Same FaceDiameter Across Sectors](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--equal-circumference-mixed-arcs): `faceDiameter` pins the outer-ring diameter in px, so all four sectors (270°, 180°, 90°-left, 90°-right) render with identical ring circumference while their boxes differ per arc shape — the radial counterpart of `obc-donut-chart`'s fixed-height ⇒ fixed-circumference contract. Use the `faceDiameter` control to scale all of them together.
|
|
154
|
+
- [Equal Circumference — 2-Digit Vs 4-Digit, Same FaceDiameter](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--equal-circumference-mixed-digits): Two gauges with the same `faceDiameter` but different label widths: the rings are pixel-identical while the 4-digit gauge's box grows wider to hold its labels — the "equal circumference" answer to the unequal rings visible in the *Label Room* stories. Use the `faceDiameter` control to resize both.
|
|
155
|
+
- [Sizing Playground — FaceDiameter + Resizable (Manual)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--sizing-playground): Interactive sizing playground: drag the dashed box's bottom-right corner to resize it. The first gauge is pinned to a fixed intrinsic size by the `faceDiameter` control (donut-chart `fixedHeight` behavior), while the 4-digit gauge and the 180° sector adapt to the remaining flex space, reserving label room adaptively (the *Label Room* stories). Enable `lockFaceDiameter` to pin all three to the same circumference — full circle and partial arcs alike (the *Equal Circumference* stories). The same behavior is available on every radial instrument — see the *Sizing Playground* stories under Building Blocks/Watch, Building Blocks/Instrument Radial, Instruments/Speed Gauge, Instruments/Compass, etc.
|
|
156
|
+
- [Label Room — Tall Narrow 4-Digit (#1021)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--label-room-tall-narrow): A 4-digit scale in a narrow column: the reserve is driven by the binding axis (here the width), so the labels stay readable while the ring shrinks.
|
|
157
|
+
- [Label Room — Inside Labels Keep The Base Box (#1021)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-radial--label-room-inside-labels): With `tickmarksInside` the labels live inside the ring, so no outside reserve is needed — the dial keeps the full legacy box at any label width.
|
|
158
|
+
|
|
159
|
+
## See also
|
|
160
|
+
|
|
161
|
+
- [Advice System](https://openbridge-next-storybook.web.app/docs/introduction-advice-system.md)
|
|
162
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
163
|
+
- [Building Blocks/Advice](https://openbridge-next-storybook.web.app/docs/building-blocks-advice.md)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# `<obc-gauge-trend-indicator>`
|
|
2
|
+
|
|
3
|
+
A compact gauge-trend indicator with fill and point variants.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/indicators-gauge-trend-indicator--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/gauge-trend-indicator/gauge-trend-indicator.ts)
|
|
6
|
+
|
|
7
|
+
`<obc-gauge-trend-indicator>` – A compact gauge-trend indicator with fill and point variants.
|
|
8
|
+
|
|
9
|
+
Renders a fixed 48 x 48 indicator derived from the gauge-trend instrument,
|
|
10
|
+
using a smooth trend graph, filled area, and a compact current-value cue on
|
|
11
|
+
the right edge.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **Gauge-trend scaling**: chart values use `chartMinValue`/`chartMaxValue`
|
|
16
|
+
and fall back to `minValue`/`maxValue` like the larger trend instrument.
|
|
17
|
+
- **Current-value cue**: `value` drives the right-edge indicator and falls
|
|
18
|
+
back to the last chart point when omitted.
|
|
19
|
+
- **Compact variants**: `Fill` renders a right-edge fill aligned to the
|
|
20
|
+
frame border and `Point` renders a circular current-value marker.
|
|
21
|
+
- **Fixed footprint**: keeps a 48 x 48 layout suitable for instrument icons.
|
|
22
|
+
|
|
23
|
+
## Usage Guidelines
|
|
24
|
+
|
|
25
|
+
- Use `type="Fill"` when the current value should read as a compact level bar.
|
|
26
|
+
- Use `type="Point"` when the current value should be highlighted by marker.
|
|
27
|
+
- Use `chartMinValue` and `chartMaxValue` when the graph should use a
|
|
28
|
+
different range than the right-edge value indicator.
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
| Property | Attribute | Type | Default | Description |
|
|
33
|
+
| --- | --- | --- | --- | --- |
|
|
34
|
+
| type | type | `ObcGaugeTrendIndicatorType` | | |
|
|
35
|
+
| data | data | `number[]` | `[]` | |
|
|
36
|
+
| minValue | minValue | `number` | `0` | |
|
|
37
|
+
| maxValue | maxValue | `number` | `100` | |
|
|
38
|
+
| chartMinValue | chartMinValue | `number \| undefined` | `undefined` | |
|
|
39
|
+
| chartMaxValue | chartMaxValue | `number \| undefined` | `undefined` | |
|
|
40
|
+
| value | value | `number \| undefined` | `undefined` | |
|
|
41
|
+
|
|
42
|
+
## Events
|
|
43
|
+
|
|
44
|
+
None.
|
|
45
|
+
|
|
46
|
+
## Slots
|
|
47
|
+
|
|
48
|
+
None.
|
|
49
|
+
|
|
50
|
+
## Stories
|
|
51
|
+
|
|
52
|
+
- [Fill](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-trend-indicator--fill)
|
|
53
|
+
- [Point](https://openbridge-next-storybook.web.app/?path=/story/indicators-gauge-trend-indicator--point)
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# `<obc-gauge-trend>`
|
|
2
|
+
|
|
3
|
+
Gauge Trend - A navigation instrument combining a line/area chart with an integrated vertical scale.
|
|
4
|
+
|
|
5
|
+
Lifecycle: stable. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/instruments-gauge-trend--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/navigation-instruments/gauge-trend/gauge-trend.ts)
|
|
6
|
+
|
|
7
|
+
Gauge Trend - A navigation instrument combining a line/area chart with an integrated vertical scale.
|
|
8
|
+
|
|
9
|
+
This is a high-level, self-contained component that combines:
|
|
10
|
+
- A line/area chart (based on `ObcChartLineBase`) with configurable fill mode
|
|
11
|
+
- An integrated vertical scale (`obc-bar-vertical`) on the right side
|
|
12
|
+
|
|
13
|
+
The component is designed for displaying time-series or categorical trend data alongside a calibrated
|
|
14
|
+
vertical measurement scale, commonly used in maritime navigation instruments.
|
|
15
|
+
|
|
16
|
+
## Architecture
|
|
17
|
+
|
|
18
|
+
Internally composed of:
|
|
19
|
+
- **Base**: `ObcChartLineBase` (line/area graph functionality)
|
|
20
|
+
- **Right scale**: `obc-bar-vertical` (external scale component)
|
|
21
|
+
|
|
22
|
+
## Locked Configuration (not user-configurable)
|
|
23
|
+
- Fixed aspect ratio scaling: always enabled
|
|
24
|
+
- Instrument mode: always enabled (8px border radius)
|
|
25
|
+
- X-axis type: auto-detected — 'category' for `{label, value}` data,
|
|
26
|
+
'time' for `{x, value}` data (uneven intervals position proportionally).
|
|
27
|
+
Assigning `xAxisType` explicitly disables auto-detection.
|
|
28
|
+
- Line mode: always 'smooth'
|
|
29
|
+
- Grid, tick marks, points, legend: always hidden
|
|
30
|
+
- Scale advice position: always 'inner'
|
|
31
|
+
- Scale state: automatically inherits from `state` property
|
|
32
|
+
|
|
33
|
+
## Usage Examples
|
|
34
|
+
|
|
35
|
+
### Basic gauge trend with default area fill
|
|
36
|
+
```html
|
|
37
|
+
<obc-gauge-trend
|
|
38
|
+
.data=${[
|
|
39
|
+
{label: 'Jan', value: 3.5},
|
|
40
|
+
{label: 'Feb', value: 4.2},
|
|
41
|
+
{label: 'Mar', value: 5.0}
|
|
42
|
+
]}
|
|
43
|
+
.minValue=${3}
|
|
44
|
+
.maxValue=${7}
|
|
45
|
+
.value=${5}
|
|
46
|
+
.width=${480}
|
|
47
|
+
.height=${480}
|
|
48
|
+
></obc-gauge-trend>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Line-only (no fill) - default
|
|
52
|
+
```html
|
|
53
|
+
<obc-gauge-trend
|
|
54
|
+
.data=${chartData}
|
|
55
|
+
></obc-gauge-trend>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### With area fill
|
|
59
|
+
```html
|
|
60
|
+
<obc-gauge-trend
|
|
61
|
+
.chartFill=${true}
|
|
62
|
+
.data=${chartData}
|
|
63
|
+
></obc-gauge-trend>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### With enhanced colors and setpoint
|
|
67
|
+
```html
|
|
68
|
+
<obc-gauge-trend
|
|
69
|
+
.enhanced=${true}
|
|
70
|
+
.state=${'in-command'}
|
|
71
|
+
.setpoint=${5.5}
|
|
72
|
+
.value=${5.2}
|
|
73
|
+
.hasBar=${true}
|
|
74
|
+
.hasScale=${true}
|
|
75
|
+
></obc-gauge-trend>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### With advice overlays
|
|
79
|
+
```html
|
|
80
|
+
<obc-gauge-trend
|
|
81
|
+
.hasAdvice=${true}
|
|
82
|
+
.advice=${[
|
|
83
|
+
{min: 3, max: 5, type: 'caution', hinted: true},
|
|
84
|
+
{min: 6, max: 7, type: 'advice', hinted: false}
|
|
85
|
+
]}
|
|
86
|
+
></obc-gauge-trend>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Reversed scale (0 at the top, values grow downward)
|
|
90
|
+
```html
|
|
91
|
+
<obc-gauge-trend
|
|
92
|
+
.reverse=${true}
|
|
93
|
+
.minValue=${0}
|
|
94
|
+
.maxValue=${75}
|
|
95
|
+
.value=${65.3}
|
|
96
|
+
.chartFill=${true}
|
|
97
|
+
.hasScale=${true}
|
|
98
|
+
.data=${samples}
|
|
99
|
+
></obc-gauge-trend>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Several series, a now-line and a value line
|
|
103
|
+
`datasets`, `xMarker` and `yMarker` come from the chart base: explicit
|
|
104
|
+
Chart.js styling on a dataset (`borderDash`, `fill`, `ellipseClip`…) wins
|
|
105
|
+
over the derived defaults, and the markers follow the first dataset's colour.
|
|
106
|
+
```html
|
|
107
|
+
<obc-gauge-trend
|
|
108
|
+
.xAxisType=${'number'}
|
|
109
|
+
.xAxis=${{min: -200, max: 200}}
|
|
110
|
+
.datasets=${[history, {label: 'Prediction', data, borderDash: [8, 4]}]}
|
|
111
|
+
.xMarker=${{x: 0}}
|
|
112
|
+
></obc-gauge-trend>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Time-based data with uneven intervals
|
|
116
|
+
```html
|
|
117
|
+
<obc-gauge-trend
|
|
118
|
+
.data=${[
|
|
119
|
+
{x: '2026-07-06T10:00:00Z', value: 3.5},
|
|
120
|
+
{x: '2026-07-06T10:03:00Z', value: 4.2},
|
|
121
|
+
{x: '2026-07-06T10:15:00Z', value: 5.0}
|
|
122
|
+
]}
|
|
123
|
+
></obc-gauge-trend>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
Setpoint properties are inherited from SetpointMixin.
|
|
128
|
+
These are forwarded to the internal `obc-bar-vertical` scale:
|
|
129
|
+
`setpoint`, `newSetpoint`, `touching`, `atSetpoint`, `autoAtSetpoint`,
|
|
130
|
+
`autoAtSetpointDeadband`, `setpointAtZeroDeadband`, `setpointOverride`.
|
|
131
|
+
See SetpointMixinInterface for full documentation.
|
|
132
|
+
|
|
133
|
+
## Properties
|
|
134
|
+
|
|
135
|
+
| Property | Attribute | Type | Default | Description |
|
|
136
|
+
| --- | --- | --- | --- | --- |
|
|
137
|
+
| highlightCurrentValue | | `boolean \| undefined` | | Shows the dot at the value on the vertical scale. Left unset, the dot shows while `hasBar` is false. |
|
|
138
|
+
| scaleType | scaleType | `ScaleType` | | Vertical scale type: `regular` (default) uses the standard tick lengths, `condensed` the shorter ones for a compact display. Available when `hasScale==true`. |
|
|
139
|
+
| minValue | minValue | `number` | `0` | Minimum value for the scale range. Also used as chart y-axis minimum when `chartMinValue` is undefined. |
|
|
140
|
+
| maxValue | maxValue | `number` | `100` | Maximum value for the scale range. Also used as chart y-axis maximum when `chartMaxValue` is undefined. |
|
|
141
|
+
| chartMinValue | chartMinValue | `number \| undefined` | `undefined` | Minimum value for the chart y-axis. When undefined, defaults to `minValue` to keep chart and scale aligned. |
|
|
142
|
+
| chartMaxValue | chartMaxValue | `number \| undefined` | `undefined` | Maximum value for the chart y-axis. When undefined, defaults to `maxValue` to keep chart and scale aligned. |
|
|
143
|
+
| reverse | reverse | `boolean` | `false` | Plot `minValue` at the top and grow downward, on both the chart y axis and the vertical scale. The chart fill still reaches the visual bottom. |
|
|
144
|
+
| value | value | `number \| undefined` | `undefined` | Current value on the vertical scale, and the only property most callers set: it drives the bar fill level when `hasBar` is true, the dot indicator position when it is false, and `fillMax` when that is left unset. Available when `hasBar==true \|\| hasScale==true`. |
|
|
145
|
+
| hasBar | hasBar | `boolean` | `false` | Show bar on the vertical scale. When `true`, displays a filled bar indicating the current value. When `false`, a dot indicator is automatically shown at the value position instead. |
|
|
146
|
+
| hasScale | hasScale | `boolean` | `false` | Show scale tick marks and labels. |
|
|
147
|
+
| showMainTickmarkLabels | showMainTickmarkLabels | `boolean` | `false` | Label only the main tickmarks (min / 0 / max) on the vertical scale instead of the primary ladder. Available when `hasScale==true`. |
|
|
148
|
+
| hasAdvice | hasAdvice | `boolean` | `false` | Show advice overlays on the vertical scale. |
|
|
149
|
+
| fillMode | fillMode | `FillMode` | | Bar fill mode, both measured from `fillMin` as the origin: `fill` runs to `value` so the bar tracks the reading and `fillMax` is ignored, while `tint` runs to `fillMax` for a fixed highlighted range independent of the reading. Available when `hasBar==true && value!=undefined`. |
|
|
150
|
+
| fillMin | fillMin | `number` | `0` | Fill origin value - the starting point for the bar fill. In both fill modes, the bar fills from this value toward the current value. For scales like -100..100, set this to 0 to have the bar fill up or down from zero. Available when `hasBar==true && value!=undefined`. |
|
|
151
|
+
| fillMax | fillMax | `number \| undefined` | `undefined` | Maximum fill value for the bar (only used in `'tint'` mode). In `'fill'` mode, this property is **ignored** — the bar always fills to `value`. In `'tint'` mode, this defines the upper bound of the highlighted range. When `undefined`, defaults to `value`. Available when `hasBar==true && value!=undefined && fillMode==tint`. |
|
|
152
|
+
| advice | | `AdviceInput[] \| undefined` | | Advice/alert overlays for the vertical scale. Available when `hasAdvice==true`. |
|
|
153
|
+
| primaryTickmarkInterval | primaryTickmarkInterval | `number \| undefined` | `undefined` | Primary tick interval for the vertical scale (longest ticks with labels). |
|
|
154
|
+
| secondaryTickmarkInterval | secondaryTickmarkInterval | `number` | `0.5` | Secondary tick interval for the vertical scale (medium ticks). Available when `hasScale==true`. |
|
|
155
|
+
| tertiaryTickmarkInterval | tertiaryTickmarkInterval | `number \| undefined` | `undefined` | Tertiary tick interval for the vertical scale (shortest ticks). Available when `hasScale==true`. |
|
|
156
|
+
| chartFill | chartFill | `boolean` | `false` | Enable chart area fill. When true, fills the area under the line with semitransparent color. When false (default), renders as line-only chart. |
|
|
157
|
+
| legend | legend | `boolean` | `false` | Show HTML legend below chart with series labels and colors. |
|
|
158
|
+
| showDebugOverlay | showDebugOverlay | `boolean` | `false` | Development mode: show visual debug overlay with dimension guides. |
|
|
159
|
+
| showGrid | showGrid | `boolean` | `false` | Show grid lines. |
|
|
160
|
+
| showTickMarks | showTickMarks | `boolean` | `false` | Show axis tick marks and labels. |
|
|
161
|
+
| showPoints | showPoints | `boolean` | `false` | Show point markers on data points. Default: false. |
|
|
162
|
+
| xAxisType | xAxisType | `XAxisType` | | X-axis mode: 'category' for labeled, evenly spaced data points; 'time' for time-based data positioned proportionally; 'number' for plain numeric x-values. |
|
|
163
|
+
| yAxisPosition | yAxisPosition | `YAxisPosition` | | Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. |
|
|
164
|
+
| lineMode | lineMode | `LineMode` | | Line drawing style: 'smooth' (curved), 'straight', or 'stepped'. |
|
|
165
|
+
| unit | unit | `string` | `''` | Unit label displayed in tooltips (e.g., 'kW', 'kg', '%'). |
|
|
166
|
+
| timeDisplay | timeDisplay | `TimeDisplay` | | Time axis label format: 'date' (full date/time) or 'minutes' (relative). Available when `xAxisType==time`. |
|
|
167
|
+
| fixedAspectRatioScaling | fixedAspectRatioScaling | `boolean` | `true` | Enable fixed aspect ratio scaling mode. When true, width/height properties define the aspect ratio (not actual pixels). The component fills 100% of parent width and calculates height from aspect ratio. When false (default), width/height are used as actual pixel dimensions. |
|
|
168
|
+
| instrumentMode | instrumentMode | `boolean` | `true` | When true, the chart is used inside an instrument (e.g., gauge-trend). In this mode, only label font size responds to .obc-component-size-* CSS classes. Border radius uses the explicit `borderRadius` property value (or defaults to 8px), rather than reading from CSS variables. |
|
|
169
|
+
| borderRadius | borderRadius | `number \| undefined` | `8` | Explicit border radius value in pixels. When instrumentMode=true, this value is used directly (defaults to 8px). When instrumentMode=false, this is ignored and border radius is read from CSS variable. Available when `instrumentMode==true`. |
|
|
170
|
+
| borderRadiusPosition | borderRadiusPosition | `BorderRadiusPosition \| undefined` | `undefined` | Border radius position for the chart's own border. |
|
|
171
|
+
| borderRadiusPositionExternalScales | borderRadiusPositionExternalScales | `BorderRadiusPosition \| undefined` | `undefined` | Border radius position for external scales based on layout. |
|
|
172
|
+
| yAxes | | `ChartLineYAxisConfig[] \| undefined` | `[ { id: 'y', position: 'left', min: this.chartMinValue ?? this.minValue, max: this.chartMaxValue ?? this.maxValue, reverse: this.reverse, }, ]` | Multiple y-axis definitions for complex multi-axis charts. Each entry accepts `min`/`max` to pin the range and `reverse` to plot `min` at the top; the primary axis' `reverse` cascades to slotted left/right scales. |
|
|
173
|
+
| setpoint | setpoint | `number \| undefined` | | Target setpoint value. `undefined` = no setpoint marker shown. |
|
|
174
|
+
| newSetpoint | newSetpoint | `number \| undefined` | | Adjustment preview for 2-step interface. When defined, two markers are shown: original (dimmed) + new (focus). Available when `setpoint!=undefined`. |
|
|
175
|
+
| atSetpoint | | `boolean` | `false` | Manual at-setpoint override (used when `autoAtSetpoint` is false). Available when `setpoint!=undefined && autoAtSetpoint==false`. |
|
|
176
|
+
| touching | touching | `boolean` | `false` | User is physically interacting with the control. Suppresses at-setpoint calculation and triggers focus visual. Available when `setpoint!=undefined`. |
|
|
177
|
+
| autoAtSetpoint | | `boolean` | `true` | When false, uses manual `atSetpoint` boolean instead of auto-calculation. Available when `setpoint!=undefined`. |
|
|
178
|
+
| autoAtSetpointDeadband | autoAtSetpointDeadband | `number` | `defaultDeadband` | Tolerance for auto at-setpoint detection. Available when `setpoint!=undefined && autoAtSetpoint==true`. |
|
|
179
|
+
| setpointAtZeroDeadband | setpointAtZeroDeadband | `number` | `defaultZeroDeadband` | Tolerance for zero-snap visual state. Available when `setpoint!=undefined`. |
|
|
180
|
+
| setpointOverride | setpointOverride | `boolean` | `false` | Override to derive the setpoint color from the instrument's `priority` regardless of instrument state. Available when `setpoint!=undefined`. |
|
|
181
|
+
| animateSetpoint | animateSetpoint | `boolean` | `false` | Enable CSS-animated confirm transition. Available when `setpoint!=undefined`. |
|
|
182
|
+
| departingNewSetpoint | | `number \| undefined` | | Public getter for renderers/wrappers to access the departing value. |
|
|
183
|
+
| advices | advices | `AdviceInput[]` | `[]` | Advice ranges and points in the instrument's unit; see `svghelpers/advice.ts`. |
|
|
184
|
+
| adviceTrigger | adviceTrigger | `AdviceTrigger` | | Which readings trigger an advice: the value, the setpoint, or either. Available when `adviceTrigger advices!=[]`. |
|
|
185
|
+
| adviceEmphasis | adviceEmphasis | `boolean` | `false` | The design's go-to / no-go emphasis rules. Available when `adviceEmphasis advices!=[]`. |
|
|
186
|
+
| data | | `ChartLineDataItem[]` | `[]` | Simple single-series data. `{label, value}` items for the category axis; `{x, value}` items for time/number axes (x: epoch ms, ISO string, Date, or Temporal object). Points are drawn in array order (no sorting). |
|
|
187
|
+
| datasets | | `ChartLineDataset[] \| undefined` | `undefined` | Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. Explicit Chart.js styling on an entry (`borderColor`, `backgroundColor`, `borderDash`, `borderCapStyle`, `fill`, `order`, `pointRadius`) wins over the derived defaults (`fill: true` selects the chart's own `'start'`); `ellipseClip` clips the entry's drawing to an ellipse: centre and `rx` in data units, `ry` in data units when given, else round in pixels. |
|
|
188
|
+
| labels | | `(string \| number)[] \| undefined` | `undefined` | Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` |
|
|
189
|
+
| colors | | `string[]` | `[]` | Custom color palette (CSS variable names or color strings). |
|
|
190
|
+
| width | width | `number` | `480` | Width of the chart in pixels. Default: 480. |
|
|
191
|
+
| height | height | `number` | `320` | Height of the chart in pixels. Default: 320. |
|
|
192
|
+
| scaleReferenceSize | scaleReferenceSize | `number` | `384` | Reference size for external scales when using fixedAspectRatioScaling. This value is passed down to external scales to determine their 1:1 Figma design size. At this reference size, scales render at native size; above/below they scale proportionally. Default: 384 (matches Figma design baseline). |
|
|
193
|
+
| xAxis | | `ChartLineXAxisConfig \| undefined` | `undefined` | Pinned x range (`min`/`max`) for time and number axes. Without it the axis spans exactly the data, so a window that is still filling stretches across the full width. In `minutes` display `max` is the `0min` reference. Available when `xAxisType!=category`. |
|
|
194
|
+
| xMarker | | `ChartLineXMarker \| undefined` | `undefined` | Vertical marker at an x value: solid from the plot top to the dataset's value there (`datasetIndex`, default 0), dotted below it, with a dot on the value unless `showDot` is false. Drawn in the dataset's line colour. |
|
|
195
|
+
| yMarker | | `ChartLineYMarker \| undefined` | `undefined` | Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). |
|
|
196
|
+
| showGridX | showGridX | `boolean` | `false` | Show vertical grid lines (x-axis). Default: false. Available when `showGrid==true`. |
|
|
197
|
+
| showGridY | showGridY | `boolean` | `false` | Show horizontal grid lines (y-axis). Default: false. Available when `showGrid==true`. |
|
|
198
|
+
| hasLabelPadding | | `boolean` | `true` | Reserves canvas padding for axis tick labels on the sides that have no slotted external scale. `false` renders those sides edge-to-edge and hides the tick labels so they cannot be clipped, and it also suppresses the automatic edge-to-edge switch below the 192px threshold, removing the padding jump at that crossing. Set it when a host owns the framing and never wants axis labels, as `obc-automation-tank` does. |
|
|
199
|
+
| rangeLabels | rangeLabels | `RangeLabels` | | Labels kept below the 192px threshold, where the axis labels are otherwise hidden: 'y' draws min, max and (inside the range) 0 in a gutter on the y-axis side; 'x' draws the first and last x value in a bottom gutter; 'xy' both. Ignored when `hasLabelPadding` is false. Available when `hasLabelPadding==true`. |
|
|
200
|
+
| xTicksLimit | xTicksLimit | `number \| undefined` | `undefined` | Max number of x-axis ticks/grid lines. Useful for matching external axes. |
|
|
201
|
+
| xStepSize | xStepSize | `number \| undefined` | `undefined` | Force x-axis tick interval. Useful for matching external axes. |
|
|
202
|
+
| yTicksLimit | yTicksLimit | `number \| undefined` | `undefined` | Max number of y-axis ticks/grid lines. Useful for matching external axes. |
|
|
203
|
+
| yStepSize | yStepSize | `number \| undefined` | `undefined` | Force y-axis tick interval. Useful for matching external axes. |
|
|
204
|
+
| state | state | `InstrumentState` | | Instrument state affecting colors of external scales. |
|
|
205
|
+
| priority | priority | `Priority` | | Color priority: enhanced uses blue palette instead of default gray. |
|
|
206
|
+
| frameStyle | frameStyle | `FrameStyle` | | Frame style for chart and external scales. |
|
|
207
|
+
| lastMarkers | | `{x?: {x: number; y?: number; dot: boolean}; y?: {y: number}}` | `{}` | |
|
|
208
|
+
|
|
209
|
+
## Events
|
|
210
|
+
|
|
211
|
+
None.
|
|
212
|
+
|
|
213
|
+
## Slots
|
|
214
|
+
|
|
215
|
+
None.
|
|
216
|
+
|
|
217
|
+
## Stories
|
|
218
|
+
|
|
219
|
+
- [Gauge Trend (default, scaleReferenceSize=384)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend)
|
|
220
|
+
- [Compact With Range Labels (160px)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--compact-range-labels)
|
|
221
|
+
- [Uneven Time Intervals (Auto Time Axis)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--uneven-time-intervals)
|
|
222
|
+
- [Using ScaleReferenceSize=240](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend-scale-reference-size)
|
|
223
|
+
- [Scale Reference Size Comparison](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--scale-reference-size-comparison): This story demonstrates how `scaleReferenceSize` works with `fixedAspectRatioScaling=true`.
|
|
224
|
+
|
|
225
|
+
Three panels showing the same gauge-trend configuration:
|
|
226
|
+
- **Left**: `scaleReferenceSize=240` at 240px container (1:1 with Figma design)
|
|
227
|
+
- **Center**: `scaleReferenceSize=240` at 384px container (scaled up 1.6×)
|
|
228
|
+
- **Right**: `scaleReferenceSize=384` at 384px container (1:1 with Figma design)
|
|
229
|
+
|
|
230
|
+
Notice how the left and right panels show the "native" size where the design matches
|
|
231
|
+
Figma 1:1, while the center panel shows the same 240px design scaled up to fit 384px.
|
|
232
|
+
- [Without Scale](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend-without-scale)
|
|
233
|
+
- [Without Bar (scale only)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend-without-bar)
|
|
234
|
+
- [With Advice Overlays](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend-with-advice)
|
|
235
|
+
- [With Advice Areas](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend-with-advice-area)
|
|
236
|
+
- [Custom Scale Range (25-75)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend-custom-scale-range): Demonstrates a non-standard scale range (25-75) that fits the SAMPLE_DATA values (28-68).
|
|
237
|
+
|
|
238
|
+
This story shows:
|
|
239
|
+
- Custom scale range that isn't 0-100 or -100..100
|
|
240
|
+
- Chart y-axis automatically inherits from minValue/maxValue (no chartMinValue/chartMaxValue needed)
|
|
241
|
+
- Advice overlays positioned within the custom range
|
|
242
|
+
- Tint fill mode showing a specific value range
|
|
243
|
+
|
|
244
|
+
The SAMPLE_DATA values naturally fit within this 25-75 range, demonstrating
|
|
245
|
+
how gauge-trend can be configured for domain-specific measurements.
|
|
246
|
+
- [Labels Only (no bar, condensed scale)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend-labels-only)
|
|
247
|
+
- [Fixed Aspect Ratio Scaling Comparison](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--fixed-aspect-ratio-scaling-comparison): This story demonstrates the difference between:
|
|
248
|
+
|
|
249
|
+
- **Left**: `fixedAspectRatioScaling=false` — using raw area-graph with slotted bar-vertical
|
|
250
|
+
- **Right**: `fixedAspectRatioScaling=true` — using gauge-trend (which locks this to true internally)
|
|
251
|
+
|
|
252
|
+
Use the width/height controls to change the aspect ratio. Drag container corners to resize.
|
|
253
|
+
- Left: Chart and scale stay at fixed pixel sizes regardless of container size. NOTE: this is not 'Gauge-trend' but a simple chart+vertical bar in a slot.
|
|
254
|
+
- Right: Chart fills container width, scale proportionally adjusts based on reference size
|
|
255
|
+
- [Realtime (shifting)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--realtime-shifting): This story demonstrates realtime data shifting with three different visual configurations:
|
|
256
|
+
|
|
257
|
+
- **Left**: With bar (enhanced mode, tint fill)
|
|
258
|
+
- **Center**: Without bar (scale only, with current value dot)
|
|
259
|
+
- **Right**: Condensed scale (labels only, with current value dot)
|
|
260
|
+
|
|
261
|
+
All three use the same shifting logic and data updates.
|
|
262
|
+
- [Depth Profile (Reversed Scale, 0 at Top)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--depth-profile): `reverse` plots `minValue` at the top on both the chart and the vertical scale, so depth is fed as positive numbers. The chart fill reaches the seabed side; the bar fills from the surface (`fillMin: 0`) down to the current depth.
|
|
263
|
+
- [Datasets and Markers (Dashed Prediction, Now Line)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--datasets-and-markers): Two `datasets` on a number x axis: the history and a dashed prediction ahead of the vessel. `xMarker` puts the now-line and its dot at x = 0, `yMarker` the current depth across the plot. The scale is reversed so 0 sits at the top.
|
|
264
|
+
- [Min Max Labels (no ladder, dot in the band)](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--min-max-labels): `showMainTickmarkLabels` with no tick intervals labels only the ends of the scale; the band keeps the current-value dot.
|
|
265
|
+
- [With Advice Icons](https://openbridge-next-storybook.web.app/?path=/story/instruments-gauge-trend--gauge-trend-with-advice-icons): The chart's bands with their icons in the scale's label column, the caution band triggered.
|
|
266
|
+
|
|
267
|
+
## See also
|
|
268
|
+
|
|
269
|
+
- [Advice System](https://openbridge-next-storybook.web.app/docs/introduction-advice-system.md)
|
|
270
|
+
- [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
|
|
271
|
+
- [Migration Guide 2.1 to 2.2](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide-2-1-to-2-2.md)
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# `<obc-gauge-valve>`
|
|
2
|
+
|
|
3
|
+
Radial position gauge for analog valves.
|
|
4
|
+
|
|
5
|
+
Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/automation-instruments-gauge-valve--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/automation/gauge-valve/gauge-valve.ts)
|
|
6
|
+
|
|
7
|
+
Radial position gauge for analog valves.
|
|
8
|
+
|
|
9
|
+
An `obc-watch` face with one track arc per port (90° sweep for two-way,
|
|
10
|
+
60° for three-way) whose fill bar shows the flow through that port, and a
|
|
11
|
+
center slot for an actuator icon. Tracks, bars, cap pills, scale and
|
|
12
|
+
setpoint are all watch inputs.
|
|
13
|
+
|
|
14
|
+
## Features / Variants
|
|
15
|
+
- `type`: two-way (left + right tracks) or three-way (adds a bottom track)
|
|
16
|
+
- `large`: adds a scale with tick labels, a setpoint marker, and a value
|
|
17
|
+
readout; the compact default instead shows the shared readout stack
|
|
18
|
+
below the face with a percentage readout per port
|
|
19
|
+
- `priority`: colour emphasis of the value graphics — `regular` (default),
|
|
20
|
+
`enhanced`, `medium`, or `off`. `off` blanks the tracks, bars and caps on
|
|
21
|
+
a flat disc, disables the setpoint marker, and replaces the value readout
|
|
22
|
+
with an "Off" state row; consumers should also swap the slotted actuator
|
|
23
|
+
icon to its closed/off variant when setting `priority` to `off`
|
|
24
|
+
- `barStyle`: `tint` (default) fills the bar with the priority's tint
|
|
25
|
+
colour and marks the fill edges with strong cap pills; `fill` paints the
|
|
26
|
+
bar in the strong colour with square value edges, no cap pills (matching
|
|
27
|
+
the fill mode of `obc-bar-vertical` and `obc-gauge-radial`)
|
|
28
|
+
- `scalePosition`: rotates the whole layout in 90° steps; consumers slot
|
|
29
|
+
the orientation-matched actuator icon variant
|
|
30
|
+
- Setpoint support via the shared setpoint API (`setpoint`, `newSetpoint`,
|
|
31
|
+
confirm animation included)
|
|
32
|
+
- `hasLabelStack`: toggles the compact-variant readout stack (an optional
|
|
33
|
+
setpoint row, one value row per port, plus an optional `tag` identifier
|
|
34
|
+
line); has no effect when `large`
|
|
35
|
+
|
|
36
|
+
## Sizing
|
|
37
|
+
The face contain-fits both axes of the host (the largest square that fits;
|
|
38
|
+
the compact label stack keeps its fixed text size below the face), like the
|
|
39
|
+
other radial instruments. Set `faceDiameter` to pin the ring to a fixed
|
|
40
|
+
pixel diameter instead — instruments sharing a `faceDiameter` have equal
|
|
41
|
+
ring circumference regardless of variant, matching
|
|
42
|
+
`obc-gauge-proportional`. The frame geometry comes from the shared
|
|
43
|
+
`computeRadialFrame()`.
|
|
44
|
+
|
|
45
|
+
Readout text keeps a constant on-screen size (the instrument typography
|
|
46
|
+
contract), so the large variant hides its readout when the rendered ring
|
|
47
|
+
diameter drops below 192px (`CHART_DIMENSIONS.MIN_HEIGHT_WITH_LABELS`) —
|
|
48
|
+
the same small-size breakpoint the donut and pie charts use to drop their
|
|
49
|
+
center readouts and labels. Scale tick labels degrade separately via the
|
|
50
|
+
radial frame's `labelsHidden` reserve cap.
|
|
51
|
+
|
|
52
|
+
## Usage Guidelines
|
|
53
|
+
Use for analog valve position/flow visualization on overview displays. For
|
|
54
|
+
schematic (P&ID) placement with button behavior, use `obc-analog-valve`
|
|
55
|
+
instead.
|
|
56
|
+
|
|
57
|
+
## Slots
|
|
58
|
+
| Slot | Condition | Purpose |
|
|
59
|
+
| ------ | --------- | ---------------------------------------- |
|
|
60
|
+
| `icon` | always | Center actuator icon (`obi-*` component) |
|
|
61
|
+
|
|
62
|
+
## Properties
|
|
63
|
+
|
|
64
|
+
| Property | Attribute | Type | Default | Description |
|
|
65
|
+
| --- | --- | --- | --- | --- |
|
|
66
|
+
| type | type | `GaugeValveType` | | |
|
|
67
|
+
| priority | priority | `GaugeValvePriority` | | Colour emphasis of the value graphics (the Figma "Type" axis); `off` blanks them on a flat disc |
|
|
68
|
+
| barStyle | barStyle | `GaugeValveStyle` | | Bar rendering (the Figma "Style" axis): tint (default) shows a tint bar with strong cap pills, fill a strong bar without pills |
|
|
69
|
+
| scalePosition | scalePosition | `GaugeValveScalePosition` | | Rotates the whole layout — ports, scale, setpoint and readout side (the designs' two-way Direction / three-way Scale axis) |
|
|
70
|
+
| value | value | `number` | `0` | Through-flow of the right outlet port, 0-100 (%) |
|
|
71
|
+
| bottomValue | bottomValue | `number` | `0` | Bottom outlet flow, 0-100 (%). Available when `type==three-way`. |
|
|
72
|
+
| large | large | `boolean` | `false` | Show scale, labels, readout and setpoint layer |
|
|
73
|
+
| label | label | `string` | `''` | Readout label text. Available when `large==true`. |
|
|
74
|
+
| unit | unit | `string` | `''` | Readout unit text. Available when `large==true`. |
|
|
75
|
+
| tag | tag | `string` | `''` | Identifier line under the compact readout stack, e.g. '#0001'. Available when `large==false && hasLabelStack==true`. |
|
|
76
|
+
| hasLabelStack | | `boolean` | `true` | Render the readout stack below the face in the compact variant. Available when `large==false`. |
|
|
77
|
+
| faceDiameter | face-diameter | `number \| undefined` | | Ring diameter in CSS pixels. When set, the face renders at a fixed intrinsic size (equal circumference across instruments sharing the value); when unset (default), the face contain-fits its container. |
|
|
78
|
+
| setpoint | setpoint | `number \| undefined` | | Target setpoint value. `undefined` = no setpoint marker shown. |
|
|
79
|
+
| newSetpoint | newSetpoint | `number \| undefined` | | Adjustment preview for 2-step interface. When defined, two markers are shown: original (dimmed) + new (focus). Available when `setpoint!=undefined`. |
|
|
80
|
+
| atSetpoint | | `boolean` | `false` | Manual at-setpoint override (used when `autoAtSetpoint` is false). Available when `setpoint!=undefined && autoAtSetpoint==false`. |
|
|
81
|
+
| touching | touching | `boolean` | `false` | User is physically interacting with the control. Suppresses at-setpoint calculation and triggers focus visual. Available when `setpoint!=undefined`. |
|
|
82
|
+
| autoAtSetpoint | | `boolean` | `true` | When false, uses manual `atSetpoint` boolean instead of auto-calculation. Available when `setpoint!=undefined`. |
|
|
83
|
+
| autoAtSetpointDeadband | autoAtSetpointDeadband | `number` | `defaultDeadband` | Tolerance for auto at-setpoint detection. Available when `setpoint!=undefined && autoAtSetpoint==true`. |
|
|
84
|
+
| setpointAtZeroDeadband | setpointAtZeroDeadband | `number` | `defaultZeroDeadband` | Tolerance for zero-snap visual state. Available when `setpoint!=undefined`. |
|
|
85
|
+
| setpointOverride | setpointOverride | `boolean` | `false` | Override to derive the setpoint color from the instrument's `priority` regardless of instrument state. Available when `setpoint!=undefined`. |
|
|
86
|
+
| animateSetpoint | animateSetpoint | `boolean` | `false` | Enable CSS-animated confirm transition. Available when `setpoint!=undefined`. |
|
|
87
|
+
| departingNewSetpoint | | `number \| undefined` | | Public getter for renderers/wrappers to access the departing value. |
|
|
88
|
+
|
|
89
|
+
## Events
|
|
90
|
+
|
|
91
|
+
None.
|
|
92
|
+
|
|
93
|
+
## Slots
|
|
94
|
+
|
|
95
|
+
| Slot | Description |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| icon | Center actuator icon (`obi-*` component) |
|
|
98
|
+
|
|
99
|
+
## Stories
|
|
100
|
+
|
|
101
|
+
- [Default](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--default)
|
|
102
|
+
- [Three Way](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--three-way)
|
|
103
|
+
- [Two Way Large](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--two-way-large)
|
|
104
|
+
- [Three Way Large](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--three-way-large)
|
|
105
|
+
- [With Setpoint](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--with-setpoint)
|
|
106
|
+
- [Closed](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--closed)
|
|
107
|
+
- [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--enhanced)
|
|
108
|
+
- [Medium](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--medium)
|
|
109
|
+
- [Off State](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--off-state)
|
|
110
|
+
- [Tint Vs Fill](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--tint-vs-fill)
|
|
111
|
+
- [Sizing Playground — FaceDiameter + Resizable (Manual)](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--sizing-playground): Interactive sizing playground: size the dashed box with the width/height sliders or drag its bottom-right corner. The first valve is pinned to a fixed intrinsic size by the `faceDiameter` control while the large valves adapt to the remaining flex space. Enable `lockFaceDiameter` to pin all three to the same ring circumference — the same behavior as every other radial instrument (see the *Sizing Playground* stories under Instruments/Gauge Radial etc.).
|
|
112
|
+
- [Scale Left (Vertical Two Way)](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--scale-left-vertical)
|
|
113
|
+
- [Three Way Scale Right](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--three-way-scale-right)
|
|
114
|
+
- [Setpoint Confirm Animation](https://openbridge-next-storybook.web.app/?path=/story/automation-instruments-gauge-valve--setpoint-confirm-animation): `newSetpoint` runs the shared confirm animation (marker travels from `setpoint` to `newSetpoint` and back); excluded from visual baselines because the animation timing is nondeterministic.
|