@nova-lab/charts 0.0.0-stage → 1.0.1-dev.32
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/LICENSE +202 -0
- package/README.md +158 -2
- package/dist/GeometryIndex-DDQ34Jf4.js +104 -0
- package/dist/MarkSeries-CQCAnV4s.js +245 -0
- package/dist/aggregation.d.ts +6 -0
- package/dist/aggregation.js +124 -0
- package/dist/annotations.d.ts +34 -0
- package/dist/annotations.js +71 -0
- package/dist/api/camera.d.ts +8 -0
- package/dist/api/cartesian.d.ts +21 -0
- package/dist/api/events.d.ts +13 -0
- package/dist/api/font.d.ts +3 -0
- package/dist/api/handle.d.ts +5 -0
- package/dist/api/host.d.ts +23 -0
- package/dist/api/internal.d.ts +41 -0
- package/dist/api/map-background.d.ts +12 -0
- package/dist/api/mark-paint.d.ts +5 -0
- package/dist/api/mark-style.d.ts +4 -0
- package/dist/api/navigation.d.ts +4 -0
- package/dist/api/overlay.d.ts +7 -0
- package/dist/api/partition.d.ts +11 -0
- package/dist/api/scene.d.ts +42 -0
- package/dist/api/state.d.ts +34 -0
- package/dist/api/types.d.ts +743 -0
- package/dist/area.d.ts +9 -0
- package/dist/area.js +706 -0
- package/dist/bar.d.ts +9 -0
- package/dist/bar.js +554 -0
- package/dist/brush.d.ts +17 -0
- package/dist/brush.js +86 -0
- package/dist/bubble.d.ts +8 -0
- package/dist/bubble.js +434 -0
- package/dist/camera-CUJAMfpx.js +57 -0
- package/dist/candlestick.d.ts +8 -0
- package/dist/candlestick.js +42 -0
- package/dist/cartesian-k_WIYsGp.js +1139 -0
- package/dist/chart-runtime-resolver-DwwXp3X8.js +20 -0
- package/dist/chart-series-runtime-C0P7h8Tl.js +127 -0
- package/dist/charts.js +1 -0
- package/dist/composed.d.ts +2 -0
- package/dist/composed.js +4 -0
- package/dist/crosshair.d.ts +23 -0
- package/dist/crosshair.js +60 -0
- package/dist/donut.d.ts +5 -0
- package/dist/donut.js +7 -0
- package/dist/funnel.d.ts +5 -0
- package/dist/funnel.js +40 -0
- package/dist/graph.d.ts +6 -0
- package/dist/graph.js +260 -0
- package/dist/heatmap.d.ts +8 -0
- package/dist/heatmap.js +37 -0
- package/dist/host-DLDeDU5k.js +4373 -0
- package/dist/index.d.ts +1 -0
- package/dist/internal-I5BDhahD.js +4 -0
- package/dist/layout-donut-BG4ubBtU.js +39 -0
- package/dist/line.d.ts +9 -0
- package/dist/line.js +452 -0
- package/dist/mark-paint-CMHKGegE.js +14 -0
- package/dist/mark-style-Cpl-ARQM.js +10 -0
- package/dist/model/area/create-area-series-layout.d.ts +15 -0
- package/dist/model/area/hit-test-area-layout.d.ts +2 -0
- package/dist/model/axis/ChartAxisModel.d.ts +28 -0
- package/dist/model/bar/create-bar-series-layout.d.ts +19 -0
- package/dist/model/bar/hit-test-bar-layout.d.ts +2 -0
- package/dist/model/bubble/create-bubble-series-layout.d.ts +15 -0
- package/dist/model/bubble/hit-test-bubble-layout.d.ts +2 -0
- package/dist/model/cartesian/append-line-contours.d.ts +4 -0
- package/dist/model/cartesian/axis-line-batch.d.ts +3 -0
- package/dist/model/cartesian/numeric-window.d.ts +7 -0
- package/dist/model/cartesian/point-series.d.ts +54 -0
- package/dist/model/cartesian/sample-extrema.d.ts +7 -0
- package/dist/model/cartesian/smooth-y.d.ts +4 -0
- package/dist/model/cartesian/translation-window.d.ts +17 -0
- package/dist/model/context/nova-chart-runtime.d.ts +54 -0
- package/dist/model/customization/chart-customization.d.ts +47 -0
- package/dist/model/customization/chart-presets.d.ts +6 -0
- package/dist/model/customization/chart-style-sheet.d.ts +9 -0
- package/dist/model/data/ChartDataStore.d.ts +113 -0
- package/dist/model/exploration/create-graph-layout.d.ts +11 -0
- package/dist/model/exploration/exploration-chart.types.d.ts +150 -0
- package/dist/model/exploration/force-layout.d.ts +9 -0
- package/dist/model/exploration/presets/airplane.d.ts +2 -0
- package/dist/model/exploration/presets/apartment.d.ts +2 -0
- package/dist/model/exploration/presets/botanical-park.d.ts +2 -0
- package/dist/model/exploration/presets/ferry.d.ts +2 -0
- package/dist/model/exploration/presets/ice-arena.d.ts +2 -0
- package/dist/model/exploration/presets/planetarium.d.ts +2 -0
- package/dist/model/exploration/presets/science-museum.d.ts +2 -0
- package/dist/model/exploration/presets/train.d.ts +2 -0
- package/dist/model/exploration/route-geometry.d.ts +9 -0
- package/dist/model/exploration/seat-shape.d.ts +7 -0
- package/dist/model/interaction/GeometryIndex.d.ts +14 -0
- package/dist/model/line/create-line-series-layout.d.ts +15 -0
- package/dist/model/line/hit-test-line-layout.d.ts +2 -0
- package/dist/model/novel/create-novel-layout.d.ts +5 -0
- package/dist/model/novel/hit-test-novel-layout.d.ts +3 -0
- package/dist/model/novel/layout-candlestick.d.ts +3 -0
- package/dist/model/novel/layout-donut.d.ts +3 -0
- package/dist/model/novel/layout-funnel.d.ts +3 -0
- package/dist/model/novel/layout-heatmap.d.ts +3 -0
- package/dist/model/novel/layout-input.d.ts +12 -0
- package/dist/model/novel/layout-radar.d.ts +3 -0
- package/dist/model/novel/layout-tree.d.ts +3 -0
- package/dist/model/novel/layout-treemap.d.ts +3 -0
- package/dist/model/novel/layout-values.d.ts +10 -0
- package/dist/model/novel/novel-chart.types.d.ts +140 -0
- package/dist/model/novel/novel-domains.d.ts +5 -0
- package/dist/model/scale/BandScale.d.ts +86 -0
- package/dist/model/scale/ChartScaleRegistry.d.ts +45 -0
- package/dist/model/scale/LinearScale.d.ts +48 -0
- package/dist/model/scale/TimeScale.d.ts +48 -0
- package/dist/model/scale/create-chart-scale.d.ts +3 -0
- package/dist/model/scale/resolve-chart-scale.d.ts +5 -0
- package/dist/model/scatter/create-scatter-series-layout.d.ts +14 -0
- package/dist/model/scatter/hit-test-scatter-layout.d.ts +4 -0
- package/dist/model/time/calendar-time.d.ts +16 -0
- package/dist/model/types/chart-axis.types.d.ts +43 -0
- package/dist/model/types/chart-components.types.d.ts +1393 -0
- package/dist/model/types/chart-scale.types.d.ts +78 -0
- package/dist/model/viewport-controller/viewport-controller.d.ts +5 -0
- package/dist/novel-domains-DBpA_AOT.js +24 -0
- package/dist/partition-D-0LTCr3.js +221 -0
- package/dist/presets/route-map/apartment.d.ts +2 -0
- package/dist/presets/route-map/apartment.js +116 -0
- package/dist/presets/route-map/botanical-park.d.ts +2 -0
- package/dist/presets/route-map/botanical-park.js +116 -0
- package/dist/presets/route-map/science-museum.d.ts +2 -0
- package/dist/presets/route-map/science-museum.js +45 -0
- package/dist/presets/seat-map/airplane.d.ts +2 -0
- package/dist/presets/seat-map/airplane.js +95 -0
- package/dist/presets/seat-map/ferry.d.ts +2 -0
- package/dist/presets/seat-map/ferry.js +54 -0
- package/dist/presets/seat-map/ice-arena.d.ts +2 -0
- package/dist/presets/seat-map/ice-arena.js +67 -0
- package/dist/presets/seat-map/planetarium.d.ts +2 -0
- package/dist/presets/seat-map/planetarium.js +54 -0
- package/dist/presets/seat-map/train.d.ts +2 -0
- package/dist/presets/seat-map/train.js +66 -0
- package/dist/presets.d.ts +78 -0
- package/dist/presets.js +14 -0
- package/dist/public.d.ts +2 -0
- package/dist/radar.d.ts +5 -0
- package/dist/radar.js +47 -0
- package/dist/rose.d.ts +5 -0
- package/dist/rose.js +7 -0
- package/dist/route-map.d.ts +6 -0
- package/dist/route-map.js +200 -0
- package/dist/scatter.d.ts +8 -0
- package/dist/scatter.js +433 -0
- package/dist/scene-CPvPzTaB.js +137 -0
- package/dist/seat-map.d.ts +6 -0
- package/dist/seat-map.js +84 -0
- package/dist/seat-shape--kEFiUXX.js +66 -0
- package/dist/state-C5pICb11.js +134 -0
- package/dist/sync.d.ts +82 -0
- package/dist/sync.js +326 -0
- package/dist/translation-window-Ca_rCenJ.js +57 -0
- package/dist/tree.d.ts +6 -0
- package/dist/tree.js +114 -0
- package/dist/treemap.d.ts +5 -0
- package/dist/treemap.js +85 -0
- package/dist/ui/area-series/AreaSeries.d.ts +44 -0
- package/dist/ui/area-series/area-series.config.d.ts +10 -0
- package/dist/ui/area-series/area-series.registry.d.ts +4 -0
- package/dist/ui/axis/Axis.d.ts +55 -0
- package/dist/ui/axis/axis.config.d.ts +10 -0
- package/dist/ui/axis/axis.registry.d.ts +4 -0
- package/dist/ui/bar-chart/BarChart.d.ts +124 -0
- package/dist/ui/bar-chart/bar-chart.config.d.ts +10 -0
- package/dist/ui/bar-chart/bar-chart.registry.d.ts +2 -0
- package/dist/ui/bar-series/BarSeries.d.ts +102 -0
- package/dist/ui/bar-series/bar-series.config.d.ts +10 -0
- package/dist/ui/bar-series/bar-series.registry.d.ts +4 -0
- package/dist/ui/bubble-series/BubbleSeries.d.ts +33 -0
- package/dist/ui/bubble-series/bubble-series.config.d.ts +10 -0
- package/dist/ui/bubble-series/bubble-series.registry.d.ts +4 -0
- package/dist/ui/composed-chart/ComposedChart.d.ts +41 -0
- package/dist/ui/composed-chart/composed-chart.config.d.ts +10 -0
- package/dist/ui/composed-chart/composed-chart.registry.d.ts +4 -0
- package/dist/ui/exploration-chart/ExplorationChart.d.ts +83 -0
- package/dist/ui/exploration-chart/exploration-chart.config.d.ts +7 -0
- package/dist/ui/exploration-chart/exploration-chart.registry.d.ts +6 -0
- package/dist/ui/grid/Grid.d.ts +35 -0
- package/dist/ui/grid/grid.config.d.ts +10 -0
- package/dist/ui/grid/grid.registry.d.ts +4 -0
- package/dist/ui/interaction/Interaction.d.ts +53 -0
- package/dist/ui/interaction/interaction.config.d.ts +10 -0
- package/dist/ui/interaction/interaction.registry.d.ts +4 -0
- package/dist/ui/legend/Legend.d.ts +38 -0
- package/dist/ui/legend/legend.config.d.ts +10 -0
- package/dist/ui/legend/legend.registry.d.ts +2 -0
- package/dist/ui/line-series/LineSeries.d.ts +67 -0
- package/dist/ui/line-series/line-series.config.d.ts +10 -0
- package/dist/ui/line-series/line-series.registry.d.ts +4 -0
- package/dist/ui/mark-series/MarkSeries.d.ts +55 -0
- package/dist/ui/novel-series/NovelSeries.d.ts +34 -0
- package/dist/ui/novel-series/novel-series.config.d.ts +9 -0
- package/dist/ui/novel-series/novel-series.registry.d.ts +4 -0
- package/dist/ui/partition-chart/PartitionChart.d.ts +24 -0
- package/dist/ui/partition-chart/partition-chart.config.d.ts +7 -0
- package/dist/ui/partition-chart/partition-chart.registry.d.ts +9 -0
- package/dist/ui/plot/Plot.d.ts +64 -0
- package/dist/ui/plot/plot.config.d.ts +10 -0
- package/dist/ui/plot/plot.registry.d.ts +4 -0
- package/dist/ui/root/Root.d.ts +206 -0
- package/dist/ui/root/root.config.d.ts +10 -0
- package/dist/ui/root/root.registry.d.ts +5 -0
- package/dist/ui/scale/Scale.d.ts +55 -0
- package/dist/ui/scale/scale.config.d.ts +10 -0
- package/dist/ui/scale/scale.registry.d.ts +4 -0
- package/dist/ui/scatter-series/ScatterSeries.d.ts +33 -0
- package/dist/ui/scatter-series/scatter-series.config.d.ts +10 -0
- package/dist/ui/scatter-series/scatter-series.registry.d.ts +4 -0
- package/dist/ui/shared/chart-props.d.ts +150 -0
- package/dist/ui/shared/chart-runtime-resolver.d.ts +4 -0
- package/dist/ui/shared/chart-semantic-marks.d.ts +20 -0
- package/dist/ui/shared/chart-series-runtime.d.ts +48 -0
- package/dist/ui/shared/schema-types.d.ts +34 -0
- package/dist/ui/tooltip/Tooltip.d.ts +64 -0
- package/dist/ui/tooltip/tooltip.config.d.ts +10 -0
- package/dist/ui/tooltip/tooltip.registry.d.ts +4 -0
- package/dist/ui/viewport/Viewport.d.ts +81 -0
- package/dist/ui/viewport/viewport.config.d.ts +10 -0
- package/dist/ui/viewport/viewport.registry.d.ts +2 -0
- package/dist/ui/viewport-controller/ViewportController.d.ts +30 -0
- package/dist/ui/viewport-controller/viewport-controller.config.d.ts +10 -0
- package/dist/ui/viewport-controller/viewport-controller.registry.d.ts +2 -0
- package/package.json +179 -4
|
@@ -0,0 +1,1393 @@
|
|
|
1
|
+
import { NovaExportImageOptions, NovaExportImageResult, NovaSchema, NovaSchemaItem, NovaScope, NovaSemanticSnapshot, NovaSemanticSnapshotOptions, NovaTemplateChildSchema } from '@nova-lab/core';
|
|
2
|
+
import { NovaScrollbarVisualOptions, NovaUiCommonProps, NovaUiCommonResolvedProps, NovaUiStyleAttrValue, TooltipAnimationOptions, TooltipCollisionOptions, TooltipContent, TooltipPlacement } from '@nova-lab/ui-kit';
|
|
3
|
+
import { NovaChartNovelSeriesProps } from '../novel/novel-chart.types';
|
|
4
|
+
import { ChartBandDomain, ChartNumericDomain, ChartScale, ChartScaleDomain, ChartScaleRange, ChartScaleTickOptions, ChartScaleType, ChartScaleValue, ChartTimeTickOptions } from './chart-scale.types';
|
|
5
|
+
export type NovaChartFieldAccessor<TData = Record<string, unknown>, TValue = unknown> = keyof TData | string | ((row: TData, index: number) => TValue);
|
|
6
|
+
export type NovaChartRowKey = string | number;
|
|
7
|
+
export type NovaChartDataListener<TData = Record<string, unknown>> = (diagnostics: NovaChartRootDiagnostics<TData>) => void;
|
|
8
|
+
export type NovaChartBarRenderMode = 'direct' | 'windowed' | 'aggregated';
|
|
9
|
+
export type NovaChartBarAggregationMode = 'auto' | 'avg' | 'sum' | 'min' | 'max';
|
|
10
|
+
export type NovaChartLineRenderMode = 'direct' | 'windowed' | 'sampled';
|
|
11
|
+
export type NovaChartInteractionMode = 'datum' | 'bucket';
|
|
12
|
+
export type NovaChartHitTestMode = 'exact' | 'nearest';
|
|
13
|
+
export type NovaChartSeriesKind = 'bar' | 'line' | 'area' | 'scatter' | 'bubble' | 'donut' | 'rose' | 'heatmap' | 'treemap' | 'candlestick' | 'funnel' | 'radar' | 'tree' | 'custom';
|
|
14
|
+
export type NovaChartVisualState = 'normal' | 'hovered' | 'selected' | 'muted' | 'focused' | 'disabled';
|
|
15
|
+
export type NovaChartPartName = 'root' | 'plot' | 'bar' | 'barLabel' | 'lineSegment' | 'lineMarker' | 'areaFill' | 'areaOutline' | 'areaMarker' | 'scatterPoint' | 'bubble' | 'donut' | 'rose' | 'heatmap' | 'treemap' | 'candlestick' | 'funnel' | 'radar' | 'tree' | 'axisTick' | 'axisLabel' | 'gridLine' | 'legendItem' | 'legendSwatch' | 'legendLabel' | 'tooltipSurface' | 'tooltipContent' | 'viewportTrack' | 'viewportThumb';
|
|
16
|
+
export type NovaChartVisualPresetName = 'dashboard' | 'editorial' | 'financial' | 'scientific' | 'minimal' | 'contrast' | (string & {});
|
|
17
|
+
export type NovaChartStyleValue<TData = Record<string, unknown>, TValue = unknown> = TValue | ((context: NovaChartStyleContext<TData>) => TValue);
|
|
18
|
+
export interface NovaChartStyleContext<TData = Record<string, unknown>, TGeometry = unknown> {
|
|
19
|
+
componentId: string;
|
|
20
|
+
componentName: string;
|
|
21
|
+
part: NovaChartPartName | string;
|
|
22
|
+
datum?: NovaChartDatumRef<TData>;
|
|
23
|
+
row?: TData;
|
|
24
|
+
rowIndex?: number;
|
|
25
|
+
series?: NovaChartSeriesMetadata;
|
|
26
|
+
seriesKind?: NovaChartSeriesKind;
|
|
27
|
+
state: NovaChartVisualState;
|
|
28
|
+
geometry?: TGeometry;
|
|
29
|
+
theme?: Record<string, unknown>;
|
|
30
|
+
tokens: NovaChartSemanticTokens;
|
|
31
|
+
scaleIds?: NovaChartSeriesScaleIds;
|
|
32
|
+
className?: string | Array<string>;
|
|
33
|
+
attrs?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
export interface NovaChartMarkStyle<TData = Record<string, unknown>> {
|
|
36
|
+
background?: NovaChartStyleValue<TData, string>;
|
|
37
|
+
fill?: NovaChartStyleValue<TData, string>;
|
|
38
|
+
color?: NovaChartStyleValue<TData, string>;
|
|
39
|
+
stroke?: NovaChartStyleValue<TData, string>;
|
|
40
|
+
strokeColor?: NovaChartStyleValue<TData, string>;
|
|
41
|
+
strokeWidth?: NovaChartStyleValue<TData, number>;
|
|
42
|
+
lineWidth?: NovaChartStyleValue<TData, number>;
|
|
43
|
+
width?: NovaChartStyleValue<TData, number>;
|
|
44
|
+
opacity?: NovaChartStyleValue<TData, number>;
|
|
45
|
+
radius?: NovaChartStyleValue<TData, number>;
|
|
46
|
+
borderRadius?: NovaChartStyleValue<TData, number>;
|
|
47
|
+
dashPattern?: NovaChartStyleValue<TData, Array<number>>;
|
|
48
|
+
}
|
|
49
|
+
export interface NovaChartTextStyle<TData = Record<string, unknown>> {
|
|
50
|
+
color?: NovaChartStyleValue<TData, string>;
|
|
51
|
+
fontFamily?: NovaChartStyleValue<TData, string>;
|
|
52
|
+
fontSize?: NovaChartStyleValue<TData, number>;
|
|
53
|
+
fontWeight?: NovaChartStyleValue<TData, string | number>;
|
|
54
|
+
lineHeight?: NovaChartStyleValue<TData, number>;
|
|
55
|
+
opacity?: NovaChartStyleValue<TData, number>;
|
|
56
|
+
}
|
|
57
|
+
export interface NovaChartSeriesStyleOptions<TData = Record<string, unknown>> extends NovaChartMarkStyle<TData>, NovaChartTextStyle<TData> {
|
|
58
|
+
datum?: (context: NovaChartStyleContext<TData>) => NovaChartMarkStyle<TData> | null | undefined;
|
|
59
|
+
}
|
|
60
|
+
export type NovaChartStateStyleMap<TData = Record<string, unknown>> = Partial<Record<NovaChartVisualState, NovaChartMarkStyle<TData> & NovaChartTextStyle<TData>>>;
|
|
61
|
+
export type NovaChartPartStyleMap<TData = Record<string, unknown>> = Partial<Record<NovaChartPartName | string, NovaChartMarkStyle<TData> & NovaChartTextStyle<TData>>>;
|
|
62
|
+
export interface NovaChartSemanticTokens {
|
|
63
|
+
axisColor?: string;
|
|
64
|
+
gridColor?: string;
|
|
65
|
+
textColor?: string;
|
|
66
|
+
background?: string;
|
|
67
|
+
surface?: string;
|
|
68
|
+
tooltipBackground?: string;
|
|
69
|
+
tooltipText?: string;
|
|
70
|
+
legendText?: string;
|
|
71
|
+
viewportTrack?: string;
|
|
72
|
+
viewportThumb?: string;
|
|
73
|
+
selection?: string;
|
|
74
|
+
mutedOpacity?: number;
|
|
75
|
+
palette?: Array<string>;
|
|
76
|
+
[token: string]: string | number | Array<string> | undefined;
|
|
77
|
+
}
|
|
78
|
+
export interface NovaChartPreset<TData = Record<string, unknown>> {
|
|
79
|
+
name: string;
|
|
80
|
+
tokens?: NovaChartSemanticTokens;
|
|
81
|
+
styles?: Record<string, NovaChartMarkStyle<TData> & NovaChartTextStyle<TData>>;
|
|
82
|
+
}
|
|
83
|
+
export interface NovaChartMotionOptions {
|
|
84
|
+
enter?: boolean | {
|
|
85
|
+
duration?: number;
|
|
86
|
+
easing?: string;
|
|
87
|
+
};
|
|
88
|
+
update?: boolean | {
|
|
89
|
+
duration?: number;
|
|
90
|
+
easing?: string;
|
|
91
|
+
};
|
|
92
|
+
exit?: boolean | {
|
|
93
|
+
duration?: number;
|
|
94
|
+
easing?: string;
|
|
95
|
+
};
|
|
96
|
+
hover?: boolean | {
|
|
97
|
+
duration?: number;
|
|
98
|
+
easing?: string;
|
|
99
|
+
};
|
|
100
|
+
selection?: boolean | {
|
|
101
|
+
duration?: number;
|
|
102
|
+
easing?: string;
|
|
103
|
+
};
|
|
104
|
+
viewport?: boolean | {
|
|
105
|
+
duration?: number;
|
|
106
|
+
easing?: string;
|
|
107
|
+
};
|
|
108
|
+
legend?: boolean | {
|
|
109
|
+
duration?: number;
|
|
110
|
+
easing?: string;
|
|
111
|
+
};
|
|
112
|
+
reducedMotion?: boolean;
|
|
113
|
+
}
|
|
114
|
+
export interface NovaChartRendererContext<TData = Record<string, unknown>, TGeometry = unknown> extends NovaChartStyleContext<TData, TGeometry> {
|
|
115
|
+
defaultSchema?: NovaSchemaItem;
|
|
116
|
+
style: NovaChartResolvedMarkStyle;
|
|
117
|
+
}
|
|
118
|
+
export type NovaChartRenderer<TData = Record<string, unknown>, TGeometry = unknown> = (context: NovaChartRendererContext<TData, TGeometry>) => NovaSchemaItem | NovaSchema | null | undefined;
|
|
119
|
+
export interface NovaChartRenderers<TData = Record<string, unknown>> {
|
|
120
|
+
bar?: NovaChartRenderer<TData, NovaChartBarLayoutItem<TData>>;
|
|
121
|
+
barLabel?: NovaChartRenderer<TData, NovaChartBarLayoutItem<TData>>;
|
|
122
|
+
lineSegment?: NovaChartRenderer<TData, NovaChartLineLayoutSegment>;
|
|
123
|
+
lineMarker?: NovaChartRenderer<TData, NovaChartLineLayoutPoint<TData>>;
|
|
124
|
+
areaFill?: NovaChartRenderer<TData, NovaChartAreaLayoutArea>;
|
|
125
|
+
areaOutline?: NovaChartRenderer<TData, NovaChartLineLayoutSegment>;
|
|
126
|
+
areaMarker?: NovaChartRenderer<TData, NovaChartAreaLayoutPoint<TData>>;
|
|
127
|
+
scatterPoint?: NovaChartRenderer<TData, NovaChartScatterLayoutPoint<TData>>;
|
|
128
|
+
bubble?: NovaChartRenderer<TData, NovaChartBubbleLayoutPoint<TData>>;
|
|
129
|
+
axisTick?: NovaChartRenderer<TData>;
|
|
130
|
+
axisLabel?: NovaChartRenderer<TData>;
|
|
131
|
+
legendItem?: NovaChartRenderer<TData, NovaChartSeriesMetadata>;
|
|
132
|
+
tooltipContent?: (context: NovaChartTooltipContext<TData>) => TooltipContent | null | undefined;
|
|
133
|
+
}
|
|
134
|
+
export interface NovaChartResolvedMarkStyle {
|
|
135
|
+
background?: string;
|
|
136
|
+
fill?: string;
|
|
137
|
+
color?: string;
|
|
138
|
+
stroke?: string;
|
|
139
|
+
strokeColor?: string;
|
|
140
|
+
strokeWidth?: number;
|
|
141
|
+
lineWidth?: number;
|
|
142
|
+
width?: number;
|
|
143
|
+
opacity?: number;
|
|
144
|
+
radius?: number;
|
|
145
|
+
borderRadius?: number;
|
|
146
|
+
dashPattern?: Array<number>;
|
|
147
|
+
fontFamily?: string;
|
|
148
|
+
fontSize?: number;
|
|
149
|
+
fontWeight?: string | number;
|
|
150
|
+
lineHeight?: number;
|
|
151
|
+
}
|
|
152
|
+
export interface NovaChartStyleLayers<TData = Record<string, unknown>> {
|
|
153
|
+
defaults?: NovaChartMarkStyle<TData> & NovaChartTextStyle<TData>;
|
|
154
|
+
legacy?: NovaChartMarkStyle<TData> & NovaChartTextStyle<TData>;
|
|
155
|
+
series?: NovaChartSeriesStyleOptions<TData> | null;
|
|
156
|
+
part?: NovaChartMarkStyle<TData> & NovaChartTextStyle<TData> | null;
|
|
157
|
+
state?: NovaChartMarkStyle<TData> & NovaChartTextStyle<TData> | null;
|
|
158
|
+
datum?: NovaChartMarkStyle<TData> & NovaChartTextStyle<TData> | null;
|
|
159
|
+
}
|
|
160
|
+
export interface NovaChartPluginContext<TData = Record<string, unknown>> {
|
|
161
|
+
runtime: NovaChartRuntimeBridge<TData>;
|
|
162
|
+
tokens: NovaChartSemanticTokens;
|
|
163
|
+
}
|
|
164
|
+
export interface NovaChartPlugin<TData = Record<string, unknown>> {
|
|
165
|
+
name: string;
|
|
166
|
+
order?: number;
|
|
167
|
+
setup?: (context: NovaChartPluginContext<TData>) => void | (() => void);
|
|
168
|
+
resolveMarkStyle?: (context: NovaChartStyleContext<TData>, style: NovaChartResolvedMarkStyle) => NovaChartMarkStyle<TData> | null | undefined;
|
|
169
|
+
renderUnderlay?: (context: NovaChartPluginRenderContext<TData>) => NovaSchema | NovaSchemaItem | null | undefined;
|
|
170
|
+
renderOverlay?: (context: NovaChartPluginRenderContext<TData>) => NovaSchema | NovaSchemaItem | null | undefined;
|
|
171
|
+
decorateTooltip?: (context: NovaChartTooltipContext<TData>, content: TooltipContent | null) => TooltipContent | null;
|
|
172
|
+
decorateLegend?: (series: Array<NovaChartSeriesMetadata>) => Array<NovaChartSeriesMetadata>;
|
|
173
|
+
onInteractionState?: (state: NovaChartInteractionState<TData>) => void;
|
|
174
|
+
}
|
|
175
|
+
export interface NovaChartPluginRenderContext<TData = Record<string, unknown>> {
|
|
176
|
+
componentId: string;
|
|
177
|
+
componentName: string;
|
|
178
|
+
width: number;
|
|
179
|
+
height: number;
|
|
180
|
+
runtime: NovaChartRuntimeBridge<TData>;
|
|
181
|
+
tokens: NovaChartSemanticTokens;
|
|
182
|
+
}
|
|
183
|
+
export interface NovaChartRuntimeBridge<TData = Record<string, unknown>> {
|
|
184
|
+
id: string;
|
|
185
|
+
getData: () => ReadonlyArray<TData>;
|
|
186
|
+
getScale: <TValue extends ChartScaleValue = ChartScaleValue>(id: string) => ChartScale<TValue> | undefined;
|
|
187
|
+
getSeriesMetadata: () => Array<NovaChartSeriesMetadata>;
|
|
188
|
+
getInteractionState: () => NovaChartInteractionState<TData>;
|
|
189
|
+
}
|
|
190
|
+
export interface NovaChartCustomizationProps<TData = Record<string, unknown>> {
|
|
191
|
+
styleSheet?: string;
|
|
192
|
+
visualPreset?: NovaChartVisualPresetName;
|
|
193
|
+
plugins?: Array<NovaChartPlugin<TData>>;
|
|
194
|
+
}
|
|
195
|
+
export interface NovaChartAccessibilityOptions<TData = Record<string, unknown>> {
|
|
196
|
+
label?: string;
|
|
197
|
+
description?: string;
|
|
198
|
+
dataSummary?: string | ((data: ReadonlyArray<TData>) => string);
|
|
199
|
+
includeVisibleMarks?: boolean;
|
|
200
|
+
maxMarks?: number;
|
|
201
|
+
keyboardNavigation?: boolean;
|
|
202
|
+
exposeTooltip?: boolean;
|
|
203
|
+
exposeLegend?: boolean;
|
|
204
|
+
}
|
|
205
|
+
export interface NovaChartResolvedAccessibilityOptions<TData = Record<string, unknown>> extends NovaChartAccessibilityOptions<TData> {
|
|
206
|
+
includeVisibleMarks: boolean;
|
|
207
|
+
maxMarks: number;
|
|
208
|
+
keyboardNavigation: boolean;
|
|
209
|
+
exposeTooltip: boolean;
|
|
210
|
+
exposeLegend: boolean;
|
|
211
|
+
}
|
|
212
|
+
export interface NovaChartSeriesCustomizationProps<TData = Record<string, unknown>> {
|
|
213
|
+
style?: NovaChartSeriesStyleOptions<TData>;
|
|
214
|
+
states?: NovaChartStateStyleMap<TData>;
|
|
215
|
+
parts?: NovaChartPartStyleMap<TData>;
|
|
216
|
+
renderers?: NovaChartRenderers<TData>;
|
|
217
|
+
motion?: any;
|
|
218
|
+
}
|
|
219
|
+
export interface NovaChartSeriesCommonProps<TData = Record<string, unknown>> extends Omit<NovaUiCommonProps, 'style' | 'motion'>, NovaChartSeriesCustomizationProps<TData> {
|
|
220
|
+
}
|
|
221
|
+
export interface NovaChartSeriesCommonResolvedProps<TData = Record<string, unknown>> extends Omit<NovaUiCommonResolvedProps, 'style' | 'motion'>, NovaChartSeriesCustomizationProps<TData> {
|
|
222
|
+
className?: string | Array<string>;
|
|
223
|
+
attrs?: Record<string, NovaUiStyleAttrValue>;
|
|
224
|
+
}
|
|
225
|
+
export type NovaChartBarOrientation = 'vertical' | 'horizontal';
|
|
226
|
+
export type NovaChartBarMode = 'single' | 'grouped' | 'stacked';
|
|
227
|
+
export type NovaChartBarLabelPosition = 'inside' | 'outside' | 'center' | 'start' | 'end';
|
|
228
|
+
export type NovaChartLineCurve = 'linear' | 'step' | 'smooth';
|
|
229
|
+
export type NovaChartPointRenderMode = 'direct' | 'windowed' | 'sampled';
|
|
230
|
+
export type NovaChartAreaMode = 'single' | 'stacked';
|
|
231
|
+
export type NovaChartBubbleSizeScale = 'sqrt' | 'linear';
|
|
232
|
+
export interface NovaChartPointerState {
|
|
233
|
+
x: number;
|
|
234
|
+
y: number;
|
|
235
|
+
plotX: number;
|
|
236
|
+
plotY: number;
|
|
237
|
+
}
|
|
238
|
+
export interface NovaChartHitTestInput {
|
|
239
|
+
x: number;
|
|
240
|
+
y: number;
|
|
241
|
+
mode?: NovaChartHitTestMode;
|
|
242
|
+
maxDistancePx?: number;
|
|
243
|
+
}
|
|
244
|
+
export interface NovaChartDatumRef<TData = Record<string, unknown>> {
|
|
245
|
+
seriesId: string;
|
|
246
|
+
seriesKind?: NovaChartSeriesKind;
|
|
247
|
+
key: string;
|
|
248
|
+
mode: NovaChartInteractionMode;
|
|
249
|
+
row?: TData;
|
|
250
|
+
value: number;
|
|
251
|
+
rawValue?: number;
|
|
252
|
+
xValue?: ChartScaleValue;
|
|
253
|
+
yValue?: ChartScaleValue;
|
|
254
|
+
label?: string;
|
|
255
|
+
category?: string;
|
|
256
|
+
seriesKey?: string;
|
|
257
|
+
seriesLabel?: string;
|
|
258
|
+
color?: string;
|
|
259
|
+
point?: {
|
|
260
|
+
x: number;
|
|
261
|
+
y: number;
|
|
262
|
+
};
|
|
263
|
+
bounds?: {
|
|
264
|
+
x: number;
|
|
265
|
+
y: number;
|
|
266
|
+
width: number;
|
|
267
|
+
height: number;
|
|
268
|
+
};
|
|
269
|
+
distancePx: number;
|
|
270
|
+
}
|
|
271
|
+
export type NovaChartHitTestResult<TData = Record<string, unknown>> = NovaChartDatumRef<TData>;
|
|
272
|
+
export interface NovaChartInteractionState<TData = Record<string, unknown>> {
|
|
273
|
+
pointer: NovaChartPointerState | null;
|
|
274
|
+
hovered: NovaChartDatumRef<TData> | null;
|
|
275
|
+
tooltipVisible: boolean;
|
|
276
|
+
revision: number;
|
|
277
|
+
}
|
|
278
|
+
export type NovaChartInteractionListener<TData = Record<string, unknown>> = (state: NovaChartInteractionState<TData>) => void;
|
|
279
|
+
export interface NovaChartRootProps<TData = Record<string, unknown>> extends NovaUiCommonProps, NovaChartCustomizationProps<TData> {
|
|
280
|
+
data?: Array<TData>;
|
|
281
|
+
keyField?: NovaChartFieldAccessor<TData, NovaChartRowKey>;
|
|
282
|
+
refScope?: NovaScope;
|
|
283
|
+
accessibility?: false | NovaChartAccessibilityOptions<TData>;
|
|
284
|
+
}
|
|
285
|
+
export interface NovaChartRootResolvedProps<TData = Record<string, unknown>> extends NovaUiCommonResolvedProps, NovaChartCustomizationProps<TData> {
|
|
286
|
+
data: Array<TData>;
|
|
287
|
+
keyField?: NovaChartFieldAccessor<TData, NovaChartRowKey>;
|
|
288
|
+
refScope?: NovaScope;
|
|
289
|
+
accessibility: false | NovaChartResolvedAccessibilityOptions<TData>;
|
|
290
|
+
}
|
|
291
|
+
export interface NovaChartRootDiagnostics<TData = Record<string, unknown>> {
|
|
292
|
+
rowCount: number;
|
|
293
|
+
scaleCount: number;
|
|
294
|
+
componentCount: number;
|
|
295
|
+
dataRevision: number;
|
|
296
|
+
scalesRevision: number;
|
|
297
|
+
lastEvent: string;
|
|
298
|
+
series: Record<string, NovaChartSeriesDiagnostics>;
|
|
299
|
+
data?: TData;
|
|
300
|
+
}
|
|
301
|
+
export interface NovaChartRootApi<TData = Record<string, unknown>> {
|
|
302
|
+
setData: (data: Array<TData>) => void;
|
|
303
|
+
getData: () => ReadonlyArray<TData>;
|
|
304
|
+
updateRows: (rows: Array<Partial<TData> & Record<string, unknown>>) => void;
|
|
305
|
+
removeRows: (keys: Array<NovaChartRowKey>) => void;
|
|
306
|
+
getScale: <TValue extends ChartScaleValue = ChartScaleValue>(id: string) => ChartScale<TValue> | undefined;
|
|
307
|
+
requireScale: <TValue extends ChartScaleValue = ChartScaleValue>(id: string) => ChartScale<TValue>;
|
|
308
|
+
setScaleDomain: (id: string, domain: ChartScaleDomain) => void;
|
|
309
|
+
setScaleRange: (id: string, range: ChartScaleRange) => void;
|
|
310
|
+
getScaleSourceDomain: (id: string) => ChartScaleDomain | undefined;
|
|
311
|
+
setScaleDomainContribution: (contribution: NovaChartScaleDomainContribution) => void;
|
|
312
|
+
removeScaleDomainContribution: (id: string) => void;
|
|
313
|
+
getScaleDomainContributions: (scaleId?: string) => Array<NovaChartScaleDomainContribution>;
|
|
314
|
+
refresh: () => void;
|
|
315
|
+
getDiagnostics: () => NovaChartRootDiagnostics<TData>;
|
|
316
|
+
getInteractionState: () => NovaChartInteractionState<TData>;
|
|
317
|
+
setInteractionState: (patch: Partial<Omit<NovaChartInteractionState<TData>, 'revision'>>) => void;
|
|
318
|
+
setChildren: (children: Array<NovaTemplateChildSchema>) => void;
|
|
319
|
+
exportChart: (options?: NovaExportImageOptions) => Promise<NovaExportImageResult>;
|
|
320
|
+
getSemanticSnapshot: (options?: NovaSemanticSnapshotOptions) => NovaSemanticSnapshot;
|
|
321
|
+
subscribe: (listener: NovaChartDataListener<TData>) => () => void;
|
|
322
|
+
subscribeInteraction: (listener: NovaChartInteractionListener<TData>) => () => void;
|
|
323
|
+
}
|
|
324
|
+
export interface NovaChartScaleProps<TData = Record<string, unknown>> extends NovaUiCommonProps {
|
|
325
|
+
scaleId?: string;
|
|
326
|
+
scaleType: ChartScaleType;
|
|
327
|
+
field?: NovaChartFieldAccessor<TData>;
|
|
328
|
+
domain?: ChartScaleDomain;
|
|
329
|
+
zero?: boolean;
|
|
330
|
+
nice?: boolean;
|
|
331
|
+
clamp?: boolean;
|
|
332
|
+
paddingInner?: number;
|
|
333
|
+
paddingOuter?: number;
|
|
334
|
+
locale?: string;
|
|
335
|
+
timezone?: string;
|
|
336
|
+
}
|
|
337
|
+
export interface NovaChartScaleResolvedProps<TData = Record<string, unknown>> extends NovaUiCommonResolvedProps {
|
|
338
|
+
scaleId?: string;
|
|
339
|
+
scaleType: ChartScaleType;
|
|
340
|
+
field?: NovaChartFieldAccessor<TData>;
|
|
341
|
+
domain?: ChartScaleDomain;
|
|
342
|
+
zero: boolean;
|
|
343
|
+
nice: boolean;
|
|
344
|
+
clamp: boolean;
|
|
345
|
+
paddingInner: number;
|
|
346
|
+
paddingOuter: number;
|
|
347
|
+
locale: string;
|
|
348
|
+
timezone: string;
|
|
349
|
+
}
|
|
350
|
+
export interface NovaChartScaleApi {
|
|
351
|
+
getScaleId: () => string;
|
|
352
|
+
getScale: () => ChartScale | null;
|
|
353
|
+
refresh: () => void;
|
|
354
|
+
}
|
|
355
|
+
export interface NovaChartPlotProps extends NovaUiCommonProps {
|
|
356
|
+
chartRef?: string;
|
|
357
|
+
xScaleId?: string;
|
|
358
|
+
yScaleId?: string;
|
|
359
|
+
xScaleIds?: Array<string>;
|
|
360
|
+
yScaleIds?: Array<string>;
|
|
361
|
+
}
|
|
362
|
+
export interface NovaChartPlotResolvedProps extends NovaUiCommonResolvedProps {
|
|
363
|
+
chartRef?: string;
|
|
364
|
+
xScaleId?: string;
|
|
365
|
+
yScaleId?: string;
|
|
366
|
+
xScaleIds?: Array<string>;
|
|
367
|
+
yScaleIds?: Array<string>;
|
|
368
|
+
}
|
|
369
|
+
export interface NovaChartPlotApi {
|
|
370
|
+
refresh: () => void;
|
|
371
|
+
setChildren: (children: Array<NovaTemplateChildSchema>) => void;
|
|
372
|
+
getRect: () => {
|
|
373
|
+
x: number;
|
|
374
|
+
y: number;
|
|
375
|
+
width: number;
|
|
376
|
+
height: number;
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
export interface NovaChartAxisProps extends NovaUiCommonProps {
|
|
380
|
+
chartRef?: string;
|
|
381
|
+
scaleId: string;
|
|
382
|
+
orientation: 'horizontal' | 'vertical';
|
|
383
|
+
tickSide?: 'start' | 'end';
|
|
384
|
+
labelSide?: 'start' | 'end';
|
|
385
|
+
labelRotation?: number | 'auto';
|
|
386
|
+
tickSize?: number;
|
|
387
|
+
labelPadding?: number;
|
|
388
|
+
ticks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
389
|
+
lineColor?: string;
|
|
390
|
+
tickColor?: string;
|
|
391
|
+
labelColor?: string;
|
|
392
|
+
}
|
|
393
|
+
export interface NovaChartAxisResolvedProps extends NovaUiCommonResolvedProps {
|
|
394
|
+
className?: string | Array<string>;
|
|
395
|
+
attrs?: Record<string, NovaUiStyleAttrValue>;
|
|
396
|
+
chartRef?: string;
|
|
397
|
+
scaleId: string;
|
|
398
|
+
orientation: 'horizontal' | 'vertical';
|
|
399
|
+
tickSide: 'start' | 'end';
|
|
400
|
+
labelSide: 'start' | 'end';
|
|
401
|
+
labelRotation: number | 'auto';
|
|
402
|
+
tickSize: number;
|
|
403
|
+
labelPadding: number;
|
|
404
|
+
ticks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
405
|
+
lineColor: string;
|
|
406
|
+
tickColor: string;
|
|
407
|
+
labelColor: string;
|
|
408
|
+
}
|
|
409
|
+
export interface NovaChartAxisApi {
|
|
410
|
+
refresh: () => void;
|
|
411
|
+
getTickCount: () => number;
|
|
412
|
+
}
|
|
413
|
+
export interface NovaChartGridProps extends NovaUiCommonProps {
|
|
414
|
+
chartRef?: string;
|
|
415
|
+
xScaleId?: string;
|
|
416
|
+
yScaleId?: string;
|
|
417
|
+
xTicks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
418
|
+
yTicks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
419
|
+
lineColor?: string;
|
|
420
|
+
}
|
|
421
|
+
export interface NovaChartGridResolvedProps extends NovaUiCommonResolvedProps {
|
|
422
|
+
className?: string | Array<string>;
|
|
423
|
+
attrs?: Record<string, NovaUiStyleAttrValue>;
|
|
424
|
+
chartRef?: string;
|
|
425
|
+
xScaleId?: string;
|
|
426
|
+
yScaleId?: string;
|
|
427
|
+
xTicks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
428
|
+
yTicks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
429
|
+
lineColor: string;
|
|
430
|
+
}
|
|
431
|
+
export interface NovaChartGridApi {
|
|
432
|
+
refresh: () => void;
|
|
433
|
+
getLineCount: () => number;
|
|
434
|
+
}
|
|
435
|
+
export interface NovaChartBarVirtualizationOptions {
|
|
436
|
+
enabled?: boolean;
|
|
437
|
+
overscanPx?: number;
|
|
438
|
+
minBarWidthPx?: number;
|
|
439
|
+
maxRenderedBars?: number;
|
|
440
|
+
aggregation?: NovaChartBarAggregationMode;
|
|
441
|
+
}
|
|
442
|
+
export interface NovaChartBarHighlightOptions {
|
|
443
|
+
enabled?: boolean;
|
|
444
|
+
fill?: string;
|
|
445
|
+
strokeColor?: string;
|
|
446
|
+
strokeWidth?: number;
|
|
447
|
+
opacity?: number;
|
|
448
|
+
}
|
|
449
|
+
export interface NovaChartBarLabelContext<TData = Record<string, unknown>> {
|
|
450
|
+
row?: TData;
|
|
451
|
+
key: string;
|
|
452
|
+
value: number;
|
|
453
|
+
category: string;
|
|
454
|
+
seriesKey?: string;
|
|
455
|
+
seriesLabel?: string;
|
|
456
|
+
}
|
|
457
|
+
export interface NovaChartBarLabelOptions<TData = Record<string, unknown>> {
|
|
458
|
+
visible?: boolean;
|
|
459
|
+
position?: NovaChartBarLabelPosition;
|
|
460
|
+
color?: string;
|
|
461
|
+
fontSize?: number;
|
|
462
|
+
fontWeight?: string | number;
|
|
463
|
+
formatter?: (context: NovaChartBarLabelContext<TData>) => string;
|
|
464
|
+
}
|
|
465
|
+
export interface NovaChartBarColorContext<TData = Record<string, unknown>> {
|
|
466
|
+
row?: TData;
|
|
467
|
+
key: string;
|
|
468
|
+
value: number;
|
|
469
|
+
category: string;
|
|
470
|
+
seriesKey?: string;
|
|
471
|
+
}
|
|
472
|
+
export interface NovaChartBarColorOptions<TData = Record<string, unknown>> {
|
|
473
|
+
palette?: Array<string>;
|
|
474
|
+
colorField?: NovaChartFieldAccessor<TData>;
|
|
475
|
+
fill?: string | ((context: NovaChartBarColorContext<TData>) => string);
|
|
476
|
+
highlight?: NovaChartBarHighlightOptions;
|
|
477
|
+
}
|
|
478
|
+
export interface NovaChartBarSeriesProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonProps<TData> {
|
|
479
|
+
chartRef?: string;
|
|
480
|
+
xScaleId: string;
|
|
481
|
+
yScaleId: string;
|
|
482
|
+
xField?: NovaChartFieldAccessor<TData>;
|
|
483
|
+
yField?: NovaChartFieldAccessor<TData, number>;
|
|
484
|
+
categoryField?: NovaChartFieldAccessor<TData>;
|
|
485
|
+
valueField?: NovaChartFieldAccessor<TData, number>;
|
|
486
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
487
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
488
|
+
orientation?: NovaChartBarOrientation;
|
|
489
|
+
mode?: NovaChartBarMode;
|
|
490
|
+
fill?: string;
|
|
491
|
+
radius?: number;
|
|
492
|
+
minBarSize?: number;
|
|
493
|
+
virtualization?: NovaChartBarVirtualizationOptions;
|
|
494
|
+
highlight?: NovaChartBarHighlightOptions;
|
|
495
|
+
labels?: NovaChartBarLabelOptions<TData>;
|
|
496
|
+
colors?: NovaChartBarColorOptions<TData>;
|
|
497
|
+
}
|
|
498
|
+
export interface NovaChartBarSeriesResolvedProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonResolvedProps<TData> {
|
|
499
|
+
chartRef?: string;
|
|
500
|
+
xScaleId: string;
|
|
501
|
+
yScaleId: string;
|
|
502
|
+
xField?: NovaChartFieldAccessor<TData>;
|
|
503
|
+
yField?: NovaChartFieldAccessor<TData, number>;
|
|
504
|
+
categoryField: NovaChartFieldAccessor<TData>;
|
|
505
|
+
valueField: NovaChartFieldAccessor<TData, number>;
|
|
506
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
507
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
508
|
+
orientation: NovaChartBarOrientation;
|
|
509
|
+
mode: NovaChartBarMode;
|
|
510
|
+
fill: string;
|
|
511
|
+
radius: number;
|
|
512
|
+
minBarSize: number;
|
|
513
|
+
virtualization: Required<NovaChartBarVirtualizationOptions>;
|
|
514
|
+
highlight: Required<NovaChartBarHighlightOptions>;
|
|
515
|
+
labels: Required<Omit<NovaChartBarLabelOptions<TData>, 'formatter'>> & Pick<NovaChartBarLabelOptions<TData>, 'formatter'>;
|
|
516
|
+
colors: Required<Omit<NovaChartBarColorOptions<TData>, 'fill' | 'colorField' | 'highlight'>> & Pick<NovaChartBarColorOptions<TData>, 'fill' | 'colorField' | 'highlight'>;
|
|
517
|
+
}
|
|
518
|
+
export interface NovaChartBarLayoutItem<TData = Record<string, unknown>> {
|
|
519
|
+
key: string;
|
|
520
|
+
row?: TData;
|
|
521
|
+
value: number;
|
|
522
|
+
rawValue?: number;
|
|
523
|
+
category: string;
|
|
524
|
+
seriesKey?: string;
|
|
525
|
+
seriesLabel?: string;
|
|
526
|
+
color?: string;
|
|
527
|
+
labelText?: string;
|
|
528
|
+
x: number;
|
|
529
|
+
y: number;
|
|
530
|
+
width: number;
|
|
531
|
+
height: number;
|
|
532
|
+
label?: string;
|
|
533
|
+
}
|
|
534
|
+
export interface NovaChartSeriesDiagnostics {
|
|
535
|
+
kind: NovaChartSeriesKind;
|
|
536
|
+
domainMs: number;
|
|
537
|
+
layoutMs: number;
|
|
538
|
+
schemaMs: number;
|
|
539
|
+
totalMs: number;
|
|
540
|
+
}
|
|
541
|
+
export interface NovaChartBarSeriesDiagnostics extends NovaChartSeriesDiagnostics {
|
|
542
|
+
kind: 'bar';
|
|
543
|
+
inputRows: number;
|
|
544
|
+
visibleRows: number;
|
|
545
|
+
renderedBars: number;
|
|
546
|
+
aggregatedBuckets: number;
|
|
547
|
+
mode: NovaChartBarRenderMode;
|
|
548
|
+
}
|
|
549
|
+
export interface NovaChartBarLayoutPlan<TData = Record<string, unknown>> {
|
|
550
|
+
items: Array<NovaChartBarLayoutItem<TData>>;
|
|
551
|
+
orientation: NovaChartBarOrientation;
|
|
552
|
+
mode: NovaChartBarMode;
|
|
553
|
+
categories: Array<string>;
|
|
554
|
+
series: Array<NovaChartSeriesMetadata>;
|
|
555
|
+
diagnostics: NovaChartBarSeriesDiagnostics;
|
|
556
|
+
}
|
|
557
|
+
export interface NovaChartBarSeriesApi<TData = Record<string, unknown>> {
|
|
558
|
+
getLayoutPlan: () => NovaChartBarLayoutPlan<TData>;
|
|
559
|
+
getDiagnostics: () => NovaChartBarSeriesDiagnostics;
|
|
560
|
+
hitTest: (input: NovaChartHitTestInput) => NovaChartHitTestResult<TData> | null;
|
|
561
|
+
refresh: () => void;
|
|
562
|
+
setVirtualization: (options: NovaChartBarVirtualizationOptions) => void;
|
|
563
|
+
}
|
|
564
|
+
export interface NovaChartLineVirtualizationOptions {
|
|
565
|
+
enabled?: boolean;
|
|
566
|
+
overscanPx?: number;
|
|
567
|
+
maxRenderedPoints?: number;
|
|
568
|
+
}
|
|
569
|
+
export interface NovaChartLineMarkerOptions<TData = Record<string, unknown>> {
|
|
570
|
+
visible?: boolean;
|
|
571
|
+
radius?: number | ((context: NovaChartLinePointContext<TData>) => number);
|
|
572
|
+
fill?: string | ((context: NovaChartLinePointContext<TData>) => string);
|
|
573
|
+
strokeColor?: string | ((context: NovaChartLinePointContext<TData>) => string);
|
|
574
|
+
strokeWidth?: number;
|
|
575
|
+
}
|
|
576
|
+
export interface NovaChartLinePointContext<TData = Record<string, unknown>> {
|
|
577
|
+
row?: TData;
|
|
578
|
+
rowIndex?: number;
|
|
579
|
+
key: string;
|
|
580
|
+
xValue: ChartScaleValue;
|
|
581
|
+
yValue: number;
|
|
582
|
+
seriesKey: string;
|
|
583
|
+
seriesLabel: string;
|
|
584
|
+
}
|
|
585
|
+
export interface NovaChartLineColorContext<TData = Record<string, unknown>> extends NovaChartLinePointContext<TData> {
|
|
586
|
+
}
|
|
587
|
+
export interface NovaChartLineColorOptions<TData = Record<string, unknown>> {
|
|
588
|
+
palette?: Array<string>;
|
|
589
|
+
colorField?: NovaChartFieldAccessor<TData>;
|
|
590
|
+
stroke?: string | ((context: NovaChartLineColorContext<TData>) => string);
|
|
591
|
+
}
|
|
592
|
+
export interface NovaChartLineSeriesProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonProps<TData> {
|
|
593
|
+
chartRef?: string;
|
|
594
|
+
xScaleId: string;
|
|
595
|
+
yScaleId: string;
|
|
596
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
597
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
598
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
599
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
600
|
+
curve?: NovaChartLineCurve;
|
|
601
|
+
stroke?: string;
|
|
602
|
+
strokeWidth?: number;
|
|
603
|
+
opacity?: number;
|
|
604
|
+
dashPattern?: Array<number>;
|
|
605
|
+
referenceLines?: Array<number>;
|
|
606
|
+
markers?: NovaChartLineMarkerOptions<TData>;
|
|
607
|
+
colors?: NovaChartLineColorOptions<TData>;
|
|
608
|
+
defined?: (context: NovaChartLinePointContext<TData>) => boolean;
|
|
609
|
+
connectNulls?: boolean;
|
|
610
|
+
hitRadiusPx?: number;
|
|
611
|
+
virtualization?: NovaChartLineVirtualizationOptions;
|
|
612
|
+
}
|
|
613
|
+
export interface NovaChartLineSeriesResolvedProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonResolvedProps<TData> {
|
|
614
|
+
chartRef?: string;
|
|
615
|
+
xScaleId: string;
|
|
616
|
+
yScaleId: string;
|
|
617
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
618
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
619
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
620
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
621
|
+
curve: NovaChartLineCurve;
|
|
622
|
+
stroke: string;
|
|
623
|
+
strokeWidth: number;
|
|
624
|
+
opacity: number;
|
|
625
|
+
dashPattern?: Array<number>;
|
|
626
|
+
referenceLines: Array<number>;
|
|
627
|
+
markers: Required<Omit<NovaChartLineMarkerOptions<TData>, 'radius' | 'fill' | 'strokeColor'>> & Pick<NovaChartLineMarkerOptions<TData>, 'radius' | 'fill' | 'strokeColor'>;
|
|
628
|
+
colors: Required<Omit<NovaChartLineColorOptions<TData>, 'stroke' | 'colorField'>> & Pick<NovaChartLineColorOptions<TData>, 'stroke' | 'colorField'>;
|
|
629
|
+
defined?: (context: NovaChartLinePointContext<TData>) => boolean;
|
|
630
|
+
connectNulls: boolean;
|
|
631
|
+
hitRadiusPx: number;
|
|
632
|
+
virtualization: Required<NovaChartLineVirtualizationOptions>;
|
|
633
|
+
}
|
|
634
|
+
export interface NovaChartLineLayoutPoint<TData = Record<string, unknown>> {
|
|
635
|
+
key: string;
|
|
636
|
+
row?: TData;
|
|
637
|
+
rowIndex: number;
|
|
638
|
+
xValue: ChartScaleValue;
|
|
639
|
+
yValue: number;
|
|
640
|
+
rawValue?: number;
|
|
641
|
+
seriesKey: string;
|
|
642
|
+
seriesLabel: string;
|
|
643
|
+
color: string;
|
|
644
|
+
x: number;
|
|
645
|
+
y: number;
|
|
646
|
+
}
|
|
647
|
+
export interface NovaChartLineLayoutSegment {
|
|
648
|
+
key: string;
|
|
649
|
+
seriesKey: string;
|
|
650
|
+
color: string;
|
|
651
|
+
x1: number;
|
|
652
|
+
y1: number;
|
|
653
|
+
x2: number;
|
|
654
|
+
y2: number;
|
|
655
|
+
}
|
|
656
|
+
export interface NovaChartLineSeriesDiagnostics extends NovaChartSeriesDiagnostics {
|
|
657
|
+
kind: 'line';
|
|
658
|
+
inputRows: number;
|
|
659
|
+
visibleRows: number;
|
|
660
|
+
renderedPoints: number;
|
|
661
|
+
renderedSegments: number;
|
|
662
|
+
skippedRows: number;
|
|
663
|
+
seriesCount: number;
|
|
664
|
+
mode: NovaChartLineRenderMode;
|
|
665
|
+
}
|
|
666
|
+
export interface NovaChartLineLayoutPlan<TData = Record<string, unknown>> {
|
|
667
|
+
points: Array<NovaChartLineLayoutPoint<TData>>;
|
|
668
|
+
segments: Array<NovaChartLineLayoutSegment>;
|
|
669
|
+
series: Array<NovaChartSeriesMetadata>;
|
|
670
|
+
diagnostics: NovaChartLineSeriesDiagnostics;
|
|
671
|
+
}
|
|
672
|
+
export interface NovaChartLineSeriesApi<TData = Record<string, unknown>> {
|
|
673
|
+
getLayoutPlan: () => NovaChartLineLayoutPlan<TData>;
|
|
674
|
+
getDiagnostics: () => NovaChartLineSeriesDiagnostics;
|
|
675
|
+
hitTest: (input: NovaChartHitTestInput) => NovaChartHitTestResult<TData> | null;
|
|
676
|
+
refresh: () => void;
|
|
677
|
+
setVirtualization: (options: NovaChartLineVirtualizationOptions) => void;
|
|
678
|
+
}
|
|
679
|
+
export interface NovaChartPointSeriesVirtualizationOptions {
|
|
680
|
+
enabled?: boolean;
|
|
681
|
+
overscanPx?: number;
|
|
682
|
+
maxRenderedPoints?: number;
|
|
683
|
+
sampling?: 'stride' | 'lttb';
|
|
684
|
+
}
|
|
685
|
+
export interface NovaChartPointSeriesResolvedVirtualizationOptions {
|
|
686
|
+
enabled: boolean;
|
|
687
|
+
overscanPx: number;
|
|
688
|
+
maxRenderedPoints: number;
|
|
689
|
+
sampling: 'stride' | 'lttb';
|
|
690
|
+
}
|
|
691
|
+
export interface NovaChartPointContext<TData = Record<string, unknown>> {
|
|
692
|
+
row?: TData;
|
|
693
|
+
rowIndex?: number;
|
|
694
|
+
key: string;
|
|
695
|
+
xValue: ChartScaleValue;
|
|
696
|
+
yValue: number;
|
|
697
|
+
seriesKey: string;
|
|
698
|
+
seriesLabel: string;
|
|
699
|
+
}
|
|
700
|
+
export interface NovaChartScatterColorOptions<TData = Record<string, unknown>> {
|
|
701
|
+
palette?: Array<string>;
|
|
702
|
+
colorField?: NovaChartFieldAccessor<TData>;
|
|
703
|
+
fill?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
704
|
+
}
|
|
705
|
+
export interface NovaChartScatterHighlightOptions {
|
|
706
|
+
enabled?: boolean;
|
|
707
|
+
fill?: string;
|
|
708
|
+
strokeColor?: string;
|
|
709
|
+
strokeWidth?: number;
|
|
710
|
+
opacity?: number;
|
|
711
|
+
radiusDelta?: number;
|
|
712
|
+
}
|
|
713
|
+
export interface NovaChartScatterSeriesProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonProps<TData> {
|
|
714
|
+
chartRef?: string;
|
|
715
|
+
xScaleId: string;
|
|
716
|
+
yScaleId: string;
|
|
717
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
718
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
719
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
720
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
721
|
+
radius?: number | ((context: NovaChartPointContext<TData>) => number);
|
|
722
|
+
fill?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
723
|
+
strokeColor?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
724
|
+
strokeWidth?: number;
|
|
725
|
+
opacity?: number;
|
|
726
|
+
colors?: NovaChartScatterColorOptions<TData>;
|
|
727
|
+
highlight?: NovaChartScatterHighlightOptions;
|
|
728
|
+
hitRadiusPx?: number;
|
|
729
|
+
virtualization?: NovaChartPointSeriesVirtualizationOptions;
|
|
730
|
+
}
|
|
731
|
+
export interface NovaChartScatterSeriesResolvedProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonResolvedProps<TData> {
|
|
732
|
+
chartRef?: string;
|
|
733
|
+
xScaleId: string;
|
|
734
|
+
yScaleId: string;
|
|
735
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
736
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
737
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
738
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
739
|
+
radius: number | ((context: NovaChartPointContext<TData>) => number);
|
|
740
|
+
fill?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
741
|
+
strokeColor?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
742
|
+
strokeWidth: number;
|
|
743
|
+
opacity: number;
|
|
744
|
+
colors: Required<Omit<NovaChartScatterColorOptions<TData>, 'fill' | 'colorField'>> & Pick<NovaChartScatterColorOptions<TData>, 'fill' | 'colorField'>;
|
|
745
|
+
highlight: Required<NovaChartScatterHighlightOptions>;
|
|
746
|
+
hitRadiusPx: number;
|
|
747
|
+
virtualization: NovaChartPointSeriesResolvedVirtualizationOptions;
|
|
748
|
+
}
|
|
749
|
+
export interface NovaChartScatterLayoutPoint<TData = Record<string, unknown>> {
|
|
750
|
+
key: string;
|
|
751
|
+
row?: TData;
|
|
752
|
+
rowIndex: number;
|
|
753
|
+
xValue: ChartScaleValue;
|
|
754
|
+
yValue: number;
|
|
755
|
+
rawValue?: number;
|
|
756
|
+
seriesKey: string;
|
|
757
|
+
seriesLabel: string;
|
|
758
|
+
color: string;
|
|
759
|
+
strokeColor?: string;
|
|
760
|
+
strokeWidth: number;
|
|
761
|
+
opacity: number;
|
|
762
|
+
x: number;
|
|
763
|
+
y: number;
|
|
764
|
+
radius: number;
|
|
765
|
+
}
|
|
766
|
+
export interface NovaChartScatterSeriesDiagnostics extends NovaChartSeriesDiagnostics {
|
|
767
|
+
kind: 'scatter';
|
|
768
|
+
inputRows: number;
|
|
769
|
+
visibleRows: number;
|
|
770
|
+
renderedPoints: number;
|
|
771
|
+
skippedRows: number;
|
|
772
|
+
seriesCount: number;
|
|
773
|
+
mode: NovaChartPointRenderMode;
|
|
774
|
+
}
|
|
775
|
+
export interface NovaChartScatterLayoutPlan<TData = Record<string, unknown>> {
|
|
776
|
+
points: Array<NovaChartScatterLayoutPoint<TData>>;
|
|
777
|
+
series: Array<NovaChartSeriesMetadata>;
|
|
778
|
+
diagnostics: NovaChartScatterSeriesDiagnostics;
|
|
779
|
+
}
|
|
780
|
+
export interface NovaChartScatterSeriesApi<TData = Record<string, unknown>> {
|
|
781
|
+
getLayoutPlan: () => NovaChartScatterLayoutPlan<TData>;
|
|
782
|
+
getDiagnostics: () => NovaChartScatterSeriesDiagnostics;
|
|
783
|
+
hitTest: (input: NovaChartHitTestInput) => NovaChartHitTestResult<TData> | null;
|
|
784
|
+
refresh: () => void;
|
|
785
|
+
setVirtualization: (options: NovaChartPointSeriesVirtualizationOptions) => void;
|
|
786
|
+
}
|
|
787
|
+
export interface NovaChartAreaMarkerOptions<TData = Record<string, unknown>> extends NovaChartLineMarkerOptions<TData> {
|
|
788
|
+
}
|
|
789
|
+
export interface NovaChartAreaColorOptions<TData = Record<string, unknown>> {
|
|
790
|
+
palette?: Array<string>;
|
|
791
|
+
colorField?: NovaChartFieldAccessor<TData>;
|
|
792
|
+
fill?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
793
|
+
stroke?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
794
|
+
}
|
|
795
|
+
export interface NovaChartAreaSeriesProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonProps<TData> {
|
|
796
|
+
chartRef?: string;
|
|
797
|
+
xScaleId: string;
|
|
798
|
+
yScaleId: string;
|
|
799
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
800
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
801
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
802
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
803
|
+
curve?: NovaChartLineCurve | 'smooth';
|
|
804
|
+
baselineValue?: number;
|
|
805
|
+
baselineField?: NovaChartFieldAccessor<TData, number>;
|
|
806
|
+
mode?: NovaChartAreaMode;
|
|
807
|
+
fill?: string;
|
|
808
|
+
stroke?: string;
|
|
809
|
+
strokeWidth?: number;
|
|
810
|
+
opacity?: number;
|
|
811
|
+
gradientTo?: string | Record<string, string>;
|
|
812
|
+
gradientSteps?: number;
|
|
813
|
+
focusOnHover?: boolean;
|
|
814
|
+
colors?: NovaChartAreaColorOptions<TData>;
|
|
815
|
+
markers?: NovaChartAreaMarkerOptions<TData>;
|
|
816
|
+
defined?: (context: NovaChartPointContext<TData>) => boolean;
|
|
817
|
+
connectNulls?: boolean;
|
|
818
|
+
hitRadiusPx?: number;
|
|
819
|
+
virtualization?: NovaChartPointSeriesVirtualizationOptions;
|
|
820
|
+
}
|
|
821
|
+
export interface NovaChartAreaSeriesResolvedProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonResolvedProps<TData> {
|
|
822
|
+
chartRef?: string;
|
|
823
|
+
xScaleId: string;
|
|
824
|
+
yScaleId: string;
|
|
825
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
826
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
827
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
828
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
829
|
+
curve: NovaChartLineCurve | 'smooth';
|
|
830
|
+
baselineValue: number;
|
|
831
|
+
baselineField?: NovaChartFieldAccessor<TData, number>;
|
|
832
|
+
mode: NovaChartAreaMode;
|
|
833
|
+
fill: string;
|
|
834
|
+
stroke: string;
|
|
835
|
+
strokeWidth: number;
|
|
836
|
+
opacity: number;
|
|
837
|
+
gradientTo?: string | Record<string, string>;
|
|
838
|
+
gradientSteps: number;
|
|
839
|
+
focusOnHover: boolean;
|
|
840
|
+
colors: Required<Omit<NovaChartAreaColorOptions<TData>, 'fill' | 'stroke' | 'colorField'>> & Pick<NovaChartAreaColorOptions<TData>, 'fill' | 'stroke' | 'colorField'>;
|
|
841
|
+
markers: Required<Omit<NovaChartAreaMarkerOptions<TData>, 'radius' | 'fill' | 'strokeColor'>> & Pick<NovaChartAreaMarkerOptions<TData>, 'radius' | 'fill' | 'strokeColor'>;
|
|
842
|
+
defined?: (context: NovaChartPointContext<TData>) => boolean;
|
|
843
|
+
connectNulls: boolean;
|
|
844
|
+
hitRadiusPx: number;
|
|
845
|
+
virtualization: NovaChartPointSeriesResolvedVirtualizationOptions;
|
|
846
|
+
}
|
|
847
|
+
export interface NovaChartAreaLayoutPoint<TData = Record<string, unknown>> extends NovaChartLineLayoutPoint<TData> {
|
|
848
|
+
baselineValue: number;
|
|
849
|
+
baselineY: number;
|
|
850
|
+
stackedBaseValue?: number;
|
|
851
|
+
stackedEndValue?: number;
|
|
852
|
+
order: number;
|
|
853
|
+
visible: boolean;
|
|
854
|
+
segmentGroup: number;
|
|
855
|
+
}
|
|
856
|
+
export interface NovaChartAreaLayoutArea {
|
|
857
|
+
key: string;
|
|
858
|
+
seriesKey: string;
|
|
859
|
+
color: string;
|
|
860
|
+
strokeColor: string;
|
|
861
|
+
points: Array<{
|
|
862
|
+
x: number;
|
|
863
|
+
y: number;
|
|
864
|
+
}>;
|
|
865
|
+
top: Array<{
|
|
866
|
+
x: number;
|
|
867
|
+
y: number;
|
|
868
|
+
}>;
|
|
869
|
+
baseline: Array<{
|
|
870
|
+
x: number;
|
|
871
|
+
y: number;
|
|
872
|
+
}>;
|
|
873
|
+
}
|
|
874
|
+
export interface NovaChartAreaSeriesDiagnostics extends NovaChartSeriesDiagnostics {
|
|
875
|
+
kind: 'area';
|
|
876
|
+
inputRows: number;
|
|
877
|
+
visibleRows: number;
|
|
878
|
+
renderedPoints: number;
|
|
879
|
+
renderedSegments: number;
|
|
880
|
+
renderedAreas: number;
|
|
881
|
+
skippedRows: number;
|
|
882
|
+
seriesCount: number;
|
|
883
|
+
mode: NovaChartPointRenderMode;
|
|
884
|
+
areaMode: NovaChartAreaMode;
|
|
885
|
+
}
|
|
886
|
+
export interface NovaChartAreaLayoutPlan<TData = Record<string, unknown>> {
|
|
887
|
+
points: Array<NovaChartAreaLayoutPoint<TData>>;
|
|
888
|
+
segments: Array<NovaChartLineLayoutSegment>;
|
|
889
|
+
areas: Array<NovaChartAreaLayoutArea>;
|
|
890
|
+
series: Array<NovaChartSeriesMetadata>;
|
|
891
|
+
diagnostics: NovaChartAreaSeriesDiagnostics;
|
|
892
|
+
}
|
|
893
|
+
export interface NovaChartAreaSeriesApi<TData = Record<string, unknown>> {
|
|
894
|
+
getLayoutPlan: () => NovaChartAreaLayoutPlan<TData>;
|
|
895
|
+
getDiagnostics: () => NovaChartAreaSeriesDiagnostics;
|
|
896
|
+
hitTest: (input: NovaChartHitTestInput) => NovaChartHitTestResult<TData> | null;
|
|
897
|
+
refresh: () => void;
|
|
898
|
+
setVirtualization: (options: NovaChartPointSeriesVirtualizationOptions) => void;
|
|
899
|
+
}
|
|
900
|
+
export interface NovaChartBubbleColorOptions<TData = Record<string, unknown>> extends NovaChartScatterColorOptions<TData> {
|
|
901
|
+
}
|
|
902
|
+
export interface NovaChartBubbleSeriesProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonProps<TData> {
|
|
903
|
+
chartRef?: string;
|
|
904
|
+
xScaleId: string;
|
|
905
|
+
yScaleId: string;
|
|
906
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
907
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
908
|
+
sizeField: NovaChartFieldAccessor<TData, number>;
|
|
909
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
910
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
911
|
+
radiusRange?: [number, number];
|
|
912
|
+
sizeScale?: NovaChartBubbleSizeScale;
|
|
913
|
+
minRadius?: number;
|
|
914
|
+
maxRadius?: number;
|
|
915
|
+
fill?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
916
|
+
strokeColor?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
917
|
+
strokeWidth?: number;
|
|
918
|
+
opacity?: number;
|
|
919
|
+
colors?: NovaChartBubbleColorOptions<TData>;
|
|
920
|
+
highlight?: NovaChartScatterHighlightOptions;
|
|
921
|
+
hitRadiusPx?: number;
|
|
922
|
+
virtualization?: NovaChartPointSeriesVirtualizationOptions;
|
|
923
|
+
}
|
|
924
|
+
export interface NovaChartBubbleSeriesResolvedProps<TData = Record<string, unknown>> extends NovaChartSeriesCommonResolvedProps<TData> {
|
|
925
|
+
chartRef?: string;
|
|
926
|
+
xScaleId: string;
|
|
927
|
+
yScaleId: string;
|
|
928
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
929
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
930
|
+
sizeField: NovaChartFieldAccessor<TData, number>;
|
|
931
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
932
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
933
|
+
radiusRange: [number, number];
|
|
934
|
+
sizeScale: NovaChartBubbleSizeScale;
|
|
935
|
+
minRadius: number;
|
|
936
|
+
maxRadius: number;
|
|
937
|
+
fill?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
938
|
+
strokeColor?: string | ((context: NovaChartPointContext<TData>) => string);
|
|
939
|
+
strokeWidth: number;
|
|
940
|
+
opacity: number;
|
|
941
|
+
colors: Required<Omit<NovaChartBubbleColorOptions<TData>, 'fill' | 'colorField'>> & Pick<NovaChartBubbleColorOptions<TData>, 'fill' | 'colorField'>;
|
|
942
|
+
highlight: Required<NovaChartScatterHighlightOptions>;
|
|
943
|
+
hitRadiusPx: number;
|
|
944
|
+
virtualization: NovaChartPointSeriesResolvedVirtualizationOptions;
|
|
945
|
+
}
|
|
946
|
+
export interface NovaChartBubbleLayoutPoint<TData = Record<string, unknown>> extends NovaChartScatterLayoutPoint<TData> {
|
|
947
|
+
sizeValue: number;
|
|
948
|
+
}
|
|
949
|
+
export interface NovaChartBubbleSeriesDiagnostics extends NovaChartSeriesDiagnostics {
|
|
950
|
+
kind: 'bubble';
|
|
951
|
+
inputRows: number;
|
|
952
|
+
visibleRows: number;
|
|
953
|
+
renderedBubbles: number;
|
|
954
|
+
skippedRows: number;
|
|
955
|
+
seriesCount: number;
|
|
956
|
+
mode: NovaChartPointRenderMode;
|
|
957
|
+
}
|
|
958
|
+
export interface NovaChartBubbleLayoutPlan<TData = Record<string, unknown>> {
|
|
959
|
+
points: Array<NovaChartBubbleLayoutPoint<TData>>;
|
|
960
|
+
series: Array<NovaChartSeriesMetadata>;
|
|
961
|
+
sizeDomain: [number, number];
|
|
962
|
+
diagnostics: NovaChartBubbleSeriesDiagnostics;
|
|
963
|
+
}
|
|
964
|
+
export interface NovaChartBubbleSeriesApi<TData = Record<string, unknown>> {
|
|
965
|
+
getLayoutPlan: () => NovaChartBubbleLayoutPlan<TData>;
|
|
966
|
+
getDiagnostics: () => NovaChartBubbleSeriesDiagnostics;
|
|
967
|
+
hitTest: (input: NovaChartHitTestInput) => NovaChartHitTestResult<TData> | null;
|
|
968
|
+
refresh: () => void;
|
|
969
|
+
setVirtualization: (options: NovaChartPointSeriesVirtualizationOptions) => void;
|
|
970
|
+
}
|
|
971
|
+
export interface NovaChartInteractiveSeriesApi<TData = Record<string, unknown>> {
|
|
972
|
+
hitTest: (input: NovaChartHitTestInput) => NovaChartHitTestResult<TData> | null;
|
|
973
|
+
activate?: (key: string) => void;
|
|
974
|
+
zoomAt?: (factor: number, x: number, y: number) => void;
|
|
975
|
+
panBy?: (dx: number, dy: number) => void;
|
|
976
|
+
}
|
|
977
|
+
export interface NovaChartInteractiveSeriesRegistration<TData = Record<string, unknown>> {
|
|
978
|
+
id: string;
|
|
979
|
+
api: NovaChartInteractiveSeriesApi<TData>;
|
|
980
|
+
requestRender: () => void;
|
|
981
|
+
}
|
|
982
|
+
export interface NovaChartSeriesScaleIds {
|
|
983
|
+
x: string;
|
|
984
|
+
y: string;
|
|
985
|
+
}
|
|
986
|
+
export interface NovaChartSeriesMetadata {
|
|
987
|
+
id: string;
|
|
988
|
+
kind?: NovaChartSeriesKind;
|
|
989
|
+
scaleIds?: NovaChartSeriesScaleIds;
|
|
990
|
+
sourceSeriesId?: string;
|
|
991
|
+
label: string;
|
|
992
|
+
color: string;
|
|
993
|
+
visible: boolean;
|
|
994
|
+
}
|
|
995
|
+
export interface NovaChartScaleDomainContribution {
|
|
996
|
+
id: string;
|
|
997
|
+
scaleId: string;
|
|
998
|
+
domain: ChartScaleDomain;
|
|
999
|
+
}
|
|
1000
|
+
export interface NovaChartInteractionProps extends NovaUiCommonProps {
|
|
1001
|
+
chartRef?: string;
|
|
1002
|
+
enabled?: boolean;
|
|
1003
|
+
hover?: boolean;
|
|
1004
|
+
tooltip?: boolean;
|
|
1005
|
+
mode?: NovaChartHitTestMode;
|
|
1006
|
+
maxDistancePx?: number;
|
|
1007
|
+
seriesIds?: Array<string>;
|
|
1008
|
+
}
|
|
1009
|
+
export interface NovaChartInteractionResolvedProps extends NovaUiCommonResolvedProps {
|
|
1010
|
+
chartRef?: string;
|
|
1011
|
+
enabled: boolean;
|
|
1012
|
+
hover: boolean;
|
|
1013
|
+
tooltip: boolean;
|
|
1014
|
+
mode: NovaChartHitTestMode;
|
|
1015
|
+
maxDistancePx: number;
|
|
1016
|
+
seriesIds: Array<string>;
|
|
1017
|
+
}
|
|
1018
|
+
export interface NovaChartInteractionApi {
|
|
1019
|
+
refresh: () => void;
|
|
1020
|
+
}
|
|
1021
|
+
export interface NovaChartTooltipProps extends NovaUiCommonProps {
|
|
1022
|
+
chartRef?: string;
|
|
1023
|
+
enabled?: boolean;
|
|
1024
|
+
offsetX?: number;
|
|
1025
|
+
offsetY?: number;
|
|
1026
|
+
maxWidth?: number;
|
|
1027
|
+
background?: string;
|
|
1028
|
+
color?: string;
|
|
1029
|
+
borderColor?: string;
|
|
1030
|
+
content?: TooltipContent | null;
|
|
1031
|
+
contentFormatter?: NovaChartTooltipContentFormatter;
|
|
1032
|
+
labelFormatter?: (context: NovaChartTooltipContext) => string;
|
|
1033
|
+
valueFormatter?: (context: NovaChartTooltipContext) => string;
|
|
1034
|
+
placement?: TooltipPlacement;
|
|
1035
|
+
collision?: TooltipCollisionOptions;
|
|
1036
|
+
followCursor?: boolean;
|
|
1037
|
+
animation?: false | TooltipAnimationOptions;
|
|
1038
|
+
renderers?: Pick<NovaChartRenderers, 'tooltipContent'>;
|
|
1039
|
+
}
|
|
1040
|
+
export interface NovaChartTooltipResolvedProps extends NovaUiCommonResolvedProps {
|
|
1041
|
+
className?: string | Array<string>;
|
|
1042
|
+
attrs?: Record<string, NovaUiStyleAttrValue>;
|
|
1043
|
+
chartRef?: string;
|
|
1044
|
+
enabled: boolean;
|
|
1045
|
+
offsetX: number;
|
|
1046
|
+
offsetY: number;
|
|
1047
|
+
maxWidth: number;
|
|
1048
|
+
background: string;
|
|
1049
|
+
color: string;
|
|
1050
|
+
borderColor: string;
|
|
1051
|
+
content: TooltipContent | null;
|
|
1052
|
+
contentFormatter?: NovaChartTooltipContentFormatter;
|
|
1053
|
+
labelFormatter?: (context: NovaChartTooltipContext) => string;
|
|
1054
|
+
valueFormatter?: (context: NovaChartTooltipContext) => string;
|
|
1055
|
+
placement: TooltipPlacement;
|
|
1056
|
+
collision: Required<TooltipCollisionOptions>;
|
|
1057
|
+
followCursor: boolean;
|
|
1058
|
+
animation: false | Required<TooltipAnimationOptions>;
|
|
1059
|
+
renderers?: Pick<NovaChartRenderers, 'tooltipContent'>;
|
|
1060
|
+
}
|
|
1061
|
+
export interface NovaChartTooltipApi {
|
|
1062
|
+
refresh: () => void;
|
|
1063
|
+
}
|
|
1064
|
+
export interface NovaChartTooltipContext<TData = Record<string, unknown>> {
|
|
1065
|
+
state: NovaChartInteractionState<TData>;
|
|
1066
|
+
datum: NovaChartDatumRef<TData>;
|
|
1067
|
+
label: string;
|
|
1068
|
+
value: number;
|
|
1069
|
+
formattedValue: string;
|
|
1070
|
+
}
|
|
1071
|
+
export type NovaChartTooltipContentFormatter<TData = Record<string, unknown>> = (context: NovaChartTooltipContext<TData>) => TooltipContent | null;
|
|
1072
|
+
export type NovaChartViewportControllerAxis = 'auto' | 'horizontal' | 'vertical';
|
|
1073
|
+
export type NovaChartViewportControllerPreventDefault = 'never' | 'always' | 'when-scrollable';
|
|
1074
|
+
export type NovaChartViewportControllerEdgeBehavior = 'clamp' | 'pass-through';
|
|
1075
|
+
export type NovaChartViewportControllerDeltaMode = 'pixel' | 'line' | 'domain';
|
|
1076
|
+
export type NovaChartViewportControllerSource = 'wheel' | 'trackpad' | 'pointer-pan' | 'keyboard' | 'custom';
|
|
1077
|
+
export type NovaChartViewportControllerPointerButton = 'primary' | 'middle' | 'secondary';
|
|
1078
|
+
export interface NovaChartViewportControllerWheelOptions {
|
|
1079
|
+
enabled?: boolean;
|
|
1080
|
+
axis?: NovaChartViewportControllerAxis;
|
|
1081
|
+
useDeltaX?: boolean;
|
|
1082
|
+
shiftYToX?: boolean;
|
|
1083
|
+
speed?: number;
|
|
1084
|
+
thresholdPx?: number;
|
|
1085
|
+
preventDefault?: NovaChartViewportControllerPreventDefault;
|
|
1086
|
+
edgeBehavior?: NovaChartViewportControllerEdgeBehavior;
|
|
1087
|
+
}
|
|
1088
|
+
export interface NovaChartViewportControllerTrackpadOptions {
|
|
1089
|
+
enabled?: boolean;
|
|
1090
|
+
preferDeltaX?: boolean;
|
|
1091
|
+
inertia?: boolean;
|
|
1092
|
+
}
|
|
1093
|
+
export interface NovaChartViewportControllerPointerPanOptions {
|
|
1094
|
+
enabled?: boolean;
|
|
1095
|
+
button?: NovaChartViewportControllerPointerButton;
|
|
1096
|
+
speed?: number;
|
|
1097
|
+
cursor?: string;
|
|
1098
|
+
}
|
|
1099
|
+
export interface NovaChartViewportControllerKeyboardOptions {
|
|
1100
|
+
enabled?: boolean;
|
|
1101
|
+
step?: number;
|
|
1102
|
+
pageStep?: number;
|
|
1103
|
+
keys?: {
|
|
1104
|
+
left?: string;
|
|
1105
|
+
right?: string;
|
|
1106
|
+
up?: string;
|
|
1107
|
+
down?: string;
|
|
1108
|
+
pageLeft?: string;
|
|
1109
|
+
pageRight?: string;
|
|
1110
|
+
pageUp?: string;
|
|
1111
|
+
pageDown?: string;
|
|
1112
|
+
home?: string;
|
|
1113
|
+
end?: string;
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
export interface NovaChartViewportControllerScrollbarOptions {
|
|
1117
|
+
drag?: boolean;
|
|
1118
|
+
clickTrack?: false | 'jump' | 'page';
|
|
1119
|
+
}
|
|
1120
|
+
export interface NovaChartViewportControllerContext {
|
|
1121
|
+
viewport: NovaChartViewportState;
|
|
1122
|
+
orientation: 'horizontal' | 'vertical';
|
|
1123
|
+
scaleId?: string;
|
|
1124
|
+
}
|
|
1125
|
+
export interface NovaChartViewportControllerWheelIntent {
|
|
1126
|
+
axis: 'horizontal' | 'vertical';
|
|
1127
|
+
delta: number;
|
|
1128
|
+
mode: NovaChartViewportControllerDeltaMode;
|
|
1129
|
+
source?: NovaChartViewportControllerSource;
|
|
1130
|
+
}
|
|
1131
|
+
export interface NovaChartViewportControllerInputState {
|
|
1132
|
+
source: NovaChartViewportControllerSource;
|
|
1133
|
+
value: number;
|
|
1134
|
+
delta: number;
|
|
1135
|
+
consumed: boolean;
|
|
1136
|
+
axis: 'horizontal' | 'vertical';
|
|
1137
|
+
}
|
|
1138
|
+
export interface NovaChartViewportControllerOptions {
|
|
1139
|
+
enabled?: boolean;
|
|
1140
|
+
viewportRef?: string;
|
|
1141
|
+
wheel?: boolean | NovaChartViewportControllerWheelOptions;
|
|
1142
|
+
trackpad?: boolean | NovaChartViewportControllerTrackpadOptions;
|
|
1143
|
+
pointerPan?: boolean | NovaChartViewportControllerPointerPanOptions;
|
|
1144
|
+
keyboard?: boolean | NovaChartViewportControllerKeyboardOptions;
|
|
1145
|
+
scrollbar?: NovaChartViewportControllerScrollbarOptions;
|
|
1146
|
+
mapWheel?: (event: WheelEvent, context: NovaChartViewportControllerContext) => NovaChartViewportControllerWheelIntent | null;
|
|
1147
|
+
onInput?: (state: NovaChartViewportControllerInputState, event?: Event) => void;
|
|
1148
|
+
}
|
|
1149
|
+
export interface NovaChartViewportControllerResolvedOptions {
|
|
1150
|
+
enabled: boolean;
|
|
1151
|
+
viewportRef?: string;
|
|
1152
|
+
wheel: Required<NovaChartViewportControllerWheelOptions>;
|
|
1153
|
+
trackpad: Required<NovaChartViewportControllerTrackpadOptions>;
|
|
1154
|
+
pointerPan: Required<NovaChartViewportControllerPointerPanOptions>;
|
|
1155
|
+
keyboard: Required<Omit<NovaChartViewportControllerKeyboardOptions, 'keys'>> & {
|
|
1156
|
+
keys: Required<NonNullable<NovaChartViewportControllerKeyboardOptions['keys']>>;
|
|
1157
|
+
};
|
|
1158
|
+
scrollbar: Required<NovaChartViewportControllerScrollbarOptions>;
|
|
1159
|
+
mapWheel?: NovaChartViewportControllerOptions['mapWheel'];
|
|
1160
|
+
onInput?: NovaChartViewportControllerOptions['onInput'];
|
|
1161
|
+
}
|
|
1162
|
+
export interface NovaChartViewportControllerProps extends NovaUiCommonProps, NovaChartViewportControllerOptions {
|
|
1163
|
+
chartRef?: string;
|
|
1164
|
+
scaleId?: string;
|
|
1165
|
+
}
|
|
1166
|
+
export interface NovaChartViewportControllerResolvedProps extends NovaUiCommonResolvedProps, NovaChartViewportControllerResolvedOptions {
|
|
1167
|
+
className?: string | Array<string>;
|
|
1168
|
+
attrs?: Record<string, NovaUiStyleAttrValue>;
|
|
1169
|
+
chartRef?: string;
|
|
1170
|
+
scaleId?: string;
|
|
1171
|
+
}
|
|
1172
|
+
export interface NovaChartViewportControllerApi {
|
|
1173
|
+
refresh: () => void;
|
|
1174
|
+
}
|
|
1175
|
+
export interface NovaChartViewportProps extends NovaUiCommonProps {
|
|
1176
|
+
chartRef?: string;
|
|
1177
|
+
scaleId: string;
|
|
1178
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1179
|
+
enabled?: boolean;
|
|
1180
|
+
value?: number;
|
|
1181
|
+
visibleCount?: number;
|
|
1182
|
+
wheelStep?: number;
|
|
1183
|
+
controller?: false | NovaChartViewportControllerOptions;
|
|
1184
|
+
scrollbar?: NovaScrollbarVisualOptions;
|
|
1185
|
+
onChange?: (state: NovaChartViewportState, event?: Event) => void;
|
|
1186
|
+
}
|
|
1187
|
+
export interface NovaChartViewportResolvedProps extends NovaUiCommonResolvedProps {
|
|
1188
|
+
className?: string | Array<string>;
|
|
1189
|
+
attrs?: Record<string, NovaUiStyleAttrValue>;
|
|
1190
|
+
chartRef?: string;
|
|
1191
|
+
scaleId: string;
|
|
1192
|
+
orientation: 'horizontal' | 'vertical';
|
|
1193
|
+
enabled: boolean;
|
|
1194
|
+
value: number;
|
|
1195
|
+
visibleCount?: number;
|
|
1196
|
+
wheelStep: number;
|
|
1197
|
+
controller: false | NovaChartViewportControllerResolvedOptions;
|
|
1198
|
+
scrollbar: NovaScrollbarVisualOptions;
|
|
1199
|
+
onChange?: (state: NovaChartViewportState, event?: Event) => void;
|
|
1200
|
+
}
|
|
1201
|
+
export interface NovaChartViewportState {
|
|
1202
|
+
value: number;
|
|
1203
|
+
max: number;
|
|
1204
|
+
viewportSize: number;
|
|
1205
|
+
contentSize: number;
|
|
1206
|
+
}
|
|
1207
|
+
export interface NovaChartViewportApi {
|
|
1208
|
+
scrollTo: (value: number, event?: Event) => void;
|
|
1209
|
+
scrollBy: (delta: number, event?: Event) => void;
|
|
1210
|
+
scrollToIndex: (index: number, event?: Event) => void;
|
|
1211
|
+
scrollToDomain: (domain: string | Array<string>, event?: Event) => void;
|
|
1212
|
+
zoomAt: (visibleCount: number, anchor?: number, event?: Event) => void;
|
|
1213
|
+
canScroll: (delta?: number) => boolean;
|
|
1214
|
+
getViewportState: () => NovaChartViewportState;
|
|
1215
|
+
refresh: () => void;
|
|
1216
|
+
}
|
|
1217
|
+
export interface NovaChartLegendProps extends NovaUiCommonProps {
|
|
1218
|
+
chartRef?: string;
|
|
1219
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1220
|
+
hiddenSeriesIds?: Array<string>;
|
|
1221
|
+
labels?: Record<string, string>;
|
|
1222
|
+
}
|
|
1223
|
+
export interface NovaChartLegendResolvedProps extends NovaUiCommonResolvedProps {
|
|
1224
|
+
className?: string | Array<string>;
|
|
1225
|
+
attrs?: Record<string, NovaUiStyleAttrValue>;
|
|
1226
|
+
chartRef?: string;
|
|
1227
|
+
orientation: 'horizontal' | 'vertical';
|
|
1228
|
+
hiddenSeriesIds: Array<string>;
|
|
1229
|
+
labels: Record<string, string>;
|
|
1230
|
+
}
|
|
1231
|
+
export interface NovaChartLegendApi {
|
|
1232
|
+
getSeries: () => Array<NovaChartSeriesMetadata>;
|
|
1233
|
+
refresh: () => void;
|
|
1234
|
+
}
|
|
1235
|
+
export interface NovaChartBarChartAxisOptions {
|
|
1236
|
+
visible?: boolean;
|
|
1237
|
+
width?: number;
|
|
1238
|
+
height?: number;
|
|
1239
|
+
ticks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
1240
|
+
}
|
|
1241
|
+
export interface NovaChartBarChartResolvedAxisOptions {
|
|
1242
|
+
visible: boolean;
|
|
1243
|
+
width: number;
|
|
1244
|
+
height: number;
|
|
1245
|
+
ticks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
1246
|
+
}
|
|
1247
|
+
export interface NovaChartBarChartProps<TData = Record<string, unknown>> extends NovaUiCommonProps, NovaChartCustomizationProps<TData>, Omit<NovaChartSeriesCustomizationProps<TData>, 'style' | 'motion'> {
|
|
1248
|
+
data?: Array<TData>;
|
|
1249
|
+
keyField?: NovaChartFieldAccessor<TData, NovaChartRowKey>;
|
|
1250
|
+
categoryField: NovaChartFieldAccessor<TData>;
|
|
1251
|
+
valueField: NovaChartFieldAccessor<TData, number>;
|
|
1252
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
1253
|
+
orientation?: NovaChartBarOrientation;
|
|
1254
|
+
mode?: NovaChartBarMode;
|
|
1255
|
+
axes?: {
|
|
1256
|
+
category?: NovaChartBarChartAxisOptions;
|
|
1257
|
+
value?: NovaChartBarChartAxisOptions;
|
|
1258
|
+
};
|
|
1259
|
+
grid?: boolean | NovaChartGridProps;
|
|
1260
|
+
legend?: boolean | NovaChartLegendProps;
|
|
1261
|
+
tooltip?: boolean | NovaChartTooltipProps;
|
|
1262
|
+
interaction?: boolean | NovaChartInteractionProps;
|
|
1263
|
+
viewport?: boolean | Omit<NovaChartViewportProps, 'scaleId'>;
|
|
1264
|
+
colors?: NovaChartBarColorOptions<TData>;
|
|
1265
|
+
labels?: NovaChartBarLabelOptions<TData>;
|
|
1266
|
+
accessibility?: false | NovaChartAccessibilityOptions<TData>;
|
|
1267
|
+
children?: Array<NovaTemplateChildSchema>;
|
|
1268
|
+
}
|
|
1269
|
+
export interface NovaChartBarChartResolvedProps<TData = Record<string, unknown>> extends NovaUiCommonResolvedProps, NovaChartCustomizationProps<TData>, Omit<NovaChartSeriesCustomizationProps<TData>, 'style' | 'motion'> {
|
|
1270
|
+
data: Array<TData>;
|
|
1271
|
+
keyField?: NovaChartFieldAccessor<TData, NovaChartRowKey>;
|
|
1272
|
+
categoryField: NovaChartFieldAccessor<TData>;
|
|
1273
|
+
valueField: NovaChartFieldAccessor<TData, number>;
|
|
1274
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
1275
|
+
orientation: NovaChartBarOrientation;
|
|
1276
|
+
mode: NovaChartBarMode;
|
|
1277
|
+
axes: {
|
|
1278
|
+
category: NovaChartBarChartResolvedAxisOptions;
|
|
1279
|
+
value: NovaChartBarChartResolvedAxisOptions;
|
|
1280
|
+
};
|
|
1281
|
+
grid: boolean | NovaChartGridProps;
|
|
1282
|
+
legend: boolean | NovaChartLegendProps;
|
|
1283
|
+
tooltip: boolean | NovaChartTooltipProps;
|
|
1284
|
+
interaction: boolean | NovaChartInteractionProps;
|
|
1285
|
+
viewport: boolean | Omit<NovaChartViewportProps, 'scaleId'>;
|
|
1286
|
+
colors: Required<Omit<NovaChartBarColorOptions<TData>, 'fill' | 'colorField' | 'highlight'>> & Pick<NovaChartBarColorOptions<TData>, 'fill' | 'colorField' | 'highlight'>;
|
|
1287
|
+
labels: Required<Omit<NovaChartBarLabelOptions<TData>, 'formatter'>> & Pick<NovaChartBarLabelOptions<TData>, 'formatter'>;
|
|
1288
|
+
accessibility: false | NovaChartResolvedAccessibilityOptions<TData>;
|
|
1289
|
+
children: Array<NovaTemplateChildSchema>;
|
|
1290
|
+
}
|
|
1291
|
+
export interface NovaChartBarChartApi<TData = Record<string, unknown>> {
|
|
1292
|
+
setData: (data: Array<TData>) => void;
|
|
1293
|
+
getData: () => ReadonlyArray<TData>;
|
|
1294
|
+
refresh: () => void;
|
|
1295
|
+
exportChart: (options?: NovaExportImageOptions) => Promise<NovaExportImageResult>;
|
|
1296
|
+
getSemanticSnapshot: (options?: NovaSemanticSnapshotOptions) => NovaSemanticSnapshot;
|
|
1297
|
+
}
|
|
1298
|
+
export interface NovaChartComposedChartAxisOptions {
|
|
1299
|
+
scaleId?: string;
|
|
1300
|
+
scaleType?: ChartScaleType;
|
|
1301
|
+
field?: NovaChartFieldAccessor;
|
|
1302
|
+
domain?: ChartScaleDomain;
|
|
1303
|
+
zero?: boolean;
|
|
1304
|
+
nice?: boolean;
|
|
1305
|
+
paddingInner?: number;
|
|
1306
|
+
paddingOuter?: number;
|
|
1307
|
+
visible?: boolean;
|
|
1308
|
+
width?: number;
|
|
1309
|
+
height?: number;
|
|
1310
|
+
ticks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
1311
|
+
}
|
|
1312
|
+
export interface NovaChartComposedChartResolvedAxisOptions {
|
|
1313
|
+
scaleId: string;
|
|
1314
|
+
scaleType: ChartScaleType;
|
|
1315
|
+
field?: NovaChartFieldAccessor;
|
|
1316
|
+
domain?: ChartScaleDomain;
|
|
1317
|
+
zero: boolean;
|
|
1318
|
+
nice: boolean;
|
|
1319
|
+
paddingInner: number;
|
|
1320
|
+
paddingOuter: number;
|
|
1321
|
+
visible: boolean;
|
|
1322
|
+
width: number;
|
|
1323
|
+
height: number;
|
|
1324
|
+
ticks?: ChartScaleTickOptions | ChartTimeTickOptions;
|
|
1325
|
+
}
|
|
1326
|
+
type NovaChartComposedSeriesBase<TProps> = {
|
|
1327
|
+
id?: string;
|
|
1328
|
+
} & Omit<TProps, 'chartRef' | 'xScaleId' | 'yScaleId'> & {
|
|
1329
|
+
xScaleId?: string;
|
|
1330
|
+
yScaleId?: string;
|
|
1331
|
+
};
|
|
1332
|
+
export type NovaChartComposedSeriesConfig<TData = Record<string, unknown>> = ({
|
|
1333
|
+
type: 'bar';
|
|
1334
|
+
} & NovaChartComposedSeriesBase<NovaChartBarSeriesProps<TData>>) | ({
|
|
1335
|
+
type: 'line';
|
|
1336
|
+
} & NovaChartComposedSeriesBase<NovaChartLineSeriesProps<TData>>) | ({
|
|
1337
|
+
type: 'area';
|
|
1338
|
+
} & NovaChartComposedSeriesBase<NovaChartAreaSeriesProps<TData>>) | ({
|
|
1339
|
+
type: 'scatter';
|
|
1340
|
+
} & NovaChartComposedSeriesBase<NovaChartScatterSeriesProps<TData>>) | ({
|
|
1341
|
+
type: 'bubble';
|
|
1342
|
+
} & NovaChartComposedSeriesBase<NovaChartBubbleSeriesProps<TData>>) | ({
|
|
1343
|
+
type: 'heatmap';
|
|
1344
|
+
} & Omit<NovaChartComposedSeriesBase<NovaChartNovelSeriesProps<TData>>, 'kind'>) | ({
|
|
1345
|
+
type: 'candlestick';
|
|
1346
|
+
} & Omit<NovaChartComposedSeriesBase<NovaChartNovelSeriesProps<TData>>, 'kind'>);
|
|
1347
|
+
export interface NovaChartComposedChartProps<TData = Record<string, unknown>> extends NovaUiCommonProps, NovaChartCustomizationProps<TData>, Omit<NovaChartSeriesCustomizationProps<TData>, 'style' | 'motion'> {
|
|
1348
|
+
data?: Array<TData>;
|
|
1349
|
+
keyField?: NovaChartFieldAccessor<TData, NovaChartRowKey>;
|
|
1350
|
+
xAxis?: NovaChartComposedChartAxisOptions;
|
|
1351
|
+
yAxis?: NovaChartComposedChartAxisOptions;
|
|
1352
|
+
series?: Array<NovaChartComposedSeriesConfig<TData>>;
|
|
1353
|
+
grid?: boolean | NovaChartGridProps;
|
|
1354
|
+
axes?: boolean | {
|
|
1355
|
+
x?: boolean | NovaChartAxisProps;
|
|
1356
|
+
y?: boolean | NovaChartAxisProps;
|
|
1357
|
+
};
|
|
1358
|
+
legend?: boolean | NovaChartLegendProps;
|
|
1359
|
+
tooltip?: boolean | NovaChartTooltipProps;
|
|
1360
|
+
interaction?: boolean | NovaChartInteractionProps;
|
|
1361
|
+
viewport?: boolean | Omit<NovaChartViewportProps, 'scaleId'>;
|
|
1362
|
+
accessibility?: false | NovaChartAccessibilityOptions<TData>;
|
|
1363
|
+
children?: Array<NovaTemplateChildSchema>;
|
|
1364
|
+
}
|
|
1365
|
+
export interface NovaChartComposedChartResolvedProps<TData = Record<string, unknown>> extends NovaUiCommonResolvedProps, NovaChartCustomizationProps<TData>, Omit<NovaChartSeriesCustomizationProps<TData>, 'style' | 'motion'> {
|
|
1366
|
+
data: Array<TData>;
|
|
1367
|
+
keyField?: NovaChartFieldAccessor<TData, NovaChartRowKey>;
|
|
1368
|
+
xAxis: NovaChartComposedChartResolvedAxisOptions;
|
|
1369
|
+
yAxis: NovaChartComposedChartResolvedAxisOptions;
|
|
1370
|
+
series: Array<NovaChartComposedSeriesConfig<TData>>;
|
|
1371
|
+
grid: boolean | NovaChartGridProps;
|
|
1372
|
+
axes: boolean | {
|
|
1373
|
+
x?: boolean | NovaChartAxisProps;
|
|
1374
|
+
y?: boolean | NovaChartAxisProps;
|
|
1375
|
+
};
|
|
1376
|
+
legend: boolean | NovaChartLegendProps;
|
|
1377
|
+
tooltip: boolean | NovaChartTooltipProps;
|
|
1378
|
+
interaction: boolean | NovaChartInteractionProps;
|
|
1379
|
+
viewport: boolean | Omit<NovaChartViewportProps, 'scaleId'>;
|
|
1380
|
+
accessibility: false | NovaChartResolvedAccessibilityOptions<TData>;
|
|
1381
|
+
children: Array<NovaTemplateChildSchema>;
|
|
1382
|
+
}
|
|
1383
|
+
export interface NovaChartComposedChartApi<TData = Record<string, unknown>> {
|
|
1384
|
+
setData: (data: Array<TData>) => void;
|
|
1385
|
+
getData: () => ReadonlyArray<TData>;
|
|
1386
|
+
refresh: () => void;
|
|
1387
|
+
exportChart: (options?: NovaExportImageOptions) => Promise<NovaExportImageResult>;
|
|
1388
|
+
getSemanticSnapshot: (options?: NovaSemanticSnapshotOptions) => NovaSemanticSnapshot;
|
|
1389
|
+
}
|
|
1390
|
+
export interface NovaChartRootChildSchema<TProps = Record<string, unknown>> extends NovaTemplateChildSchema<TProps> {
|
|
1391
|
+
}
|
|
1392
|
+
export type NovaChartScaleDomainInput = ChartNumericDomain | ChartBandDomain;
|
|
1393
|
+
export {};
|