@oicl/openbridge-webcomponents-svelte 2.0.0-next.157 → 2.0.0-next.158
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/dist/bars-graphs/area-graph/ObcAreaGraph.svelte +9 -7
- package/dist/bars-graphs/area-graph/ObcAreaGraph.svelte.d.ts +11 -7
- package/dist/bars-graphs/line-graph/ObcLineGraph.svelte +9 -7
- package/dist/bars-graphs/line-graph/ObcLineGraph.svelte.d.ts +11 -7
- package/dist/building-blocks/bar-horizontal/ObcBarHorizontal.svelte +2 -0
- package/dist/building-blocks/bar-horizontal/ObcBarHorizontal.svelte.d.ts +2 -0
- package/dist/building-blocks/bar-vertical/ObcBarVertical.svelte +2 -0
- package/dist/building-blocks/bar-vertical/ObcBarVertical.svelte.d.ts +2 -0
- package/dist/building-blocks/chart-line/ObcChartLineBase.svelte +9 -7
- package/dist/building-blocks/chart-line/ObcChartLineBase.svelte.d.ts +11 -7
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/navigation-instruments/depth/ObcDepth.svelte +123 -0
- package/dist/navigation-instruments/depth/ObcDepth.svelte.d.ts +111 -0
- package/dist/navigation-instruments/depth/ObcDepthTopBand.svelte +67 -0
- package/dist/navigation-instruments/depth/ObcDepthTopBand.svelte.d.ts +53 -0
- package/dist/navigation-instruments/depth-actual/ObcDepthActual.svelte +27 -5
- package/dist/navigation-instruments/depth-actual/ObcDepthActual.svelte.d.ts +26 -4
- package/dist/navigation-instruments/gauge-horizontal/ObcGaugeHorizontal.svelte +2 -0
- package/dist/navigation-instruments/gauge-horizontal/ObcGaugeHorizontal.svelte.d.ts +2 -0
- package/dist/navigation-instruments/gauge-trend/ObcGaugeTrend.svelte +17 -7
- package/dist/navigation-instruments/gauge-trend/ObcGaugeTrend.svelte.d.ts +19 -7
- package/dist/navigation-instruments/gauge-vertical/ObcGaugeVertical.svelte +2 -0
- package/dist/navigation-instruments/gauge-vertical/ObcGaugeVertical.svelte.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {ChartLineDataItem,
|
|
4
|
-
export type {ChartDataset} from 'chart.js';
|
|
3
|
+
export type {ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
5
4
|
export type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
6
5
|
export type {AreaFillMode} from '@oicl/openbridge-webcomponents/dist/bars-graphs/area-graph/area-graph.js';
|
|
7
6
|
import '@oicl/openbridge-webcomponents/dist/bars-graphs/area-graph/area-graph.js';
|
|
8
7
|
import { setProperties } from "../../util.js";
|
|
9
|
-
import type {ChartLineDataItem,
|
|
10
|
-
import type {ChartDataset} from 'chart.js';
|
|
8
|
+
import type {ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
11
9
|
import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
12
10
|
import type {AreaFillMode} from '@oicl/openbridge-webcomponents/dist/bars-graphs/area-graph/area-graph.js';
|
|
13
11
|
import type { Snippet } from 'svelte';
|
|
@@ -17,8 +15,8 @@ import type {AreaFillMode} from '@oicl/openbridge-webcomponents/dist/bars-graphs
|
|
|
17
15
|
style?: string;
|
|
18
16
|
/** 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). */
|
|
19
17
|
data?: ChartLineDataItem[];
|
|
20
|
-
/** Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. */
|
|
21
|
-
datasets?:
|
|
18
|
+
/** 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. */
|
|
19
|
+
datasets?: ChartLineDataset[] | undefined;
|
|
22
20
|
/** Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` */
|
|
23
21
|
labels?: (string | number)[] | undefined;
|
|
24
22
|
/** Custom color palette (CSS variable names or color strings). */
|
|
@@ -39,7 +37,7 @@ import type {AreaFillMode} from '@oicl/openbridge-webcomponents/dist/bars-graphs
|
|
|
39
37
|
xAxisType?: XAxisType;
|
|
40
38
|
/** Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. */
|
|
41
39
|
yAxisPosition?: YAxisPosition;
|
|
42
|
-
/** Multiple y-axis definitions for complex multi-axis charts. */
|
|
40
|
+
/** 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. */
|
|
43
41
|
yAxes?: ChartLineYAxisConfig[] | undefined;
|
|
44
42
|
/**
|
|
45
43
|
* 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.
|
|
@@ -47,6 +45,10 @@ import type {AreaFillMode} from '@oicl/openbridge-webcomponents/dist/bars-graphs
|
|
|
47
45
|
* Available when `xAxisType!=category`.
|
|
48
46
|
*/
|
|
49
47
|
xAxis?: ChartLineXAxisConfig | undefined;
|
|
48
|
+
/** 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. */
|
|
49
|
+
xMarker?: ChartLineXMarker | undefined;
|
|
50
|
+
/** Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). */
|
|
51
|
+
yMarker?: ChartLineYMarker | undefined;
|
|
50
52
|
/** Show grid lines. */
|
|
51
53
|
showGrid?: boolean;
|
|
52
54
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/bars-graphs/area-graph/area-graph.js';
|
|
2
|
-
import type { ChartLineDataItem,
|
|
3
|
-
import type { ChartDataset } from 'chart.js';
|
|
2
|
+
import type { ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay } from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
4
3
|
import type { InstrumentState, Priority, FrameStyle, BorderRadiusPosition } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
5
4
|
import type { AreaFillMode } from '@oicl/openbridge-webcomponents/dist/bars-graphs/area-graph/area-graph.js';
|
|
6
5
|
import type { Snippet } from 'svelte';
|
|
@@ -9,8 +8,8 @@ export interface Props {
|
|
|
9
8
|
style?: string;
|
|
10
9
|
/** 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). */
|
|
11
10
|
data?: ChartLineDataItem[];
|
|
12
|
-
/** Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. */
|
|
13
|
-
datasets?:
|
|
11
|
+
/** 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. */
|
|
12
|
+
datasets?: ChartLineDataset[] | undefined;
|
|
14
13
|
/** Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` */
|
|
15
14
|
labels?: (string | number)[] | undefined;
|
|
16
15
|
/** Custom color palette (CSS variable names or color strings). */
|
|
@@ -31,7 +30,7 @@ export interface Props {
|
|
|
31
30
|
xAxisType?: XAxisType;
|
|
32
31
|
/** Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. */
|
|
33
32
|
yAxisPosition?: YAxisPosition;
|
|
34
|
-
/** Multiple y-axis definitions for complex multi-axis charts. */
|
|
33
|
+
/** 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. */
|
|
35
34
|
yAxes?: ChartLineYAxisConfig[] | undefined;
|
|
36
35
|
/**
|
|
37
36
|
* 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.
|
|
@@ -39,6 +38,10 @@ export interface Props {
|
|
|
39
38
|
* Available when `xAxisType!=category`.
|
|
40
39
|
*/
|
|
41
40
|
xAxis?: ChartLineXAxisConfig | undefined;
|
|
41
|
+
/** 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. */
|
|
42
|
+
xMarker?: ChartLineXMarker | undefined;
|
|
43
|
+
/** Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). */
|
|
44
|
+
yMarker?: ChartLineYMarker | undefined;
|
|
42
45
|
/** Show grid lines. */
|
|
43
46
|
showGrid?: boolean;
|
|
44
47
|
/**
|
|
@@ -131,15 +134,16 @@ export interface Slots {
|
|
|
131
134
|
type $$ComponentProps = Props & Events & Slots;
|
|
132
135
|
declare const ObcAreaGraph: import("svelte").Component<$$ComponentProps, {
|
|
133
136
|
ChartLineDataItem: typeof ChartLineDataItem;
|
|
134
|
-
|
|
137
|
+
ChartLineDataset: typeof ChartLineDataset;
|
|
135
138
|
XAxisType: typeof XAxisType;
|
|
136
139
|
YAxisPosition: typeof YAxisPosition;
|
|
137
140
|
ChartLineYAxisConfig: typeof ChartLineYAxisConfig;
|
|
138
141
|
ChartLineXAxisConfig: typeof ChartLineXAxisConfig;
|
|
142
|
+
ChartLineXMarker: typeof ChartLineXMarker;
|
|
143
|
+
ChartLineYMarker: typeof ChartLineYMarker;
|
|
139
144
|
RangeLabels: typeof RangeLabels;
|
|
140
145
|
LineMode: typeof LineMode;
|
|
141
146
|
TimeDisplay: typeof TimeDisplay;
|
|
142
|
-
ChartDataset: typeof ChartDataset;
|
|
143
147
|
InstrumentState: typeof InstrumentState;
|
|
144
148
|
Priority: typeof Priority;
|
|
145
149
|
FrameStyle: typeof FrameStyle;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {ChartLineDataItem,
|
|
4
|
-
export type {ChartDataset} from 'chart.js';
|
|
3
|
+
export type {ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
5
4
|
export type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
6
5
|
import '@oicl/openbridge-webcomponents/dist/bars-graphs/line-graph/line-graph.js';
|
|
7
6
|
import { setProperties } from "../../util.js";
|
|
8
|
-
import type {ChartLineDataItem,
|
|
9
|
-
import type {ChartDataset} from 'chart.js';
|
|
7
|
+
import type {ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
10
8
|
import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
11
9
|
import type { Snippet } from 'svelte';
|
|
12
10
|
|
|
@@ -15,8 +13,8 @@ import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '
|
|
|
15
13
|
style?: string;
|
|
16
14
|
/** 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). */
|
|
17
15
|
data?: ChartLineDataItem[];
|
|
18
|
-
/** Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. */
|
|
19
|
-
datasets?:
|
|
16
|
+
/** 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. */
|
|
17
|
+
datasets?: ChartLineDataset[] | undefined;
|
|
20
18
|
/** Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` */
|
|
21
19
|
labels?: (string | number)[] | undefined;
|
|
22
20
|
/** Custom color palette (CSS variable names or color strings). */
|
|
@@ -37,7 +35,7 @@ import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '
|
|
|
37
35
|
xAxisType?: XAxisType;
|
|
38
36
|
/** Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. */
|
|
39
37
|
yAxisPosition?: YAxisPosition;
|
|
40
|
-
/** Multiple y-axis definitions for complex multi-axis charts. */
|
|
38
|
+
/** 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. */
|
|
41
39
|
yAxes?: ChartLineYAxisConfig[] | undefined;
|
|
42
40
|
/**
|
|
43
41
|
* 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.
|
|
@@ -45,6 +43,10 @@ import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '
|
|
|
45
43
|
* Available when `xAxisType!=category`.
|
|
46
44
|
*/
|
|
47
45
|
xAxis?: ChartLineXAxisConfig | undefined;
|
|
46
|
+
/** 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. */
|
|
47
|
+
xMarker?: ChartLineXMarker | undefined;
|
|
48
|
+
/** Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). */
|
|
49
|
+
yMarker?: ChartLineYMarker | undefined;
|
|
48
50
|
/** Show grid lines. */
|
|
49
51
|
showGrid?: boolean;
|
|
50
52
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/bars-graphs/line-graph/line-graph.js';
|
|
2
|
-
import type { ChartLineDataItem,
|
|
3
|
-
import type { ChartDataset } from 'chart.js';
|
|
2
|
+
import type { ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay } from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
4
3
|
import type { InstrumentState, Priority, FrameStyle, BorderRadiusPosition } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
5
4
|
import type { Snippet } from 'svelte';
|
|
6
5
|
export interface Props {
|
|
@@ -8,8 +7,8 @@ export interface Props {
|
|
|
8
7
|
style?: string;
|
|
9
8
|
/** 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). */
|
|
10
9
|
data?: ChartLineDataItem[];
|
|
11
|
-
/** Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. */
|
|
12
|
-
datasets?:
|
|
10
|
+
/** 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. */
|
|
11
|
+
datasets?: ChartLineDataset[] | undefined;
|
|
13
12
|
/** Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` */
|
|
14
13
|
labels?: (string | number)[] | undefined;
|
|
15
14
|
/** Custom color palette (CSS variable names or color strings). */
|
|
@@ -30,7 +29,7 @@ export interface Props {
|
|
|
30
29
|
xAxisType?: XAxisType;
|
|
31
30
|
/** Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. */
|
|
32
31
|
yAxisPosition?: YAxisPosition;
|
|
33
|
-
/** Multiple y-axis definitions for complex multi-axis charts. */
|
|
32
|
+
/** 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. */
|
|
34
33
|
yAxes?: ChartLineYAxisConfig[] | undefined;
|
|
35
34
|
/**
|
|
36
35
|
* 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.
|
|
@@ -38,6 +37,10 @@ export interface Props {
|
|
|
38
37
|
* Available when `xAxisType!=category`.
|
|
39
38
|
*/
|
|
40
39
|
xAxis?: ChartLineXAxisConfig | undefined;
|
|
40
|
+
/** 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. */
|
|
41
|
+
xMarker?: ChartLineXMarker | undefined;
|
|
42
|
+
/** Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). */
|
|
43
|
+
yMarker?: ChartLineYMarker | undefined;
|
|
41
44
|
/** Show grid lines. */
|
|
42
45
|
showGrid?: boolean;
|
|
43
46
|
/**
|
|
@@ -123,15 +126,16 @@ export interface Slots {
|
|
|
123
126
|
type $$ComponentProps = Props & Events & Slots;
|
|
124
127
|
declare const ObcLineGraph: import("svelte").Component<$$ComponentProps, {
|
|
125
128
|
ChartLineDataItem: typeof ChartLineDataItem;
|
|
126
|
-
|
|
129
|
+
ChartLineDataset: typeof ChartLineDataset;
|
|
127
130
|
XAxisType: typeof XAxisType;
|
|
128
131
|
YAxisPosition: typeof YAxisPosition;
|
|
129
132
|
ChartLineYAxisConfig: typeof ChartLineYAxisConfig;
|
|
130
133
|
ChartLineXAxisConfig: typeof ChartLineXAxisConfig;
|
|
134
|
+
ChartLineXMarker: typeof ChartLineXMarker;
|
|
135
|
+
ChartLineYMarker: typeof ChartLineYMarker;
|
|
131
136
|
RangeLabels: typeof RangeLabels;
|
|
132
137
|
LineMode: typeof LineMode;
|
|
133
138
|
TimeDisplay: typeof TimeDisplay;
|
|
134
|
-
ChartDataset: typeof ChartDataset;
|
|
135
139
|
InstrumentState: typeof InstrumentState;
|
|
136
140
|
Priority: typeof Priority;
|
|
137
141
|
FrameStyle: typeof FrameStyle;
|
|
@@ -38,6 +38,8 @@ animateSetpoint?: boolean;
|
|
|
38
38
|
minValue?: number;
|
|
39
39
|
/** Maximum scale value (manual mode) */
|
|
40
40
|
maxValue?: number;
|
|
41
|
+
/** Plot `minValue` at the right so values grow leftward. */
|
|
42
|
+
reverse?: boolean;
|
|
41
43
|
/**
|
|
42
44
|
* Total width in pixels (including padding bands)
|
|
43
45
|
*
|
|
@@ -31,6 +31,8 @@ regardless of instrument state. */
|
|
|
31
31
|
minValue?: number;
|
|
32
32
|
/** Maximum scale value (manual mode) */
|
|
33
33
|
maxValue?: number;
|
|
34
|
+
/** Plot `minValue` at the right so values grow leftward. */
|
|
35
|
+
reverse?: boolean;
|
|
34
36
|
/**
|
|
35
37
|
* Total width in pixels (including padding bands)
|
|
36
38
|
*
|
|
@@ -38,6 +38,8 @@ animateSetpoint?: boolean;
|
|
|
38
38
|
minValue?: number;
|
|
39
39
|
/** Maximum scale value (manual mode) */
|
|
40
40
|
maxValue?: number;
|
|
41
|
+
/** Plot `minValue` at the top so values grow downward. */
|
|
42
|
+
reverse?: boolean;
|
|
41
43
|
/** Total height in pixels (including padding bands) */
|
|
42
44
|
height?: number;
|
|
43
45
|
/** Padding above the drawing area */
|
|
@@ -31,6 +31,8 @@ regardless of instrument state. */
|
|
|
31
31
|
minValue?: number;
|
|
32
32
|
/** Maximum scale value (manual mode) */
|
|
33
33
|
maxValue?: number;
|
|
34
|
+
/** Plot `minValue` at the top so values grow downward. */
|
|
35
|
+
reverse?: boolean;
|
|
34
36
|
/** Total height in pixels (including padding bands) */
|
|
35
37
|
height?: number;
|
|
36
38
|
/** Padding above the drawing area */
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {ChartLineDataItem,
|
|
4
|
-
export type {ChartDataset} from 'chart.js';
|
|
3
|
+
export type {ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
5
4
|
export type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
6
5
|
import '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
7
6
|
import { setProperties } from "../../util.js";
|
|
8
|
-
import type {ChartLineDataItem,
|
|
9
|
-
import type {ChartDataset} from 'chart.js';
|
|
7
|
+
import type {ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
10
8
|
import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
11
9
|
import type { Snippet } from 'svelte';
|
|
12
10
|
|
|
@@ -15,8 +13,8 @@ import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '
|
|
|
15
13
|
style?: string;
|
|
16
14
|
/** 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). */
|
|
17
15
|
data?: ChartLineDataItem[];
|
|
18
|
-
/** Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. */
|
|
19
|
-
datasets?:
|
|
16
|
+
/** 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. */
|
|
17
|
+
datasets?: ChartLineDataset[] | undefined;
|
|
20
18
|
/** Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` */
|
|
21
19
|
labels?: (string | number)[] | undefined;
|
|
22
20
|
/** Custom color palette (CSS variable names or color strings). */
|
|
@@ -37,7 +35,7 @@ import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '
|
|
|
37
35
|
xAxisType?: XAxisType;
|
|
38
36
|
/** Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. */
|
|
39
37
|
yAxisPosition?: YAxisPosition;
|
|
40
|
-
/** Multiple y-axis definitions for complex multi-axis charts. */
|
|
38
|
+
/** 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. */
|
|
41
39
|
yAxes?: ChartLineYAxisConfig[] | undefined;
|
|
42
40
|
/**
|
|
43
41
|
* 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.
|
|
@@ -45,6 +43,10 @@ import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '
|
|
|
45
43
|
* Available when `xAxisType!=category`.
|
|
46
44
|
*/
|
|
47
45
|
xAxis?: ChartLineXAxisConfig | undefined;
|
|
46
|
+
/** 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. */
|
|
47
|
+
xMarker?: ChartLineXMarker | undefined;
|
|
48
|
+
/** Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). */
|
|
49
|
+
yMarker?: ChartLineYMarker | undefined;
|
|
48
50
|
/** Show grid lines. */
|
|
49
51
|
showGrid?: boolean;
|
|
50
52
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
2
|
-
import type { ChartLineDataItem,
|
|
3
|
-
import type { ChartDataset } from 'chart.js';
|
|
2
|
+
import type { ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay } from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
4
3
|
import type { InstrumentState, Priority, FrameStyle, BorderRadiusPosition } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
5
4
|
import type { Snippet } from 'svelte';
|
|
6
5
|
export interface Props {
|
|
@@ -8,8 +7,8 @@ export interface Props {
|
|
|
8
7
|
style?: string;
|
|
9
8
|
/** 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). */
|
|
10
9
|
data?: ChartLineDataItem[];
|
|
11
|
-
/** Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. */
|
|
12
|
-
datasets?:
|
|
10
|
+
/** 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. */
|
|
11
|
+
datasets?: ChartLineDataset[] | undefined;
|
|
13
12
|
/** Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` */
|
|
14
13
|
labels?: (string | number)[] | undefined;
|
|
15
14
|
/** Custom color palette (CSS variable names or color strings). */
|
|
@@ -30,7 +29,7 @@ export interface Props {
|
|
|
30
29
|
xAxisType?: XAxisType;
|
|
31
30
|
/** Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. */
|
|
32
31
|
yAxisPosition?: YAxisPosition;
|
|
33
|
-
/** Multiple y-axis definitions for complex multi-axis charts. */
|
|
32
|
+
/** 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. */
|
|
34
33
|
yAxes?: ChartLineYAxisConfig[] | undefined;
|
|
35
34
|
/**
|
|
36
35
|
* 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.
|
|
@@ -38,6 +37,10 @@ export interface Props {
|
|
|
38
37
|
* Available when `xAxisType!=category`.
|
|
39
38
|
*/
|
|
40
39
|
xAxis?: ChartLineXAxisConfig | undefined;
|
|
40
|
+
/** 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. */
|
|
41
|
+
xMarker?: ChartLineXMarker | undefined;
|
|
42
|
+
/** Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). */
|
|
43
|
+
yMarker?: ChartLineYMarker | undefined;
|
|
41
44
|
/** Show grid lines. */
|
|
42
45
|
showGrid?: boolean;
|
|
43
46
|
/**
|
|
@@ -123,15 +126,16 @@ export interface Slots {
|
|
|
123
126
|
type $$ComponentProps = Props & Events & Slots;
|
|
124
127
|
declare const ObcChartLineBase: import("svelte").Component<$$ComponentProps, {
|
|
125
128
|
ChartLineDataItem: typeof ChartLineDataItem;
|
|
126
|
-
|
|
129
|
+
ChartLineDataset: typeof ChartLineDataset;
|
|
127
130
|
XAxisType: typeof XAxisType;
|
|
128
131
|
YAxisPosition: typeof YAxisPosition;
|
|
129
132
|
ChartLineYAxisConfig: typeof ChartLineYAxisConfig;
|
|
130
133
|
ChartLineXAxisConfig: typeof ChartLineXAxisConfig;
|
|
134
|
+
ChartLineXMarker: typeof ChartLineXMarker;
|
|
135
|
+
ChartLineYMarker: typeof ChartLineYMarker;
|
|
131
136
|
RangeLabels: typeof RangeLabels;
|
|
132
137
|
LineMode: typeof LineMode;
|
|
133
138
|
TimeDisplay: typeof TimeDisplay;
|
|
134
|
-
ChartDataset: typeof ChartDataset;
|
|
135
139
|
InstrumentState: typeof InstrumentState;
|
|
136
140
|
Priority: typeof Priority;
|
|
137
141
|
FrameStyle: typeof FrameStyle;
|
package/dist/index.d.ts
CHANGED
|
@@ -2340,6 +2340,8 @@ export { default as ObcCompassFlat } from './navigation-instruments/compass-flat
|
|
|
2340
2340
|
export { default as ObcCompassIndicator } from './navigation-instruments/compass-indicator/ObcCompassIndicator.svelte';
|
|
2341
2341
|
export { default as ObcCompassSector } from './navigation-instruments/compass-sector/ObcCompassSector.svelte';
|
|
2342
2342
|
export { default as ObcCurrent } from './navigation-instruments/current/ObcCurrent.svelte';
|
|
2343
|
+
export { default as ObcDepthTopBand } from './navigation-instruments/depth/ObcDepthTopBand.svelte';
|
|
2344
|
+
export { default as ObcDepth } from './navigation-instruments/depth/ObcDepth.svelte';
|
|
2343
2345
|
export { default as ObcDepthActual } from './navigation-instruments/depth-actual/ObcDepthActual.svelte';
|
|
2344
2346
|
export { default as ObcDepthIndicator } from './navigation-instruments/depth-indicator/ObcDepthIndicator.svelte';
|
|
2345
2347
|
export { default as ObcDraftTrim } from './navigation-instruments/draft-trim/ObcDraftTrim.svelte';
|
package/dist/index.js
CHANGED
|
@@ -2340,6 +2340,8 @@ export { default as ObcCompassFlat } from './navigation-instruments/compass-flat
|
|
|
2340
2340
|
export { default as ObcCompassIndicator } from './navigation-instruments/compass-indicator/ObcCompassIndicator.svelte';
|
|
2341
2341
|
export { default as ObcCompassSector } from './navigation-instruments/compass-sector/ObcCompassSector.svelte';
|
|
2342
2342
|
export { default as ObcCurrent } from './navigation-instruments/current/ObcCurrent.svelte';
|
|
2343
|
+
export { default as ObcDepthTopBand } from './navigation-instruments/depth/ObcDepthTopBand.svelte';
|
|
2344
|
+
export { default as ObcDepth } from './navigation-instruments/depth/ObcDepth.svelte';
|
|
2343
2345
|
export { default as ObcDepthActual } from './navigation-instruments/depth-actual/ObcDepthActual.svelte';
|
|
2344
2346
|
export { default as ObcDepthIndicator } from './navigation-instruments/depth-indicator/ObcDepthIndicator.svelte';
|
|
2345
2347
|
export { default as ObcDraftTrim } from './navigation-instruments/draft-trim/ObcDraftTrim.svelte';
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
export type {DepthType, DepthDataItem} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth.js';
|
|
4
|
+
export type {ChartLineDataItem, ChartLineXAxisConfig} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
5
|
+
export type {DepthRange} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-shared.js';
|
|
6
|
+
export type {VesselImage} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
7
|
+
export type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
8
|
+
export type {Priority, InstrumentState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
9
|
+
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth.js';
|
|
10
|
+
import { setProperties } from "../../util.js";
|
|
11
|
+
import type {DepthType, DepthDataItem} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth.js';
|
|
12
|
+
import type {ChartLineDataItem, ChartLineXAxisConfig} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
13
|
+
import type {DepthRange} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-shared.js';
|
|
14
|
+
import type {VesselImage} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
15
|
+
import type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
16
|
+
import type {Priority, InstrumentState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
17
|
+
import type { Snippet } from 'svelte';
|
|
18
|
+
|
|
19
|
+
export interface Props {
|
|
20
|
+
class?: string;
|
|
21
|
+
style?: string;
|
|
22
|
+
/** `regular`, `prediction` or `scanned`. */
|
|
23
|
+
type?: DepthType;
|
|
24
|
+
/** History samples; `echoValue` draws the echo band under the line. */
|
|
25
|
+
data?: DepthDataItem[];
|
|
26
|
+
/**
|
|
27
|
+
* Predicted depths ahead, `x` a distance from the vessel.
|
|
28
|
+
*
|
|
29
|
+
* Available when `type==prediction`.
|
|
30
|
+
*/
|
|
31
|
+
prediction?: ChartLineDataItem[];
|
|
32
|
+
/**
|
|
33
|
+
* Scanned seabed ahead, `x` a distance from the vessel.
|
|
34
|
+
*
|
|
35
|
+
* Available when `type==scanned`.
|
|
36
|
+
*/
|
|
37
|
+
scan?: ChartLineDataItem[];
|
|
38
|
+
/**
|
|
39
|
+
* Sonar range in the distance unit, which is also the slant range that cuts the water column off; the last scan sample when unset.
|
|
40
|
+
*
|
|
41
|
+
* Available when `type==scanned`.
|
|
42
|
+
*/
|
|
43
|
+
scanRange?: number | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Depth drawn as a dotted line beyond the scan range.
|
|
46
|
+
*
|
|
47
|
+
* Available when `type==scanned`.
|
|
48
|
+
*/
|
|
49
|
+
predictedDepth?: number | undefined;
|
|
50
|
+
/** Current depth; the last history sample when unset. */
|
|
51
|
+
value?: number | undefined;
|
|
52
|
+
/** Draws the current depth as a line across the chart. */
|
|
53
|
+
hasValueLine?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* x of the now-line; 0 for `prediction` and `scanned`.
|
|
56
|
+
*
|
|
57
|
+
* Available when `type!=regular`.
|
|
58
|
+
*/
|
|
59
|
+
now?: number;
|
|
60
|
+
/** Pinned x range; defaults to the history's extent for `regular` (so now is the right edge), ±200 for `prediction` and −100…250 for `scanned`. */
|
|
61
|
+
xAxis?: ChartLineXAxisConfig | undefined;
|
|
62
|
+
/** Range ladder. */
|
|
63
|
+
ranges?: readonly DepthRange[];
|
|
64
|
+
/** Explicit scale maximum; wins over `autoRange`. */
|
|
65
|
+
maxDepth?: number | undefined;
|
|
66
|
+
/** Steps the ladder with the data. */
|
|
67
|
+
autoRange?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Overrides the range's primary tick interval.
|
|
70
|
+
*
|
|
71
|
+
* Available when `hasScale==true`.
|
|
72
|
+
*/
|
|
73
|
+
primaryTickmarkInterval?: number | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Overrides the range's secondary tick interval.
|
|
76
|
+
*
|
|
77
|
+
* Available when `hasScale==true`.
|
|
78
|
+
*/
|
|
79
|
+
secondaryTickmarkInterval?: number | undefined;
|
|
80
|
+
/** Condensed tick ladder in the right band (Figma style "Condenced"). */
|
|
81
|
+
hasScale?: boolean;
|
|
82
|
+
/** Frame band with the vessel silhouette above the chart (Figma style "Vessel scale"). */
|
|
83
|
+
showVessel?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Side-view silhouette in the vessel band.
|
|
86
|
+
*
|
|
87
|
+
* Available when `showVessel==true`.
|
|
88
|
+
*/
|
|
89
|
+
vesselImage?: VesselImage;
|
|
90
|
+
/** Advice overlays on the right band. */
|
|
91
|
+
hasAdvice?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Advice zones in depth units.
|
|
94
|
+
*
|
|
95
|
+
* Available when `hasAdvice==true`.
|
|
96
|
+
*/
|
|
97
|
+
advice?: LinearAdvice[];
|
|
98
|
+
/** `enhanced` draws the live series in the enhanced palette. */
|
|
99
|
+
priority?: Priority;
|
|
100
|
+
/** Instrument state, passed to the chart and the scale. */
|
|
101
|
+
state?: InstrumentState
|
|
102
|
+
}
|
|
103
|
+
export interface Events {
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
export interface Slots {
|
|
107
|
+
children?: Snippet
|
|
108
|
+
}
|
|
109
|
+
const { class: className, style, children, ...props} = $props<Props & Events & Slots>();
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
</script>
|
|
113
|
+
<obc-depth
|
|
114
|
+
use:setProperties={props}
|
|
115
|
+
|
|
116
|
+
class={className}
|
|
117
|
+
style={style}
|
|
118
|
+
>
|
|
119
|
+
|
|
120
|
+
{#if children}
|
|
121
|
+
{@render children()}
|
|
122
|
+
{/if}
|
|
123
|
+
</obc-depth>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth.js';
|
|
2
|
+
import type { DepthType, DepthDataItem } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth.js';
|
|
3
|
+
import type { ChartLineDataItem, ChartLineXAxisConfig } from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
4
|
+
import type { DepthRange } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-shared.js';
|
|
5
|
+
import type { VesselImage } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
6
|
+
import type { LinearAdvice } from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
7
|
+
import type { Priority, InstrumentState } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
8
|
+
import type { Snippet } from 'svelte';
|
|
9
|
+
export interface Props {
|
|
10
|
+
class?: string;
|
|
11
|
+
style?: string;
|
|
12
|
+
/** `regular`, `prediction` or `scanned`. */
|
|
13
|
+
type?: DepthType;
|
|
14
|
+
/** History samples; `echoValue` draws the echo band under the line. */
|
|
15
|
+
data?: DepthDataItem[];
|
|
16
|
+
/**
|
|
17
|
+
* Predicted depths ahead, `x` a distance from the vessel.
|
|
18
|
+
*
|
|
19
|
+
* Available when `type==prediction`.
|
|
20
|
+
*/
|
|
21
|
+
prediction?: ChartLineDataItem[];
|
|
22
|
+
/**
|
|
23
|
+
* Scanned seabed ahead, `x` a distance from the vessel.
|
|
24
|
+
*
|
|
25
|
+
* Available when `type==scanned`.
|
|
26
|
+
*/
|
|
27
|
+
scan?: ChartLineDataItem[];
|
|
28
|
+
/**
|
|
29
|
+
* Sonar range in the distance unit, which is also the slant range that cuts the water column off; the last scan sample when unset.
|
|
30
|
+
*
|
|
31
|
+
* Available when `type==scanned`.
|
|
32
|
+
*/
|
|
33
|
+
scanRange?: number | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Depth drawn as a dotted line beyond the scan range.
|
|
36
|
+
*
|
|
37
|
+
* Available when `type==scanned`.
|
|
38
|
+
*/
|
|
39
|
+
predictedDepth?: number | undefined;
|
|
40
|
+
/** Current depth; the last history sample when unset. */
|
|
41
|
+
value?: number | undefined;
|
|
42
|
+
/** Draws the current depth as a line across the chart. */
|
|
43
|
+
hasValueLine?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* x of the now-line; 0 for `prediction` and `scanned`.
|
|
46
|
+
*
|
|
47
|
+
* Available when `type!=regular`.
|
|
48
|
+
*/
|
|
49
|
+
now?: number;
|
|
50
|
+
/** Pinned x range; defaults to the history's extent for `regular` (so now is the right edge), ±200 for `prediction` and −100…250 for `scanned`. */
|
|
51
|
+
xAxis?: ChartLineXAxisConfig | undefined;
|
|
52
|
+
/** Range ladder. */
|
|
53
|
+
ranges?: readonly DepthRange[];
|
|
54
|
+
/** Explicit scale maximum; wins over `autoRange`. */
|
|
55
|
+
maxDepth?: number | undefined;
|
|
56
|
+
/** Steps the ladder with the data. */
|
|
57
|
+
autoRange?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Overrides the range's primary tick interval.
|
|
60
|
+
*
|
|
61
|
+
* Available when `hasScale==true`.
|
|
62
|
+
*/
|
|
63
|
+
primaryTickmarkInterval?: number | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Overrides the range's secondary tick interval.
|
|
66
|
+
*
|
|
67
|
+
* Available when `hasScale==true`.
|
|
68
|
+
*/
|
|
69
|
+
secondaryTickmarkInterval?: number | undefined;
|
|
70
|
+
/** Condensed tick ladder in the right band (Figma style "Condenced"). */
|
|
71
|
+
hasScale?: boolean;
|
|
72
|
+
/** Frame band with the vessel silhouette above the chart (Figma style "Vessel scale"). */
|
|
73
|
+
showVessel?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Side-view silhouette in the vessel band.
|
|
76
|
+
*
|
|
77
|
+
* Available when `showVessel==true`.
|
|
78
|
+
*/
|
|
79
|
+
vesselImage?: VesselImage;
|
|
80
|
+
/** Advice overlays on the right band. */
|
|
81
|
+
hasAdvice?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Advice zones in depth units.
|
|
84
|
+
*
|
|
85
|
+
* Available when `hasAdvice==true`.
|
|
86
|
+
*/
|
|
87
|
+
advice?: LinearAdvice[];
|
|
88
|
+
/** `enhanced` draws the live series in the enhanced palette. */
|
|
89
|
+
priority?: Priority;
|
|
90
|
+
/** Instrument state, passed to the chart and the scale. */
|
|
91
|
+
state?: InstrumentState;
|
|
92
|
+
}
|
|
93
|
+
export interface Events {
|
|
94
|
+
}
|
|
95
|
+
export interface Slots {
|
|
96
|
+
children?: Snippet;
|
|
97
|
+
}
|
|
98
|
+
type $$ComponentProps = Props & Events & Slots;
|
|
99
|
+
declare const ObcDepth: import("svelte").Component<$$ComponentProps, {
|
|
100
|
+
DepthType: typeof DepthType;
|
|
101
|
+
DepthDataItem: typeof DepthDataItem;
|
|
102
|
+
ChartLineDataItem: typeof ChartLineDataItem;
|
|
103
|
+
ChartLineXAxisConfig: typeof ChartLineXAxisConfig;
|
|
104
|
+
DepthRange: typeof DepthRange;
|
|
105
|
+
VesselImage: typeof VesselImage;
|
|
106
|
+
LinearAdvice: typeof LinearAdvice;
|
|
107
|
+
Priority: typeof Priority;
|
|
108
|
+
InstrumentState: typeof InstrumentState;
|
|
109
|
+
}, "">;
|
|
110
|
+
type ObcDepth = ReturnType<typeof ObcDepth>;
|
|
111
|
+
export default ObcDepth;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
export type {DepthTopBandType} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-top-band.js';
|
|
4
|
+
export type {VesselImage} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
5
|
+
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-top-band.js';
|
|
6
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
7
|
+
import type {DepthTopBandType} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-top-band.js';
|
|
8
|
+
import type {VesselImage} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
9
|
+
import type { Snippet } from 'svelte';
|
|
10
|
+
|
|
11
|
+
export interface Props {
|
|
12
|
+
class?: string;
|
|
13
|
+
style?: string;
|
|
14
|
+
/** `labels` (24 px row) or `vessel` (48 px band). */
|
|
15
|
+
type?: DepthTopBandType;
|
|
16
|
+
/**
|
|
17
|
+
* x value the vessel sits over; the range's end when unset.
|
|
18
|
+
*
|
|
19
|
+
* Available when `type==vessel`.
|
|
20
|
+
*/
|
|
21
|
+
now?: number | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Side-view silhouette.
|
|
24
|
+
*
|
|
25
|
+
* Available when `type==vessel`.
|
|
26
|
+
*/
|
|
27
|
+
vesselImage?: VesselImage;
|
|
28
|
+
/** Start of the x range; pushed by the hosting chart. */
|
|
29
|
+
minValue?: number;
|
|
30
|
+
/** End of the x range; pushed by the hosting chart. */
|
|
31
|
+
maxValue?: number;
|
|
32
|
+
/** Plot inset from the left edge; pushed by the hosting chart. */
|
|
33
|
+
paddingLeft?: number;
|
|
34
|
+
/** Plot inset from the right edge; pushed by the hosting chart. */
|
|
35
|
+
paddingRight?: number;
|
|
36
|
+
/** The chart's width in px; pushed by the hosting chart. */
|
|
37
|
+
width?: number;
|
|
38
|
+
/** Whether the paddings arrive in `scaleReferenceSize` units rather than px; pushed by the hosting chart. */
|
|
39
|
+
fixedAspectRatio?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Reference width the paddings are expressed in under `fixedAspectRatio`; pushed by the hosting chart.
|
|
42
|
+
*
|
|
43
|
+
* Available when `fixedAspectRatio==true`.
|
|
44
|
+
*/
|
|
45
|
+
scaleReferenceSize?: number
|
|
46
|
+
}
|
|
47
|
+
export interface Events {
|
|
48
|
+
onScaleDimensionsChanged?: (event: CustomEvent) => void
|
|
49
|
+
}
|
|
50
|
+
export interface Slots {
|
|
51
|
+
children?: Snippet
|
|
52
|
+
}
|
|
53
|
+
const {onScaleDimensionsChanged, class: className, style, children, ...props} = $props<Props & Events & Slots>();
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</script>
|
|
57
|
+
<obc-depth-top-band
|
|
58
|
+
use:setProperties={props}
|
|
59
|
+
|
|
60
|
+
class={className}
|
|
61
|
+
style={style}
|
|
62
|
+
use:forwardEvents={{'scale-dimensions-changed': onScaleDimensionsChanged}} >
|
|
63
|
+
|
|
64
|
+
{#if children}
|
|
65
|
+
{@render children()}
|
|
66
|
+
{/if}
|
|
67
|
+
</obc-depth-top-band>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-top-band.js';
|
|
2
|
+
import type { DepthTopBandType } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-top-band.js';
|
|
3
|
+
import type { VesselImage } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
export interface Props {
|
|
6
|
+
class?: string;
|
|
7
|
+
style?: string;
|
|
8
|
+
/** `labels` (24 px row) or `vessel` (48 px band). */
|
|
9
|
+
type?: DepthTopBandType;
|
|
10
|
+
/**
|
|
11
|
+
* x value the vessel sits over; the range's end when unset.
|
|
12
|
+
*
|
|
13
|
+
* Available when `type==vessel`.
|
|
14
|
+
*/
|
|
15
|
+
now?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Side-view silhouette.
|
|
18
|
+
*
|
|
19
|
+
* Available when `type==vessel`.
|
|
20
|
+
*/
|
|
21
|
+
vesselImage?: VesselImage;
|
|
22
|
+
/** Start of the x range; pushed by the hosting chart. */
|
|
23
|
+
minValue?: number;
|
|
24
|
+
/** End of the x range; pushed by the hosting chart. */
|
|
25
|
+
maxValue?: number;
|
|
26
|
+
/** Plot inset from the left edge; pushed by the hosting chart. */
|
|
27
|
+
paddingLeft?: number;
|
|
28
|
+
/** Plot inset from the right edge; pushed by the hosting chart. */
|
|
29
|
+
paddingRight?: number;
|
|
30
|
+
/** The chart's width in px; pushed by the hosting chart. */
|
|
31
|
+
width?: number;
|
|
32
|
+
/** Whether the paddings arrive in `scaleReferenceSize` units rather than px; pushed by the hosting chart. */
|
|
33
|
+
fixedAspectRatio?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Reference width the paddings are expressed in under `fixedAspectRatio`; pushed by the hosting chart.
|
|
36
|
+
*
|
|
37
|
+
* Available when `fixedAspectRatio==true`.
|
|
38
|
+
*/
|
|
39
|
+
scaleReferenceSize?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface Events {
|
|
42
|
+
onScaleDimensionsChanged?: (event: CustomEvent) => void;
|
|
43
|
+
}
|
|
44
|
+
export interface Slots {
|
|
45
|
+
children?: Snippet;
|
|
46
|
+
}
|
|
47
|
+
type $$ComponentProps = Props & Events & Slots;
|
|
48
|
+
declare const ObcDepthTopBand: import("svelte").Component<$$ComponentProps, {
|
|
49
|
+
DepthTopBandType: typeof DepthTopBandType;
|
|
50
|
+
VesselImage: typeof VesselImage;
|
|
51
|
+
}, "">;
|
|
52
|
+
type ObcDepthTopBand = ReturnType<typeof ObcDepthTopBand>;
|
|
53
|
+
export default ObcDepthTopBand;
|
|
@@ -3,26 +3,48 @@
|
|
|
3
3
|
export type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
4
4
|
export type {VesselImage} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
5
5
|
export type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
6
|
+
export type {DepthRange} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-shared.js';
|
|
6
7
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth-actual/depth-actual.js';
|
|
7
8
|
import { setProperties } from "../../util.js";
|
|
8
9
|
import type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
9
10
|
import type {VesselImage} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
10
11
|
import type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
12
|
+
import type {DepthRange} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-shared.js';
|
|
11
13
|
import type { Snippet } from 'svelte';
|
|
12
14
|
|
|
13
15
|
export interface Props {
|
|
14
16
|
class?: string;
|
|
15
17
|
style?: string;
|
|
18
|
+
/** Depth below the surface. */
|
|
16
19
|
depth?: number;
|
|
20
|
+
/** Draught, drawn as the vessel's keel line. */
|
|
17
21
|
draft?: number;
|
|
22
|
+
/** Advice zones on the gauge, in depth units. */
|
|
18
23
|
advice?: LinearAdvice[];
|
|
19
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Factor on the range's vessel size.
|
|
26
|
+
*
|
|
27
|
+
* Available when `vesselImage!=''`.
|
|
28
|
+
*/
|
|
20
29
|
vesselScale?: number;
|
|
21
|
-
|
|
22
|
-
primaryTickmarkInterval?: number;
|
|
23
|
-
secondaryTickmarkInterval?: number;
|
|
30
|
+
/** Fore-view silhouette. */
|
|
24
31
|
vesselImage?: VesselImage;
|
|
25
|
-
|
|
32
|
+
/** `enhanced` draws the fills and lines in the enhanced palette. */
|
|
33
|
+
priority?: Priority;
|
|
34
|
+
/** Label the scale ends and the primary ladder beside the frame. */
|
|
35
|
+
showLabels?: boolean;
|
|
36
|
+
/** Range ladder shared with `obc-depth`. */
|
|
37
|
+
ranges?: readonly DepthRange[];
|
|
38
|
+
/** Explicit scale maximum; wins over `autoRange`. */
|
|
39
|
+
maxDepth?: number | undefined;
|
|
40
|
+
/** Steps the ladder with `depth`. */
|
|
41
|
+
autoRange?: boolean;
|
|
42
|
+
/** Overrides the range's primary tick interval. */
|
|
43
|
+
primaryTickmarkInterval?: number | undefined;
|
|
44
|
+
/** Overrides the range's secondary tick interval. */
|
|
45
|
+
secondaryTickmarkInterval?: number | undefined;
|
|
46
|
+
/** Alias of `maxDepth`, kept for existing consumers. */
|
|
47
|
+
instrumentRange?: number | undefined
|
|
26
48
|
}
|
|
27
49
|
export interface Events {
|
|
28
50
|
|
|
@@ -2,20 +2,41 @@ import '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth-actual/
|
|
|
2
2
|
import type { LinearAdvice } from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
3
3
|
import type { VesselImage } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/watch.js';
|
|
4
4
|
import type { Priority } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
5
|
+
import type { DepthRange } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/depth/depth-shared.js';
|
|
5
6
|
import type { Snippet } from 'svelte';
|
|
6
7
|
export interface Props {
|
|
7
8
|
class?: string;
|
|
8
9
|
style?: string;
|
|
10
|
+
/** Depth below the surface. */
|
|
9
11
|
depth?: number;
|
|
12
|
+
/** Draught, drawn as the vessel's keel line. */
|
|
10
13
|
draft?: number;
|
|
14
|
+
/** Advice zones on the gauge, in depth units. */
|
|
11
15
|
advice?: LinearAdvice[];
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Factor on the range's vessel size.
|
|
18
|
+
*
|
|
19
|
+
* Available when `vesselImage!=''`.
|
|
20
|
+
*/
|
|
13
21
|
vesselScale?: number;
|
|
14
|
-
|
|
15
|
-
primaryTickmarkInterval?: number;
|
|
16
|
-
secondaryTickmarkInterval?: number;
|
|
22
|
+
/** Fore-view silhouette. */
|
|
17
23
|
vesselImage?: VesselImage;
|
|
24
|
+
/** `enhanced` draws the fills and lines in the enhanced palette. */
|
|
18
25
|
priority?: Priority;
|
|
26
|
+
/** Label the scale ends and the primary ladder beside the frame. */
|
|
27
|
+
showLabels?: boolean;
|
|
28
|
+
/** Range ladder shared with `obc-depth`. */
|
|
29
|
+
ranges?: readonly DepthRange[];
|
|
30
|
+
/** Explicit scale maximum; wins over `autoRange`. */
|
|
31
|
+
maxDepth?: number | undefined;
|
|
32
|
+
/** Steps the ladder with `depth`. */
|
|
33
|
+
autoRange?: boolean;
|
|
34
|
+
/** Overrides the range's primary tick interval. */
|
|
35
|
+
primaryTickmarkInterval?: number | undefined;
|
|
36
|
+
/** Overrides the range's secondary tick interval. */
|
|
37
|
+
secondaryTickmarkInterval?: number | undefined;
|
|
38
|
+
/** Alias of `maxDepth`, kept for existing consumers. */
|
|
39
|
+
instrumentRange?: number | undefined;
|
|
19
40
|
}
|
|
20
41
|
export interface Events {
|
|
21
42
|
}
|
|
@@ -27,6 +48,7 @@ declare const ObcDepthActual: import("svelte").Component<$$ComponentProps, {
|
|
|
27
48
|
LinearAdvice: typeof LinearAdvice;
|
|
28
49
|
VesselImage: typeof VesselImage;
|
|
29
50
|
Priority: typeof Priority;
|
|
51
|
+
DepthRange: typeof DepthRange;
|
|
30
52
|
}, "">;
|
|
31
53
|
type ObcDepthActual = ReturnType<typeof ObcDepthActual>;
|
|
32
54
|
export default ObcDepthActual;
|
|
@@ -38,6 +38,8 @@ animateSetpoint?: boolean;
|
|
|
38
38
|
minValue?: number;
|
|
39
39
|
/** Maximum scale value */
|
|
40
40
|
maxValue?: number;
|
|
41
|
+
/** Plot `minValue` at the right so values grow leftward. */
|
|
42
|
+
reverse?: boolean;
|
|
41
43
|
/** Which side of the chart area this scale lives on (top or bottom) */
|
|
42
44
|
side?: ExternalScaleSide;
|
|
43
45
|
/** Show numerical value labels at primary tickmarks */
|
|
@@ -31,6 +31,8 @@ regardless of instrument state. */
|
|
|
31
31
|
minValue?: number;
|
|
32
32
|
/** Maximum scale value */
|
|
33
33
|
maxValue?: number;
|
|
34
|
+
/** Plot `minValue` at the right so values grow leftward. */
|
|
35
|
+
reverse?: boolean;
|
|
34
36
|
/** Which side of the chart area this scale lives on (top or bottom) */
|
|
35
37
|
side?: ExternalScaleSide;
|
|
36
38
|
/** Show numerical value labels at primary tickmarks */
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {ChartLineDataItem,
|
|
4
|
-
export type {ChartDataset} from 'chart.js';
|
|
3
|
+
export type {ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
5
4
|
export type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
6
5
|
export type {ScaleType, FillMode} from '@oicl/openbridge-webcomponents/dist/building-blocks/bar-vertical/bar-vertical.js';
|
|
7
6
|
export type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
8
7
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-trend/gauge-trend.js';
|
|
9
8
|
import { setProperties } from "../../util.js";
|
|
10
|
-
import type {ChartLineDataItem,
|
|
11
|
-
import type {ChartDataset} from 'chart.js';
|
|
9
|
+
import type {ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay} from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
12
10
|
import type {InstrumentState, Priority, FrameStyle, BorderRadiusPosition} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
13
11
|
import type {ScaleType, FillMode} from '@oicl/openbridge-webcomponents/dist/building-blocks/bar-vertical/bar-vertical.js';
|
|
14
12
|
import type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
@@ -40,8 +38,8 @@ setpointOverride?: boolean;
|
|
|
40
38
|
animateSetpoint?: boolean;
|
|
41
39
|
/** 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). */
|
|
42
40
|
data?: ChartLineDataItem[];
|
|
43
|
-
/** Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. */
|
|
44
|
-
datasets?:
|
|
41
|
+
/** 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. */
|
|
42
|
+
datasets?: ChartLineDataset[] | undefined;
|
|
45
43
|
/** Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` */
|
|
46
44
|
labels?: (string | number)[] | undefined;
|
|
47
45
|
/** Custom color palette (CSS variable names or color strings). */
|
|
@@ -62,7 +60,7 @@ animateSetpoint?: boolean;
|
|
|
62
60
|
xAxisType?: XAxisType;
|
|
63
61
|
/** Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. */
|
|
64
62
|
yAxisPosition?: YAxisPosition;
|
|
65
|
-
/** Multiple y-axis definitions for complex multi-axis charts. */
|
|
63
|
+
/** 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. */
|
|
66
64
|
yAxes?: ChartLineYAxisConfig[] | undefined;
|
|
67
65
|
/**
|
|
68
66
|
* 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.
|
|
@@ -70,6 +68,10 @@ animateSetpoint?: boolean;
|
|
|
70
68
|
* Available when `xAxisType!=category`.
|
|
71
69
|
*/
|
|
72
70
|
xAxis?: ChartLineXAxisConfig | undefined;
|
|
71
|
+
/** 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. */
|
|
72
|
+
xMarker?: ChartLineXMarker | undefined;
|
|
73
|
+
/** Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). */
|
|
74
|
+
yMarker?: ChartLineYMarker | undefined;
|
|
73
75
|
/** Show grid lines. */
|
|
74
76
|
showGrid?: boolean;
|
|
75
77
|
/**
|
|
@@ -160,6 +162,8 @@ scaleType?: ScaleType;
|
|
|
160
162
|
chartMinValue?: number | undefined;
|
|
161
163
|
/** Maximum value for the chart y-axis. When undefined, defaults to `maxValue` to keep chart and scale aligned. */
|
|
162
164
|
chartMaxValue?: number | undefined;
|
|
165
|
+
/** 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. */
|
|
166
|
+
reverse?: boolean;
|
|
163
167
|
/** Current value displayed on the vertical scale.
|
|
164
168
|
|
|
165
169
|
This is the primary value property that drives:
|
|
@@ -176,6 +180,12 @@ When `false`, a dot indicator is automatically shown at the value position inste
|
|
|
176
180
|
hasBar?: boolean;
|
|
177
181
|
/** Show scale tick marks and labels. */
|
|
178
182
|
hasScale?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Label only the main tickmarks (min / 0 / max) on the vertical scale instead of the primary ladder.
|
|
185
|
+
*
|
|
186
|
+
* Available when `hasScale==true`.
|
|
187
|
+
*/
|
|
188
|
+
showMainTickmarkLabels?: boolean;
|
|
179
189
|
/** Show advice overlays on the vertical scale. */
|
|
180
190
|
hasAdvice?: boolean;
|
|
181
191
|
/** Fill mode for the bar.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-trend/gauge-trend.js';
|
|
2
|
-
import type { ChartLineDataItem,
|
|
3
|
-
import type { ChartDataset } from 'chart.js';
|
|
2
|
+
import type { ChartLineDataItem, ChartLineDataset, XAxisType, YAxisPosition, ChartLineYAxisConfig, ChartLineXAxisConfig, ChartLineXMarker, ChartLineYMarker, RangeLabels, LineMode, TimeDisplay } from '@oicl/openbridge-webcomponents/dist/building-blocks/chart-line/chart-line-base.js';
|
|
4
3
|
import type { InstrumentState, Priority, FrameStyle, BorderRadiusPosition } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
5
4
|
import type { ScaleType, FillMode } from '@oicl/openbridge-webcomponents/dist/building-blocks/bar-vertical/bar-vertical.js';
|
|
6
5
|
import type { LinearAdvice } from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
@@ -31,8 +30,8 @@ regardless of instrument state. */
|
|
|
31
30
|
animateSetpoint?: boolean;
|
|
32
31
|
/** 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). */
|
|
33
32
|
data?: ChartLineDataItem[];
|
|
34
|
-
/** Chart.js-style datasets for multi-series use. If provided, takes precedence over `data`. */
|
|
35
|
-
datasets?:
|
|
33
|
+
/** 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. */
|
|
34
|
+
datasets?: ChartLineDataset[] | undefined;
|
|
36
35
|
/** Optional explicit labels for the x-axis (category mode). If omitted labels are derived from `data` */
|
|
37
36
|
labels?: (string | number)[] | undefined;
|
|
38
37
|
/** Custom color palette (CSS variable names or color strings). */
|
|
@@ -53,7 +52,7 @@ regardless of instrument state. */
|
|
|
53
52
|
xAxisType?: XAxisType;
|
|
54
53
|
/** Single y-axis position ('left' or 'right'). For multiple y-axes, use yAxes instead. */
|
|
55
54
|
yAxisPosition?: YAxisPosition;
|
|
56
|
-
/** Multiple y-axis definitions for complex multi-axis charts. */
|
|
55
|
+
/** 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. */
|
|
57
56
|
yAxes?: ChartLineYAxisConfig[] | undefined;
|
|
58
57
|
/**
|
|
59
58
|
* 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.
|
|
@@ -61,6 +60,10 @@ regardless of instrument state. */
|
|
|
61
60
|
* Available when `xAxisType!=category`.
|
|
62
61
|
*/
|
|
63
62
|
xAxis?: ChartLineXAxisConfig | undefined;
|
|
63
|
+
/** 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. */
|
|
64
|
+
xMarker?: ChartLineXMarker | undefined;
|
|
65
|
+
/** Horizontal 2px marker across the plot at a y value, in the dataset's line colour (`datasetIndex`, default 0). */
|
|
66
|
+
yMarker?: ChartLineYMarker | undefined;
|
|
64
67
|
/** Show grid lines. */
|
|
65
68
|
showGrid?: boolean;
|
|
66
69
|
/**
|
|
@@ -151,6 +154,8 @@ Hidden from Storybook controls via argTypes configuration. */
|
|
|
151
154
|
chartMinValue?: number | undefined;
|
|
152
155
|
/** Maximum value for the chart y-axis. When undefined, defaults to `maxValue` to keep chart and scale aligned. */
|
|
153
156
|
chartMaxValue?: number | undefined;
|
|
157
|
+
/** 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. */
|
|
158
|
+
reverse?: boolean;
|
|
154
159
|
/** Current value displayed on the vertical scale.
|
|
155
160
|
|
|
156
161
|
This is the primary value property that drives:
|
|
@@ -167,6 +172,12 @@ When `false`, a dot indicator is automatically shown at the value position inste
|
|
|
167
172
|
hasBar?: boolean;
|
|
168
173
|
/** Show scale tick marks and labels. */
|
|
169
174
|
hasScale?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Label only the main tickmarks (min / 0 / max) on the vertical scale instead of the primary ladder.
|
|
177
|
+
*
|
|
178
|
+
* Available when `hasScale==true`.
|
|
179
|
+
*/
|
|
180
|
+
showMainTickmarkLabels?: boolean;
|
|
170
181
|
/** Show advice overlays on the vertical scale. */
|
|
171
182
|
hasAdvice?: boolean;
|
|
172
183
|
/** Fill mode for the bar.
|
|
@@ -221,15 +232,16 @@ export interface Slots {
|
|
|
221
232
|
type $$ComponentProps = Props & Events & Slots;
|
|
222
233
|
declare const ObcGaugeTrend: import("svelte").Component<$$ComponentProps, {
|
|
223
234
|
ChartLineDataItem: typeof ChartLineDataItem;
|
|
224
|
-
|
|
235
|
+
ChartLineDataset: typeof ChartLineDataset;
|
|
225
236
|
XAxisType: typeof XAxisType;
|
|
226
237
|
YAxisPosition: typeof YAxisPosition;
|
|
227
238
|
ChartLineYAxisConfig: typeof ChartLineYAxisConfig;
|
|
228
239
|
ChartLineXAxisConfig: typeof ChartLineXAxisConfig;
|
|
240
|
+
ChartLineXMarker: typeof ChartLineXMarker;
|
|
241
|
+
ChartLineYMarker: typeof ChartLineYMarker;
|
|
229
242
|
RangeLabels: typeof RangeLabels;
|
|
230
243
|
LineMode: typeof LineMode;
|
|
231
244
|
TimeDisplay: typeof TimeDisplay;
|
|
232
|
-
ChartDataset: typeof ChartDataset;
|
|
233
245
|
InstrumentState: typeof InstrumentState;
|
|
234
246
|
Priority: typeof Priority;
|
|
235
247
|
FrameStyle: typeof FrameStyle;
|
|
@@ -38,6 +38,8 @@ animateSetpoint?: boolean;
|
|
|
38
38
|
minValue?: number;
|
|
39
39
|
/** Maximum scale value */
|
|
40
40
|
maxValue?: number;
|
|
41
|
+
/** Plot `minValue` at the top so values grow downward. */
|
|
42
|
+
reverse?: boolean;
|
|
41
43
|
/** Which side of the chart area this scale lives on (left or right) */
|
|
42
44
|
side?: ExternalScaleSide;
|
|
43
45
|
/** Show numerical value labels at primary tickmarks */
|
|
@@ -31,6 +31,8 @@ regardless of instrument state. */
|
|
|
31
31
|
minValue?: number;
|
|
32
32
|
/** Maximum scale value */
|
|
33
33
|
maxValue?: number;
|
|
34
|
+
/** Plot `minValue` at the top so values grow downward. */
|
|
35
|
+
reverse?: boolean;
|
|
34
36
|
/** Which side of the chart area this scale lives on (left or right) */
|
|
35
37
|
side?: ExternalScaleSide;
|
|
36
38
|
/** Show numerical value labels at primary tickmarks */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oicl/openbridge-webcomponents-svelte",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.158",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run prepack",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@oicl/openbridge-webcomponents": "^2.0.0-next.
|
|
37
|
+
"@oicl/openbridge-webcomponents": "^2.0.0-next.158"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"svelte": "^5.0.0"
|