@arcfusionz/arc-analytic-ui 0.0.0
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/_virtual/_rolldown/runtime.js +13 -0
- package/dist/components/AnomalyCard/AnomalyCard.chart.d.ts +64 -0
- package/dist/components/AnomalyCard/AnomalyCard.chart.js +341 -0
- package/dist/components/AnomalyCard/AnomalyCard.d.ts +169 -0
- package/dist/components/AnomalyCard/AnomalyCard.js +1019 -0
- package/dist/components/AnomalyCard/AnomalyCard.model.d.ts +508 -0
- package/dist/components/AnomalyCard/AnomalyCard.model.js +553 -0
- package/dist/components/AnomalyCard/index.d.ts +4 -0
- package/dist/components/AnomalyCard/index.js +4 -0
- package/dist/components/ChartCard/ChartCard.chart.d.ts +72 -0
- package/dist/components/ChartCard/ChartCard.chart.js +1333 -0
- package/dist/components/ChartCard/ChartCard.d.ts +206 -0
- package/dist/components/ChartCard/ChartCard.js +718 -0
- package/dist/components/ChartCard/ChartCard.model.d.ts +452 -0
- package/dist/components/ChartCard/ChartCard.model.js +1223 -0
- package/dist/components/ChartCard/index.d.ts +4 -0
- package/dist/components/ChartCard/index.js +4 -0
- package/dist/components/ComparisonCard/ComparisonCard.chart.d.ts +80 -0
- package/dist/components/ComparisonCard/ComparisonCard.chart.js +337 -0
- package/dist/components/ComparisonCard/ComparisonCard.d.ts +200 -0
- package/dist/components/ComparisonCard/ComparisonCard.js +1325 -0
- package/dist/components/ComparisonCard/ComparisonCard.model.d.ts +309 -0
- package/dist/components/ComparisonCard/ComparisonCard.model.js +263 -0
- package/dist/components/ComparisonCard/index.d.ts +4 -0
- package/dist/components/ComparisonCard/index.js +4 -0
- package/dist/components/ForecastCard/ForecastCard.chart.d.ts +82 -0
- package/dist/components/ForecastCard/ForecastCard.chart.js +416 -0
- package/dist/components/ForecastCard/ForecastCard.d.ts +148 -0
- package/dist/components/ForecastCard/ForecastCard.js +1029 -0
- package/dist/components/ForecastCard/ForecastCard.model.d.ts +497 -0
- package/dist/components/ForecastCard/ForecastCard.model.js +554 -0
- package/dist/components/ForecastCard/index.d.ts +4 -0
- package/dist/components/ForecastCard/index.js +4 -0
- package/dist/components/HighlightCard/HighlightCard.chart.d.ts +122 -0
- package/dist/components/HighlightCard/HighlightCard.chart.js +660 -0
- package/dist/components/HighlightCard/HighlightCard.d.ts +202 -0
- package/dist/components/HighlightCard/HighlightCard.js +1286 -0
- package/dist/components/HighlightCard/HighlightCard.model.d.ts +692 -0
- package/dist/components/HighlightCard/HighlightCard.model.js +875 -0
- package/dist/components/HighlightCard/index.d.ts +4 -0
- package/dist/components/HighlightCard/index.js +4 -0
- package/dist/components/InsightCard/InsightCard.chart.d.ts +91 -0
- package/dist/components/InsightCard/InsightCard.chart.js +471 -0
- package/dist/components/InsightCard/InsightCard.d.ts +161 -0
- package/dist/components/InsightCard/InsightCard.js +961 -0
- package/dist/components/InsightCard/InsightCard.model.d.ts +405 -0
- package/dist/components/InsightCard/InsightCard.model.js +421 -0
- package/dist/components/InsightCard/index.d.ts +4 -0
- package/dist/components/InsightCard/index.js +4 -0
- package/dist/components/MetricCard/MetricCard.chart.d.ts +79 -0
- package/dist/components/MetricCard/MetricCard.chart.js +435 -0
- package/dist/components/MetricCard/MetricCard.d.ts +227 -0
- package/dist/components/MetricCard/MetricCard.js +1293 -0
- package/dist/components/MetricCard/MetricCard.model.d.ts +521 -0
- package/dist/components/MetricCard/MetricCard.model.js +627 -0
- package/dist/components/MetricCard/index.d.ts +4 -0
- package/dist/components/MetricCard/index.js +4 -0
- package/dist/components/ProfileCard/ProfileCard.chart.d.ts +64 -0
- package/dist/components/ProfileCard/ProfileCard.chart.js +427 -0
- package/dist/components/ProfileCard/ProfileCard.d.ts +140 -0
- package/dist/components/ProfileCard/ProfileCard.js +735 -0
- package/dist/components/ProfileCard/ProfileCard.model.d.ts +279 -0
- package/dist/components/ProfileCard/ProfileCard.model.js +244 -0
- package/dist/components/ProfileCard/index.d.ts +4 -0
- package/dist/components/ProfileCard/index.js +4 -0
- package/dist/components/ProgressCard/ProgressCard.chart.d.ts +73 -0
- package/dist/components/ProgressCard/ProgressCard.chart.js +373 -0
- package/dist/components/ProgressCard/ProgressCard.d.ts +137 -0
- package/dist/components/ProgressCard/ProgressCard.js +908 -0
- package/dist/components/ProgressCard/ProgressCard.model.d.ts +385 -0
- package/dist/components/ProgressCard/ProgressCard.model.js +389 -0
- package/dist/components/ProgressCard/index.d.ts +4 -0
- package/dist/components/ProgressCard/index.js +4 -0
- package/dist/components/ReportCard/ReportCard.chart.d.ts +45 -0
- package/dist/components/ReportCard/ReportCard.chart.js +231 -0
- package/dist/components/ReportCard/ReportCard.d.ts +153 -0
- package/dist/components/ReportCard/ReportCard.js +1118 -0
- package/dist/components/ReportCard/ReportCard.model.d.ts +392 -0
- package/dist/components/ReportCard/ReportCard.model.js +399 -0
- package/dist/components/ReportCard/index.d.ts +4 -0
- package/dist/components/ReportCard/index.js +4 -0
- package/dist/components/SankeyCard/SankeyCard.chart.d.ts +75 -0
- package/dist/components/SankeyCard/SankeyCard.chart.js +249 -0
- package/dist/components/SankeyCard/SankeyCard.d.ts +185 -0
- package/dist/components/SankeyCard/SankeyCard.js +788 -0
- package/dist/components/SankeyCard/SankeyCard.model.d.ts +501 -0
- package/dist/components/SankeyCard/SankeyCard.model.js +789 -0
- package/dist/components/SankeyCard/index.d.ts +4 -0
- package/dist/components/SankeyCard/index.js +4 -0
- package/dist/components/StatusCard/StatusCard.chart.d.ts +60 -0
- package/dist/components/StatusCard/StatusCard.chart.js +188 -0
- package/dist/components/StatusCard/StatusCard.d.ts +176 -0
- package/dist/components/StatusCard/StatusCard.js +989 -0
- package/dist/components/StatusCard/StatusCard.model.d.ts +555 -0
- package/dist/components/StatusCard/StatusCard.model.js +776 -0
- package/dist/components/StatusCard/index.d.ts +4 -0
- package/dist/components/StatusCard/index.js +4 -0
- package/dist/components/TableCard/TableCard.chart.d.ts +53 -0
- package/dist/components/TableCard/TableCard.chart.js +192 -0
- package/dist/components/TableCard/TableCard.d.ts +140 -0
- package/dist/components/TableCard/TableCard.js +811 -0
- package/dist/components/TableCard/TableCard.model.d.ts +381 -0
- package/dist/components/TableCard/TableCard.model.js +475 -0
- package/dist/components/TableCard/index.d.ts +4 -0
- package/dist/components/TableCard/index.js +4 -0
- package/dist/components/TargetCard/TargetCard.chart.d.ts +52 -0
- package/dist/components/TargetCard/TargetCard.chart.js +273 -0
- package/dist/components/TargetCard/TargetCard.d.ts +143 -0
- package/dist/components/TargetCard/TargetCard.js +910 -0
- package/dist/components/TargetCard/TargetCard.model.d.ts +468 -0
- package/dist/components/TargetCard/TargetCard.model.js +581 -0
- package/dist/components/TargetCard/index.d.ts +4 -0
- package/dist/components/TargetCard/index.js +4 -0
- package/dist/components/TreeCard/TreeCard.chart.d.ts +80 -0
- package/dist/components/TreeCard/TreeCard.chart.js +178 -0
- package/dist/components/TreeCard/TreeCard.d.ts +182 -0
- package/dist/components/TreeCard/TreeCard.js +1187 -0
- package/dist/components/TreeCard/TreeCard.model.d.ts +330 -0
- package/dist/components/TreeCard/TreeCard.model.js +401 -0
- package/dist/components/TreeCard/index.d.ts +4 -0
- package/dist/components/TreeCard/index.js +4 -0
- package/dist/components/TrendCard/TrendCard.chart.d.ts +75 -0
- package/dist/components/TrendCard/TrendCard.chart.js +393 -0
- package/dist/components/TrendCard/TrendCard.d.ts +224 -0
- package/dist/components/TrendCard/TrendCard.js +1053 -0
- package/dist/components/TrendCard/TrendCard.model.d.ts +545 -0
- package/dist/components/TrendCard/TrendCard.model.js +623 -0
- package/dist/components/TrendCard/index.d.ts +4 -0
- package/dist/components/TrendCard/index.js +4 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.js +57 -0
- package/dist/lib/vega/ArcVegaChart.d.ts +24 -0
- package/dist/lib/vega/ArcVegaChart.js +42 -0
- package/dist/lib/vega/ArcVegaSurface.d.ts +13 -0
- package/dist/lib/vega/ArcVegaSurface.js +38 -0
- package/dist/lib/vega/axisTicks.js +156 -0
- package/dist/lib/vega/config.d.ts +29 -0
- package/dist/lib/vega/config.js +113 -0
- package/dist/lib/vega/embed.d.ts +29 -0
- package/dist/lib/vega/embed.js +29 -0
- package/dist/lib/vega/engine.d.ts +10 -0
- package/dist/lib/vega/engine.js +6 -0
- package/dist/lib/vega/formatters.d.ts +125 -0
- package/dist/lib/vega/formatters.js +277 -0
- package/dist/lib/vega/index.d.ts +11 -0
- package/dist/lib/vega/load.d.ts +13 -0
- package/dist/lib/vega/load.js +21 -0
- package/dist/lib/vega/time.d.ts +45 -0
- package/dist/lib/vega/time.js +105 -0
- package/dist/lib/vega/tokens.d.ts +73 -0
- package/dist/lib/vega/tokens.js +137 -0
- package/dist/lib/vega/tooltip.d.ts +45 -0
- package/dist/lib/vega/tooltip.js +124 -0
- package/dist/lib/vega/useArcVega.d.ts +43 -0
- package/dist/lib/vega/useArcVega.js +121 -0
- package/package.json +60 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { ChartAggregate, ChartCardLabels, ChartCardSize, ChartCardStatus, ChartExtent, ChartFieldType, ChartRecord, ChartSeriesColor, ChartSort, ChartType } from "./ChartCard.model.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { BoxProps } from "@arcfusionz/arc-primitive-ui";
|
|
4
|
+
import { TopLevelSpec } from "vega-lite";
|
|
5
|
+
import { Result } from "vega-embed";
|
|
6
|
+
//#region src/components/ChartCard/ChartCard.d.ts
|
|
7
|
+
/** Where the legend sits relative to the plot. */
|
|
8
|
+
type ChartLegendPosition = "top" | "bottom";
|
|
9
|
+
/**
|
|
10
|
+
* How the table twin's control is exposed. `focus` (default) keeps the card
|
|
11
|
+
* face to title, legend and chart while leaving the data one Tab key away;
|
|
12
|
+
* `visible` draws the button always; `none` removes it — only when another
|
|
13
|
+
* surface exposes the same values to keyboard and screen-reader users.
|
|
14
|
+
*/
|
|
15
|
+
type ChartTableToggle = "focus" | "visible" | "none";
|
|
16
|
+
interface ChartCardProps extends Omit<BoxProps, "children" | "padding" | "title"> {
|
|
17
|
+
/** The chart's title — the panel's heading, and the only prominent text the card carries. Pass `name` too when this is not plain text. */
|
|
18
|
+
title: ReactNode;
|
|
19
|
+
/** Plain-text title used in the generated descriptions and control labels. Defaults to `title` when it is a string. */
|
|
20
|
+
name?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Which form to draw — 36 of them, one per distinct Vega-Lite encoding,
|
|
23
|
+
* grouped by the comparison each makes visible: magnitude and ranking
|
|
24
|
+
* (`bar`, `bar-horizontal`, `bar-grouped`, `lollipop`), part-to-whole
|
|
25
|
+
* (`bar-stacked`, `bar-normalized`, `area-stacked`, `area-normalized`,
|
|
26
|
+
* `pie`, `donut`, `radial`), change over time (`line`, `line-points`,
|
|
27
|
+
* `step`, `trail`, `area`, `streamgraph`, `slope`), deviation and flow
|
|
28
|
+
* (`bar-diverging`, `bar-range`, `waterfall`), correlation (`scatter`,
|
|
29
|
+
* `bubble`, `connected-scatter`, `heatmap-binned`, `radar`), distribution
|
|
30
|
+
* (`histogram`, `density`, `boxplot`, `violin`, `strip`, `dot`, `errorbar`,
|
|
31
|
+
* `errorband`) and many categories at once (`heatmap`, `punchcard`).
|
|
32
|
+
* Stamped as `data-type`.
|
|
33
|
+
*/
|
|
34
|
+
type: ChartType;
|
|
35
|
+
/**
|
|
36
|
+
* The rows to plot — plain records from any transport. The card reads them
|
|
37
|
+
* through the field-name props below and knows nothing about how they were
|
|
38
|
+
* fetched. Pass `[]` while loading to reserve the plot's height.
|
|
39
|
+
*/
|
|
40
|
+
data: readonly ChartRecord[];
|
|
41
|
+
/** Field name for the primary dimension — the x position, or a heatmap's column. */
|
|
42
|
+
x?: string;
|
|
43
|
+
/** Field name for the second position: the measure on most forms, a heatmap's row on the table-shaped ones. */
|
|
44
|
+
y?: string;
|
|
45
|
+
/** Field name for identity — one series per distinct value, in first-seen order. Drives the colour and the legend. */
|
|
46
|
+
series?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Field name for the measure where it is NOT a position: a slice's angle, a
|
|
49
|
+
* cell's colour, a punch card's area. Falls back to `y`, which is the
|
|
50
|
+
* measure everywhere else.
|
|
51
|
+
*/
|
|
52
|
+
value?: string;
|
|
53
|
+
/** Field name for a second measure drawn as area — `bubble` and `trail`. Named `sizeBy` because `size` is the card's density. */
|
|
54
|
+
sizeBy?: string;
|
|
55
|
+
/** Field name closing a range — the end of a `bar-range` span. */
|
|
56
|
+
x2?: string;
|
|
57
|
+
/** Vega-Lite type of the `x` field. Inferred from the rows (`Date` and ISO-8601 strings are temporal, numbers quantitative, everything else nominal). */
|
|
58
|
+
xType?: ChartFieldType;
|
|
59
|
+
/** Vega-Lite type of the `y` field. Inferred the same way. */
|
|
60
|
+
yType?: ChartFieldType;
|
|
61
|
+
/** Plain-text name of the dimension, used in the tooltip, the table header and the description. Defaults to the `x` field's name. */
|
|
62
|
+
xLabel?: string;
|
|
63
|
+
/** Plain-text name of the second position. Defaults to the `y` field's name. */
|
|
64
|
+
yLabel?: string;
|
|
65
|
+
/** Plain-text name of the measure. Defaults to the `value` (or `y`) field's name. */
|
|
66
|
+
valueLabel?: string;
|
|
67
|
+
/** Plain-text name of the identity dimension. Defaults to the `series` field's name. */
|
|
68
|
+
seriesLabel?: string;
|
|
69
|
+
/** Plain-text name of the size measure. Defaults to the `size` field's name. */
|
|
70
|
+
sizeLabel?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Draw the axis titles from `xLabel` / `yLabel`. Default `false` — the title
|
|
73
|
+
* names the subject, the description names every field, and an axis title on
|
|
74
|
+
* a dashboard tile is furniture.
|
|
75
|
+
*/
|
|
76
|
+
axisTitles?: boolean;
|
|
77
|
+
/** Draw the axes at all. Default `true`; `false` strips the plot to its marks — the table twin still carries every value. */
|
|
78
|
+
axes?: boolean;
|
|
79
|
+
/** Draw grid lines behind the marks. Default `true`. */
|
|
80
|
+
grid?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Draw the legend — one chip per series with a swatch in the plot's own mark
|
|
83
|
+
* shape, or, for a form whose colour is a measure, the ramp's buckets.
|
|
84
|
+
* Default `true` when there is more than one series or the colour is a ramp,
|
|
85
|
+
* `false` for a single series. The tooltip, the table and the description
|
|
86
|
+
* name every series regardless.
|
|
87
|
+
*/
|
|
88
|
+
legend?: boolean;
|
|
89
|
+
/** Where the legend sits. Default `top` — under the title and above the plot. */
|
|
90
|
+
legendPosition?: ChartLegendPosition;
|
|
91
|
+
/**
|
|
92
|
+
* Keys of the series currently shown, controlled — pair with
|
|
93
|
+
* `onVisibleSeriesChange`. A key is the `series` field's value. Omit for the
|
|
94
|
+
* uncontrolled card (`defaultVisibleSeries`, else every series). The card
|
|
95
|
+
* never hides the last one: a plot with nothing in it is not a state.
|
|
96
|
+
*/
|
|
97
|
+
visibleSeries?: readonly string[];
|
|
98
|
+
/** The series shown on first render when `visibleSeries` is uncontrolled. Default: all of them. */
|
|
99
|
+
defaultVisibleSeries?: readonly string[];
|
|
100
|
+
/** Called with the remaining keys when the reader shows or hides a series from the legend. */
|
|
101
|
+
onVisibleSeriesChange?: (keys: string[]) => void;
|
|
102
|
+
/**
|
|
103
|
+
* How colour is used. `auto` (default) picks against the theme's identity
|
|
104
|
+
* budget: one series takes the emphasis hue, two or three take the
|
|
105
|
+
* `chart-1…N` slots, and past the budget the sequential ramp takes over —
|
|
106
|
+
* repeating a slot would make two series look like one. `categorical` forces
|
|
107
|
+
* identity slots and degrades to the ramp for the same reason. `sequential`
|
|
108
|
+
* is for ORDERED series (cohorts, buckets, quarters). `emphasis` puts the
|
|
109
|
+
* first series in the hue and the rest in the context gray. A form whose
|
|
110
|
+
* colour encodes a MEASURE ignores this — colour there has a job already.
|
|
111
|
+
* The resolved job is stamped as `data-series-color`.
|
|
112
|
+
*/
|
|
113
|
+
seriesColor?: ChartSeriesColor;
|
|
114
|
+
/**
|
|
115
|
+
* Fold every series past this count into one `Other` whose readings are the
|
|
116
|
+
* sum of the folded ones — honest only for additive measures, which passing
|
|
117
|
+
* this asserts. The biggest series survive; the fold keeps the consumer's
|
|
118
|
+
* order, so a colour slot never moves. Stamped as `data-folded`.
|
|
119
|
+
*/
|
|
120
|
+
maxSeries?: number;
|
|
121
|
+
/** Rank the x categories by the measure: `desc` for a ranked bar chart, `asc`, or `none` (default, the consumer's order). Ignored for a continuous x. */
|
|
122
|
+
sort?: ChartSort;
|
|
123
|
+
/**
|
|
124
|
+
* Aggregation Vega applies to the measure, named in the description so the
|
|
125
|
+
* transform is never silent. Only the forms that aggregate read it
|
|
126
|
+
* (`histogram`, `density`, `boxplot`, `violin`, `errorbar`, `errorband`,
|
|
127
|
+
* `heatmap-binned`).
|
|
128
|
+
*/
|
|
129
|
+
aggregate?: ChartAggregate;
|
|
130
|
+
/** Bin-count ceiling for `histogram` and `heatmap-binned`. Default 20. */
|
|
131
|
+
maxBins?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Whisker or band extent. `boxplot` takes `"min-max"` (default — no separate
|
|
134
|
+
* outlier layer, so no observation is hidden) or a number such as `1.5` for
|
|
135
|
+
* the Tukey form; `errorbar` and `errorband` take `"ci"` (default),
|
|
136
|
+
* `"stderr"`, `"stdev"` or `"iqr"`.
|
|
137
|
+
*/
|
|
138
|
+
extent?: ChartExtent;
|
|
139
|
+
/** Hole size of a `donut`, as a fraction of the outer radius. Default 0.6. */
|
|
140
|
+
innerRadius?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Number format for the axis, the legend, the tooltip, the table and the
|
|
143
|
+
* description — one grammar so nothing rounds two ways: `number[:digits]`,
|
|
144
|
+
* `integer`, `compact[:digits]`, `percent[:digits]`,
|
|
145
|
+
* `currency:CODE[:digits|compact]`. Default `compact`.
|
|
146
|
+
*/
|
|
147
|
+
format?: string;
|
|
148
|
+
/** Custom formatter for the measure. Takes precedence over `format` everywhere a value is rendered. */
|
|
149
|
+
formatValue?: (value: number) => string;
|
|
150
|
+
/** Plot height in pixels, axes included. Defaults per `size` (180 / 240 / 320), plus 24 when `axes` draws the x labels. */
|
|
151
|
+
height?: number;
|
|
152
|
+
/** Show the hover tooltip. Default `true`. Every value it shows is also in the table twin, so `false` loses nothing but the convenience. */
|
|
153
|
+
tooltip?: boolean;
|
|
154
|
+
/** The transport's status. `loading` with rows already present is a refresh: the previous render stays under the veil. Default `ready`. */
|
|
155
|
+
status?: ChartCardStatus;
|
|
156
|
+
/** The consumer's filter is active — no rows then reads as no-match rather than empty, with a clear-filters action when `onClearFilters` is set. */
|
|
157
|
+
filtered?: boolean;
|
|
158
|
+
/** The data is older than the product's freshness rule (TanStack Query's `isStale`). Shows a badge, stamps `data-stale` and says so in the description. */
|
|
159
|
+
stale?: boolean;
|
|
160
|
+
/** Recovery action for the error state; renders a retry button when set. */
|
|
161
|
+
onRetry?: () => void;
|
|
162
|
+
/** Recovery action for the no-match state; renders a clear-filters button when set. */
|
|
163
|
+
onClearFilters?: () => void;
|
|
164
|
+
/** Density: `sm` for dense grids, `md` (default), `lg` for a hero panel. Scales the title, the padding and the default plot height. */
|
|
165
|
+
size?: ChartCardSize;
|
|
166
|
+
/** Heading level of the title for the document outline. Default 3 — panels usually sit under a page's h2. */
|
|
167
|
+
titleLevel?: 2 | 3 | 4 | 5 | 6;
|
|
168
|
+
/** BCP 47 locale for every number and date. Defaults to the runtime's. Thai products on the Gregorian calendar pass `th-TH-u-ca-gregory`. */
|
|
169
|
+
locale?: string;
|
|
170
|
+
/** IANA time zone for dates. Defaults to the runtime's — pass it for deterministic output and single-business-zone reporting. */
|
|
171
|
+
timeZone?: string;
|
|
172
|
+
/** Overrides for every rendered or announced string. */
|
|
173
|
+
labels?: Partial<ChartCardLabels>;
|
|
174
|
+
/** Replaces the generated accessible description of the card (the figure's `aria-describedby` text). */
|
|
175
|
+
description?: string;
|
|
176
|
+
/** Trailing header slot — a ghost `Button` or `Menu` for expand, export or settings, as the reference cards carry. Empty by default. */
|
|
177
|
+
action?: ReactNode;
|
|
178
|
+
/**
|
|
179
|
+
* How the table twin's control is exposed. `focus` (default) hides it until
|
|
180
|
+
* it is tabbed to, so the card face stays title + legend + chart while every
|
|
181
|
+
* value stays one key away; `visible` always draws it; `none` removes it.
|
|
182
|
+
*/
|
|
183
|
+
tableToggle?: ChartTableToggle;
|
|
184
|
+
/** Open the data popover on first render, anchored to the card. */
|
|
185
|
+
defaultTableOpen?: boolean;
|
|
186
|
+
/** Called with vega-embed's result once the plot mounts — for `view` access in advanced compositions. */
|
|
187
|
+
onEmbed?: (result: Result) => void;
|
|
188
|
+
/** Escape hatch: transform the plot spec before it renders. Voids the token and accessibility guarantees for whatever it changes. */
|
|
189
|
+
patchSpec?: (spec: TopLevelSpec) => TopLevelSpec;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* A chart panel for dashboards: a title, a legend, and a chart — nothing else
|
|
193
|
+
* on its face. `type` picks one of 36 Vega-Lite forms, `data` is plain records
|
|
194
|
+
* and the remaining fields are field NAMES, so the same card draws a stacked
|
|
195
|
+
* bar, a donut, a heatmap, a box plot or a radar without changing shape.
|
|
196
|
+
*
|
|
197
|
+
* Where the other cards in this package answer one fixed question in text and
|
|
198
|
+
* illustrate it with a plot, ChartCard is the plot: the comparison is the form
|
|
199
|
+
* the consumer chose. Every state is handled and layout-stable, and the text
|
|
200
|
+
* equivalents the chart owes a screen reader — a generated description, a
|
|
201
|
+
* generated plot label, and a table twin holding every value — are all there,
|
|
202
|
+
* none of them on the card's face.
|
|
203
|
+
*/
|
|
204
|
+
declare const ChartCard: import("react").ForwardRefExoticComponent<ChartCardProps & import("react").RefAttributes<HTMLElement>>;
|
|
205
|
+
//#endregion
|
|
206
|
+
export { ChartCard, ChartCardProps, ChartLegendPosition, ChartTableToggle };
|