@skdx/web-components-charts 0.45.0 → 0.49.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/area.cjs +29 -29
- package/dist/area.d.cts +2 -1
- package/dist/area.d.ts +2 -1
- package/dist/area.js +31 -31
- package/dist/bar.cjs +29 -29
- package/dist/bar.d.cts +2 -1
- package/dist/bar.d.ts +2 -1
- package/dist/bar.js +33 -33
- package/dist/boxplot.cjs +35 -35
- package/dist/boxplot.d.cts +2 -1
- package/dist/boxplot.d.ts +2 -1
- package/dist/boxplot.js +38 -38
- package/dist/bubble.cjs +39 -39
- package/dist/bubble.d.cts +2 -1
- package/dist/bubble.d.ts +2 -1
- package/dist/bubble.js +38 -38
- package/dist/bullet.cjs +38 -38
- package/dist/bullet.d.cts +2 -1
- package/dist/bullet.d.ts +2 -1
- package/dist/bullet.js +40 -40
- package/dist/bump.cjs +37 -37
- package/dist/bump.d.cts +2 -1
- package/dist/bump.d.ts +2 -1
- package/dist/bump.js +37 -37
- package/dist/candlestick.cjs +34 -34
- package/dist/candlestick.d.cts +2 -1
- package/dist/candlestick.d.ts +2 -1
- package/dist/candlestick.js +35 -35
- package/dist/chord.cjs +37 -37
- package/dist/chord.d.cts +2 -1
- package/dist/chord.d.ts +2 -1
- package/dist/chord.js +39 -39
- package/dist/circle-packing.cjs +37 -37
- package/dist/circle-packing.d.cts +2 -1
- package/dist/circle-packing.d.ts +2 -1
- package/dist/circle-packing.js +37 -37
- package/dist/combo.cjs +29 -29
- package/dist/combo.d.cts +2 -1
- package/dist/combo.d.ts +2 -1
- package/dist/combo.js +33 -33
- package/dist/contracts.json +17886 -0
- package/dist/dumbbell.cjs +40 -40
- package/dist/dumbbell.d.cts +2 -1
- package/dist/dumbbell.d.ts +2 -1
- package/dist/dumbbell.js +39 -39
- package/dist/funnel.cjs +38 -38
- package/dist/funnel.d.cts +2 -1
- package/dist/funnel.d.ts +2 -1
- package/dist/funnel.js +38 -38
- package/dist/gantt.cjs +37 -37
- package/dist/gantt.d.cts +2 -1
- package/dist/gantt.d.ts +2 -1
- package/dist/gantt.js +40 -40
- package/dist/gauge.cjs +36 -36
- package/dist/gauge.d.cts +2 -1
- package/dist/gauge.d.ts +2 -1
- package/dist/gauge.js +35 -35
- package/dist/heatmap.cjs +38 -38
- package/dist/heatmap.d.cts +2 -1
- package/dist/heatmap.d.ts +2 -1
- package/dist/heatmap.js +39 -39
- package/dist/histogram.cjs +30 -30
- package/dist/histogram.d.cts +2 -1
- package/dist/histogram.d.ts +2 -1
- package/dist/histogram.js +34 -34
- package/dist/icicle.cjs +40 -40
- package/dist/icicle.d.cts +2 -1
- package/dist/icicle.d.ts +2 -1
- package/dist/icicle.js +40 -40
- package/dist/{index-H-_fLjtt.d.cts → index-BkR4iVqI.d.ts} +11 -1071
- package/dist/{index-H-_fLjtt.d.ts → index-DjnBT-5R.d.cts} +11 -1071
- package/dist/index.cjs +37 -37
- package/dist/index.d.cts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +38 -38
- package/dist/line.cjs +29 -29
- package/dist/line.d.cts +2 -1
- package/dist/line.d.ts +2 -1
- package/dist/line.js +31 -31
- package/dist/linear-gauge.cjs +33 -33
- package/dist/linear-gauge.d.cts +2 -1
- package/dist/linear-gauge.d.ts +2 -1
- package/dist/linear-gauge.js +40 -40
- package/dist/map.cjs +39 -39
- package/dist/map.d.cts +2 -1
- package/dist/map.d.ts +2 -1
- package/dist/map.js +37 -37
- package/dist/marimekko.cjs +40 -40
- package/dist/marimekko.d.cts +2 -1
- package/dist/marimekko.d.ts +2 -1
- package/dist/marimekko.js +38 -38
- package/dist/network.cjs +38 -38
- package/dist/network.d.cts +2 -1
- package/dist/network.d.ts +2 -1
- package/dist/network.js +39 -39
- package/dist/organization.cjs +38 -38
- package/dist/organization.d.cts +2 -1
- package/dist/organization.d.ts +2 -1
- package/dist/organization.js +38 -38
- package/dist/parallel.cjs +38 -38
- package/dist/parallel.d.cts +2 -1
- package/dist/parallel.d.ts +2 -1
- package/dist/parallel.js +40 -40
- package/dist/pareto.cjs +25 -25
- package/dist/pareto.d.cts +2 -1
- package/dist/pareto.d.ts +2 -1
- package/dist/pareto.js +24 -24
- package/dist/pie.cjs +38 -38
- package/dist/pie.d.cts +2 -1
- package/dist/pie.d.ts +2 -1
- package/dist/pie.js +38 -38
- package/dist/polar-area.cjs +38 -38
- package/dist/polar-area.d.cts +2 -1
- package/dist/polar-area.d.ts +2 -1
- package/dist/polar-area.js +40 -40
- package/dist/portable-runtime.js +1 -0
- package/dist/portable.cjs +1 -0
- package/dist/portable.d.cts +25 -0
- package/dist/portable.d.ts +25 -0
- package/dist/portable.js +1 -0
- package/dist/radar.cjs +39 -39
- package/dist/radar.d.cts +2 -1
- package/dist/radar.d.ts +2 -1
- package/dist/radar.js +37 -37
- package/dist/radial.cjs +36 -36
- package/dist/radial.d.cts +2 -1
- package/dist/radial.d.ts +2 -1
- package/dist/radial.js +37 -37
- package/dist/range.cjs +27 -27
- package/dist/range.d.cts +2 -1
- package/dist/range.d.ts +2 -1
- package/dist/range.js +27 -27
- package/dist/sankey.cjs +38 -38
- package/dist/sankey.d.cts +2 -1
- package/dist/sankey.d.ts +2 -1
- package/dist/sankey.js +36 -36
- package/dist/scatter.cjs +40 -40
- package/dist/scatter.d.cts +2 -1
- package/dist/scatter.d.ts +2 -1
- package/dist/scatter.js +39 -39
- package/dist/sparkline.cjs +36 -36
- package/dist/sparkline.d.cts +2 -1
- package/dist/sparkline.d.ts +2 -1
- package/dist/sparkline.js +37 -37
- package/dist/sunburst.cjs +37 -37
- package/dist/sunburst.d.cts +2 -1
- package/dist/sunburst.d.ts +2 -1
- package/dist/sunburst.js +40 -40
- package/dist/swarm.cjs +40 -40
- package/dist/swarm.d.cts +2 -1
- package/dist/swarm.d.ts +2 -1
- package/dist/swarm.js +39 -39
- package/dist/timeline.cjs +38 -38
- package/dist/timeline.d.cts +2 -1
- package/dist/timeline.d.ts +2 -1
- package/dist/timeline.js +40 -40
- package/dist/tree.cjs +38 -38
- package/dist/tree.d.cts +2 -1
- package/dist/tree.d.ts +2 -1
- package/dist/tree.js +38 -38
- package/dist/treemap.cjs +40 -40
- package/dist/treemap.d.cts +2 -1
- package/dist/treemap.d.ts +2 -1
- package/dist/treemap.js +38 -38
- package/dist/types-5xXhTghj.d.cts +1168 -0
- package/dist/types-5xXhTghj.d.ts +1168 -0
- package/dist/waffle.cjs +40 -40
- package/dist/waffle.d.cts +2 -1
- package/dist/waffle.d.ts +2 -1
- package/dist/waffle.js +39 -39
- package/dist/waterfall.cjs +37 -37
- package/dist/waterfall.d.cts +2 -1
- package/dist/waterfall.d.ts +2 -1
- package/dist/waterfall.js +38 -38
- package/dist/wrapper-api.json +1849 -0
- package/package.json +9 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement, TemplateResult } from 'lit';
|
|
3
|
+
import { C as Canvas, D as Datum, a6 as ScatterSeries, c as AxisOptions, a1 as Reference, b as Annotation, t as ColorScale, ao as ColorLegendOptions, ah as Value, v as Curve, a8 as Series, Y as RadarMetric, j as CalendarCell, a3 as SankeyLink, a4 as SankeyNode, ag as TreeNode, q as ChartItemId, k as Candle, F as Format, l as CandlestickOverlay, ak as WaterfallDatum, G as GanttTask, e as BoxplotSeries, r as ChordLink, M as MapFeature, K as MapPoint, J as MapLine, _ as RadialBand, B as Band, g as BubbleSeries, h as BulletDatum, $ as RangeChartSeries, n as Category, al as XAxisOptions, S as NetworkNode, R as NetworkEdge, ad as TimelineEvent, O as MarimekkoCategory, V as ParallelDimension, W as ParallelRow, w as DumbbellDatum, L as LegendOptions, ae as TooltipOptions, a7 as Selection, ap as Sized, H as HighlightScope, A as AccessibleTableOptions, Z as Zoom, N as MapView, aq as ResponsiveOptions, a as ChartItemRef, m as CartesianSeries, a0 as RangeSeries, a9 as SeriesTransform, a2 as Sampling } from './types-5xXhTghj.js';
|
|
3
4
|
|
|
4
5
|
/** Grouped, stacked, horizontal or histogram bars; series may also be lines, areas or ranges. */
|
|
5
6
|
declare class SkdxBarChart extends SkdxChartElement {
|
|
@@ -21,1074 +22,6 @@ declare global {
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
/** A plotted value; `null` (or `NaN`) is a gap. */
|
|
25
|
-
type Value = number | null;
|
|
26
|
-
/** A stable identifier of a series, datum, node, link or feature; defaults to the item's name. */
|
|
27
|
-
type ChartItemId = string | number;
|
|
28
|
-
/**
|
|
29
|
-
* Locates one item, or a set of items, across a chart: every field given must match. `{ series }`
|
|
30
|
-
* is a whole series, `{ series, index }` one point, `{ id }` one datum/node/feature/link.
|
|
31
|
-
* Ids fall back to names, so `{ id: 'EMEA' }` finds a slice named EMEA that has no explicit id.
|
|
32
|
-
*/
|
|
33
|
-
interface ChartItemRef {
|
|
34
|
-
id?: ChartItemId | undefined;
|
|
35
|
-
series?: ChartItemId | undefined;
|
|
36
|
-
index?: number | undefined;
|
|
37
|
-
category?: string | undefined;
|
|
38
|
-
}
|
|
39
|
-
/** A selection: refs, or bare ids as `{ id }` sugar (`selected="EMEA"` selects the EMEA item). */
|
|
40
|
-
type Selection = ChartItemId | ChartItemRef | (ChartItemId | ChartItemRef)[];
|
|
41
|
-
/** Common identity and annotation metadata a datum-like object may carry. */
|
|
42
|
-
interface Identified {
|
|
43
|
-
/** Stable identifier used by selection, highlighting, events and tests. @default the name */
|
|
44
|
-
id?: ChartItemId | undefined;
|
|
45
|
-
}
|
|
46
|
-
/** One plotted series: a name for the legend/title and a value per category. */
|
|
47
|
-
interface Series extends Identified {
|
|
48
|
-
name: string;
|
|
49
|
-
data: Value[];
|
|
50
|
-
/** Any CSS color; defaults to the next `@skdx/tokens` series color. */
|
|
51
|
-
color?: string | undefined;
|
|
52
|
-
}
|
|
53
|
-
/** One named value, for the part-of-whole charts (pie, funnel, radial bar). */
|
|
54
|
-
interface Datum extends Identified {
|
|
55
|
-
name: string;
|
|
56
|
-
value: number;
|
|
57
|
-
color?: string | undefined;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* How values are written: a function, or a named `Intl` style. `percent` expects fractions
|
|
61
|
-
* (0.25 → 25%), `duration` expects seconds, the date styles expect epoch milliseconds.
|
|
62
|
-
*/
|
|
63
|
-
type Format = ((value: number) => string) | {
|
|
64
|
-
style: 'integer' | 'decimal' | 'percent' | 'currency' | 'compact' | 'scientific' | 'date' | 'time' | 'datetime' | 'duration';
|
|
65
|
-
/** BCP-47 locale; defaults to the runtime locale. */
|
|
66
|
-
locale?: string | undefined;
|
|
67
|
-
/** ISO 4217 code for `currency`. @default 'USD' */
|
|
68
|
-
currency?: string | undefined;
|
|
69
|
-
/** Fraction digits for the number styles. */
|
|
70
|
-
digits?: number | undefined;
|
|
71
|
-
/** Suffix written after the number, e.g. ` ms`. */
|
|
72
|
-
unit?: string | undefined;
|
|
73
|
-
/** IANA time zone for the date styles, e.g. `'UTC'`; defaults to the runtime zone. */
|
|
74
|
-
timeZone?: string | undefined;
|
|
75
|
-
};
|
|
76
|
-
/** Semantic color of a reference line or band. */
|
|
77
|
-
type Variant = 'neutral' | 'primary' | 'success' | 'warning' | 'danger';
|
|
78
|
-
/** Tooltip behaviour; `true`/`false` is shorthand for `{ enabled }`. */
|
|
79
|
-
interface TooltipOptions {
|
|
80
|
-
/** @default true */
|
|
81
|
-
enabled?: boolean | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* `item` shows the mark under the pointer; `axis` snaps to the nearest category and lists every
|
|
84
|
-
* series there (cartesian and candlestick charts; the same as `crosshair`). @default 'item'
|
|
85
|
-
*/
|
|
86
|
-
trigger?: 'item' | 'axis' | undefined;
|
|
87
|
-
/** Replaces the tooltip text of a mark: one string, or one line per string. */
|
|
88
|
-
formatter?: ((item: ChartItem) => string | string[]) | undefined;
|
|
89
|
-
/** Rewrites the shared axis tooltip: the category line, then one line per series. */
|
|
90
|
-
axisFormatter?: ((rows: string[], index: number) => string[]) | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Render the tooltip as an HTML element positioned over the page instead of inside the svg,
|
|
93
|
-
* so it can escape a clipped or scaled container. @default false
|
|
94
|
-
*/
|
|
95
|
-
portal?: boolean | undefined;
|
|
96
|
-
/** Where the box sits relative to its anchor; `auto` keeps it inside the canvas. @default 'auto' */
|
|
97
|
-
placement?: 'auto' | 'top' | 'bottom' | 'left' | 'right' | undefined;
|
|
98
|
-
/** Anchor the box to the pointer (`true`) or to the hovered mark (`false`). @default true */
|
|
99
|
-
followPointer?: boolean | undefined;
|
|
100
|
-
}
|
|
101
|
-
/** Legend layout; `true`/`false` is shorthand for `{ enabled }`. */
|
|
102
|
-
interface LegendOptions {
|
|
103
|
-
/** @default true */
|
|
104
|
-
enabled?: boolean | undefined;
|
|
105
|
-
/** Above, below, or in a column beside the plot. @default 'top' */
|
|
106
|
-
position?: 'top' | 'bottom' | 'left' | 'right' | undefined;
|
|
107
|
-
/** Column width for `left`/`right`, in pixels. @default 120 */
|
|
108
|
-
width?: number | undefined;
|
|
109
|
-
/** Clicking or pressing Enter on an entry hides its series. @default true */
|
|
110
|
-
interactive?: boolean | undefined;
|
|
111
|
-
/** Entries beyond this many are summarized as `+N more`. */
|
|
112
|
-
maxItems?: number | undefined;
|
|
113
|
-
/** Rewrites an entry's text. */
|
|
114
|
-
formatter?: ((name: string) => string) | undefined;
|
|
115
|
-
/** Row alignment; `end` right-aligns (the default under `direction: 'rtl'`). @default 'start' */
|
|
116
|
-
align?: 'start' | 'end' | undefined;
|
|
117
|
-
}
|
|
118
|
-
/** Which marks stay full-strength while one is highlighted, and which fade. */
|
|
119
|
-
interface HighlightScope {
|
|
120
|
-
/** Keep the highlighted item only, or its whole series. @default 'item' */
|
|
121
|
-
highlighted?: 'item' | 'series' | undefined;
|
|
122
|
-
/** Fade nothing, the rest of the item's series, or every other mark. @default 'global' */
|
|
123
|
-
faded?: 'none' | 'series' | 'global' | undefined;
|
|
124
|
-
}
|
|
125
|
-
/** Opt-in tabular fallback rendered next to the svg for screen readers. */
|
|
126
|
-
interface AccessibleTableOptions {
|
|
127
|
-
/** Above this many rows a one-line summary is rendered instead of the table. @default 500 */
|
|
128
|
-
maxRows?: number | undefined;
|
|
129
|
-
/** Table caption. @default the chart label */
|
|
130
|
-
caption?: string | undefined;
|
|
131
|
-
}
|
|
132
|
-
/** A data problem found while laying out; reported through `onDataIssue`. */
|
|
133
|
-
interface ChartDataIssue {
|
|
134
|
-
/** Machine-readable, e.g. `invalid-value`, `cycle`, `duplicate-id`, `unknown-node`. */
|
|
135
|
-
code: string;
|
|
136
|
-
severity: 'warning' | 'error';
|
|
137
|
-
message: string;
|
|
138
|
-
itemId?: ChartItemId | undefined;
|
|
139
|
-
}
|
|
140
|
-
interface Sized {
|
|
141
|
-
/** @default 600 (300 for the round charts, 120 for sparklines) */
|
|
142
|
-
width?: number | undefined;
|
|
143
|
-
/** @default 300 (32 for sparklines) */
|
|
144
|
-
height?: number | undefined;
|
|
145
|
-
/** Draw a legend row above (or, with `{ position: 'bottom' }`, below) the plot. @default false */
|
|
146
|
-
legend?: boolean | LegendOptions | undefined;
|
|
147
|
-
/** Show a hover tooltip for the mark under the pointer; an object configures it. @default true */
|
|
148
|
-
tooltip?: boolean | TooltipOptions | undefined;
|
|
149
|
-
/** How values are written in ticks, labels and tooltips. @default the runtime locale's number format */
|
|
150
|
-
format?: Format | undefined;
|
|
151
|
-
/** Categorical series colors, cycled by series index. @default the `@skdx/tokens` scales */
|
|
152
|
-
palette?: string[] | undefined;
|
|
153
|
-
/** Series (by name) left out of the plot; their legend entries stay, dimmed. */
|
|
154
|
-
hiddenSeries?: string[] | undefined;
|
|
155
|
-
/**
|
|
156
|
-
* Selected items, outlined in the focus color. Part-of-whole and graph charts also give the
|
|
157
|
-
* selection a chart-specific meaning (a pulled-out slice, a lit neighbourhood).
|
|
158
|
-
*/
|
|
159
|
-
selected?: Selection | undefined;
|
|
160
|
-
/** The item(s) under emphasis: everything outside `highlightScope` fades. `null` clears it. */
|
|
161
|
-
highlighted?: ChartItemRef | ChartItemId | (ChartItemRef | ChartItemId)[] | null | undefined;
|
|
162
|
-
highlightScope?: HighlightScope | undefined;
|
|
163
|
-
/** Draw a loading placeholder instead of the chart. @default false */
|
|
164
|
-
loading?: boolean | undefined;
|
|
165
|
-
/** Draw this message instead of the chart. */
|
|
166
|
-
error?: string | undefined;
|
|
167
|
-
/** Written in place of an empty chart. @default 'No data available' */
|
|
168
|
-
emptyMessage?: string | undefined;
|
|
169
|
-
/** Longer accessible description, rendered as the svg `<desc>`. */
|
|
170
|
-
description?: string | undefined;
|
|
171
|
-
/** Hide the chart from assistive technology, for charts that repeat adjacent text. @default false */
|
|
172
|
-
decorative?: boolean | undefined;
|
|
173
|
-
/** Render a visually hidden data table next to the svg. @default false */
|
|
174
|
-
accessibleTable?: boolean | AccessibleTableOptions | undefined;
|
|
175
|
-
/**
|
|
176
|
-
* Fade marks in on mount and transition them on data changes; `true` is 300 ms, a number sets
|
|
177
|
-
* the duration. Off under `prefers-reduced-motion` and above 1500 shapes. @default false
|
|
178
|
-
*/
|
|
179
|
-
animate?: boolean | number | undefined;
|
|
180
|
-
/**
|
|
181
|
-
* Measure the container and lay the chart out at that width, so text keeps its size. An object
|
|
182
|
-
* also swaps in `compact` overrides below `breakpoint` pixels (default 480). @default false
|
|
183
|
-
*/
|
|
184
|
-
responsive?: boolean | ResponsiveOptions | undefined;
|
|
185
|
-
/** Text direction; `rtl` right-aligns the legend and mirrors category axes. @default 'ltr' */
|
|
186
|
-
direction?: 'ltr' | 'rtl' | undefined;
|
|
187
|
-
}
|
|
188
|
-
interface ResponsiveOptions {
|
|
189
|
-
/** @default 480 */
|
|
190
|
-
breakpoint?: number | undefined;
|
|
191
|
-
/** Input overrides applied while the measured width is below `breakpoint`, e.g. `{ legend: false, labels: false }`. */
|
|
192
|
-
compact?: Record<string, unknown> | undefined;
|
|
193
|
-
}
|
|
194
|
-
/** `smooth` is an alias of `monotone`: a cubic through every point that never overshoots. */
|
|
195
|
-
type Curve = 'linear' | 'monotone' | 'smooth' | 'step' | 'stepBefore' | 'stepAfter';
|
|
196
|
-
/** A horizontal or vertical line, or a shaded band, drawn behind the marks in data coordinates. */
|
|
197
|
-
type Reference = {
|
|
198
|
-
label?: string | undefined;
|
|
199
|
-
/** @default 'neutral' */
|
|
200
|
-
variant?: Variant | undefined;
|
|
201
|
-
/** Any CSS color; wins over `variant`. */
|
|
202
|
-
color?: string | undefined;
|
|
203
|
-
} & ({
|
|
204
|
-
y: number;
|
|
205
|
-
axis?: 'left' | 'right' | undefined;
|
|
206
|
-
} | {
|
|
207
|
-
x: number | string | Date;
|
|
208
|
-
} | {
|
|
209
|
-
y1: number;
|
|
210
|
-
y2: number;
|
|
211
|
-
axis?: 'left' | 'right' | undefined;
|
|
212
|
-
} | {
|
|
213
|
-
x1: number | string | Date;
|
|
214
|
-
x2: number | string | Date;
|
|
215
|
-
});
|
|
216
|
-
interface AnnotationBase extends Identified {
|
|
217
|
-
label?: string | undefined;
|
|
218
|
-
/** @default 'neutral' */
|
|
219
|
-
variant?: Variant | undefined;
|
|
220
|
-
/** Any CSS color; wins over `variant`. */
|
|
221
|
-
color?: string | undefined;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Marks in data coordinates drawn over the plot: lines and bands (as `references`), a point or
|
|
225
|
-
* callout at `(x, y)`, free text, or a rectangle. `x` values name a category, number or date.
|
|
226
|
-
*/
|
|
227
|
-
type Annotation = AnnotationBase & ({
|
|
228
|
-
type: 'line';
|
|
229
|
-
y: number;
|
|
230
|
-
axis?: 'left' | 'right' | undefined;
|
|
231
|
-
} | {
|
|
232
|
-
type: 'line';
|
|
233
|
-
x: number | string | Date;
|
|
234
|
-
} | {
|
|
235
|
-
type: 'band';
|
|
236
|
-
y1: number;
|
|
237
|
-
y2: number;
|
|
238
|
-
axis?: 'left' | 'right' | undefined;
|
|
239
|
-
} | {
|
|
240
|
-
type: 'band';
|
|
241
|
-
x1: number | string | Date;
|
|
242
|
-
x2: number | string | Date;
|
|
243
|
-
} | {
|
|
244
|
-
type: 'point';
|
|
245
|
-
x: number | string | Date;
|
|
246
|
-
y: number;
|
|
247
|
-
axis?: 'left' | 'right' | undefined;
|
|
248
|
-
} | {
|
|
249
|
-
type: 'callout';
|
|
250
|
-
x: number | string | Date;
|
|
251
|
-
y: number;
|
|
252
|
-
axis?: 'left' | 'right' | undefined;
|
|
253
|
-
/** Pixel offset of the text from the point. @default [16, -16] */
|
|
254
|
-
offset?: [number, number] | undefined;
|
|
255
|
-
} | {
|
|
256
|
-
type: 'text';
|
|
257
|
-
x: number | string | Date;
|
|
258
|
-
y: number;
|
|
259
|
-
axis?: 'left' | 'right' | undefined;
|
|
260
|
-
text: string;
|
|
261
|
-
} | {
|
|
262
|
-
type: 'rect';
|
|
263
|
-
x1: number | string | Date;
|
|
264
|
-
x2: number | string | Date;
|
|
265
|
-
y1: number;
|
|
266
|
-
y2: number;
|
|
267
|
-
axis?: 'left' | 'right' | undefined;
|
|
268
|
-
});
|
|
269
|
-
interface AxisOptions {
|
|
270
|
-
/** Identifies the axis so a series can pick it with `axis: id`. */
|
|
271
|
-
id?: string | undefined;
|
|
272
|
-
/**
|
|
273
|
-
* Which side a value axis is drawn on; extra axes stack outward. Horizontal charts draw
|
|
274
|
-
* `'left'`/`'bottom'` axes along the bottom and `'right'`/`'top'` axes along the top.
|
|
275
|
-
* @default 'left' (first), 'right' (second)
|
|
276
|
-
*/
|
|
277
|
-
position?: 'left' | 'right' | 'top' | 'bottom' | undefined;
|
|
278
|
-
min?: number | undefined;
|
|
279
|
-
max?: number | undefined;
|
|
280
|
-
/** @default 'linear' */
|
|
281
|
-
scale?: 'linear' | 'log' | 'sqrt' | undefined;
|
|
282
|
-
/** Overrides the chart-level `format` for this axis. */
|
|
283
|
-
format?: Format | undefined;
|
|
284
|
-
/** Axis title. */
|
|
285
|
-
label?: string | undefined;
|
|
286
|
-
/** Approximate tick count. @default 5 */
|
|
287
|
-
ticks?: number | undefined;
|
|
288
|
-
/** Draw grid lines at the ticks. @default true */
|
|
289
|
-
grid?: boolean | undefined;
|
|
290
|
-
/** Run the axis the other way (largest value at the origin). @default false */
|
|
291
|
-
reversed?: boolean | undefined;
|
|
292
|
-
/** Round the domain out to nice tick values; `false` keeps the exact data extent. @default true */
|
|
293
|
-
nice?: boolean | undefined;
|
|
294
|
-
/** Draw the axis line. @default true for the baseline */
|
|
295
|
-
showLine?: boolean | undefined;
|
|
296
|
-
/** Draw tick marks at the ticks. @default false */
|
|
297
|
-
showTicks?: boolean | undefined;
|
|
298
|
-
/** Tick mark length in pixels. @default 4 */
|
|
299
|
-
tickSize?: number | undefined;
|
|
300
|
-
/** Tick label rotation in degrees (category axes), e.g. `-45` for long labels. @default 0 */
|
|
301
|
-
tickRotation?: number | undefined;
|
|
302
|
-
}
|
|
303
|
-
interface XAxisOptions extends Pick<AxisOptions, 'format' | 'label' | 'grid' | 'showLine' | 'showTicks' | 'tickSize' | 'tickRotation'> {
|
|
304
|
-
/** Fixed category order and membership; categories not listed are dropped, missing ones are empty. */
|
|
305
|
-
domain?: Category[] | undefined;
|
|
306
|
-
/**
|
|
307
|
-
* `category` spaces points evenly; `time` and `linear` place numeric or date categories
|
|
308
|
-
* proportionally, so irregular timestamps land where they belong. Under `time`, ISO 8601
|
|
309
|
-
* strings are accepted as categories. @default 'category'
|
|
310
|
-
*/
|
|
311
|
-
type?: 'category' | 'time' | 'linear' | undefined;
|
|
312
|
-
}
|
|
313
|
-
/** A visible window over the categories: indexes `[start, end)`. */
|
|
314
|
-
interface Zoom {
|
|
315
|
-
start: number;
|
|
316
|
-
end: number;
|
|
317
|
-
}
|
|
318
|
-
/** An uncertainty around a value: a symmetric `±e`, or an absolute `[low, high]` pair. */
|
|
319
|
-
type ErrorValue = number | [number, number] | null;
|
|
320
|
-
/**
|
|
321
|
-
* A pure, deterministic step applied to a series' values in order. `movingAverage` leaves the
|
|
322
|
-
* first `window - 1` values as gaps; `difference` and `percentageChange` leave the first one.
|
|
323
|
-
*/
|
|
324
|
-
type SeriesTransform = {
|
|
325
|
-
type: 'cumulative';
|
|
326
|
-
} | {
|
|
327
|
-
type: 'difference';
|
|
328
|
-
} | {
|
|
329
|
-
type: 'percentageChange';
|
|
330
|
-
} | {
|
|
331
|
-
type: 'movingAverage';
|
|
332
|
-
window: number;
|
|
333
|
-
} | {
|
|
334
|
-
type: 'normalize';
|
|
335
|
-
to?: 'max' | 'sum' | undefined;
|
|
336
|
-
} | {
|
|
337
|
-
type: 'rank';
|
|
338
|
-
order?: 'asc' | 'desc' | undefined;
|
|
339
|
-
} | {
|
|
340
|
-
type: 'filter';
|
|
341
|
-
min?: number | undefined;
|
|
342
|
-
max?: number | undefined;
|
|
343
|
-
}
|
|
344
|
-
/** Orders the values (and, at chart level, the categories with them). */
|
|
345
|
-
| {
|
|
346
|
-
type: 'sort';
|
|
347
|
-
order?: 'asc' | 'desc' | undefined;
|
|
348
|
-
}
|
|
349
|
-
/** Folds every `every` consecutive values into one. */
|
|
350
|
-
| {
|
|
351
|
-
type: 'aggregate';
|
|
352
|
-
every: number;
|
|
353
|
-
method?: 'sum' | 'mean' | 'min' | 'max' | undefined;
|
|
354
|
-
}
|
|
355
|
-
/** Bins the values into counts (chart level: categories become bin labels). */
|
|
356
|
-
| {
|
|
357
|
-
type: 'bin';
|
|
358
|
-
bins?: number | undefined;
|
|
359
|
-
binWidth?: number | undefined;
|
|
360
|
-
domain?: [number, number] | undefined;
|
|
361
|
-
};
|
|
362
|
-
/**
|
|
363
|
-
* Point reduction for dense line and area series. `auto` samples above 2000 visible points with
|
|
364
|
-
* LTTB; `minmax` keeps the extremes of each bucket; `none` draws everything. Sampled charts keep
|
|
365
|
-
* their original point indexes in items and tooltips.
|
|
366
|
-
*/
|
|
367
|
-
type Sampling = 'none' | 'auto' | 'lttb' | 'minmax' | 'm4' | {
|
|
368
|
-
strategy: 'lttb' | 'minmax' | 'm4';
|
|
369
|
-
threshold?: number | undefined;
|
|
370
|
-
};
|
|
371
|
-
/** A bar, line or area series inside a cartesian chart. */
|
|
372
|
-
interface CartesianSeries extends Series {
|
|
373
|
-
/** Defaults to the chart's own type: bars in a BarChart, lines in a LineChart, areas in an AreaChart. */
|
|
374
|
-
type?: 'bar' | 'line' | 'area' | undefined;
|
|
375
|
-
/** Which y axis the values are measured on: a side, or the `id` of an axis in `yAxis`. @default 'left' */
|
|
376
|
-
axis?: 'left' | 'right' | (string & {}) | undefined;
|
|
377
|
-
/** Overrides the chart-level curve for this line or area. */
|
|
378
|
-
curve?: Curve | undefined;
|
|
379
|
-
/** SVG dash pattern, e.g. `'4 3'`, for a line or area outline. */
|
|
380
|
-
dash?: string | undefined;
|
|
381
|
-
/** Area fill opacity, 0–1. @default 0.25 */
|
|
382
|
-
fillOpacity?: number | undefined;
|
|
383
|
-
/** Fade the area fill from `fillOpacity` at the line to transparent at the baseline. @default false */
|
|
384
|
-
gradient?: boolean | undefined;
|
|
385
|
-
/** Dots on line and area points. @default true up to 100 points, then off */
|
|
386
|
-
markers?: boolean | undefined;
|
|
387
|
-
/** Marker shape of a line or area series. @default 'circle' */
|
|
388
|
-
symbol?: MarkerSymbol | undefined;
|
|
389
|
-
/** Marker radius in pixels. @default 3 */
|
|
390
|
-
markerSize?: number | undefined;
|
|
391
|
-
/** Stack with the other series that share the same group; `true` is the default group. */
|
|
392
|
-
stack?: boolean | string | undefined;
|
|
393
|
-
/** Error bars per point: `±e` or `[low, high]`, drawn as whiskers on bars, lines and areas. */
|
|
394
|
-
errors?: ErrorValue[] | undefined;
|
|
395
|
-
/** Transforms applied to this series after the chart-level ones. */
|
|
396
|
-
transforms?: SeriesTransform[] | undefined;
|
|
397
|
-
}
|
|
398
|
-
/** A shaded band between two series of values, e.g. a forecast interval. */
|
|
399
|
-
interface RangeSeries extends Identified {
|
|
400
|
-
type: 'range';
|
|
401
|
-
name: string;
|
|
402
|
-
low: Value[];
|
|
403
|
-
high: Value[];
|
|
404
|
-
color?: string | undefined;
|
|
405
|
-
axis?: 'left' | 'right' | (string & {}) | undefined;
|
|
406
|
-
curve?: Curve | undefined;
|
|
407
|
-
/** A shaded band, floating bars from low to high, or two outlines. @default 'area' */
|
|
408
|
-
style?: 'area' | 'bar' | 'line' | undefined;
|
|
409
|
-
}
|
|
410
|
-
type Category = string | number | Date;
|
|
411
|
-
/** A scatter point: an `[x, y]` pair, an `[x, y, size]` triple, or an object with an optional label. */
|
|
412
|
-
type ScatterPoint = [number, number] | [number, number, number] | (Identified & {
|
|
413
|
-
x: number;
|
|
414
|
-
y: number;
|
|
415
|
-
size?: number | undefined;
|
|
416
|
-
label?: string | undefined;
|
|
417
|
-
/** Any CSS color for this point; wins over the series color and `colorScale`. */
|
|
418
|
-
color?: string | undefined;
|
|
419
|
-
/** The quantity `colorScale` maps to a color. */
|
|
420
|
-
value?: number | undefined;
|
|
421
|
-
});
|
|
422
|
-
/** Marker shape of a scatter series, so series are told apart by more than color. */
|
|
423
|
-
type MarkerSymbol = 'circle' | 'square' | 'diamond' | 'triangle';
|
|
424
|
-
interface ScatterSeries extends Identified {
|
|
425
|
-
name: string;
|
|
426
|
-
/** `[x, y]` pairs, `[x, y, size]` triples for bubbles, or `{ x, y, size?, label? }` objects. */
|
|
427
|
-
data: ScatterPoint[];
|
|
428
|
-
color?: string | undefined;
|
|
429
|
-
/** @default 'circle' */
|
|
430
|
-
symbol?: MarkerSymbol | undefined;
|
|
431
|
-
}
|
|
432
|
-
/** Where a colour legend sits. */
|
|
433
|
-
interface ColorLegendOptions {
|
|
434
|
-
/** @default 'horizontal' (under the plot); `vertical` is a column at the right */
|
|
435
|
-
orientation?: 'horizontal' | 'vertical' | undefined;
|
|
436
|
-
title?: string | undefined;
|
|
437
|
-
}
|
|
438
|
-
/** A bubble: two positions and a magnitude the bubble's area follows. */
|
|
439
|
-
interface BubblePoint extends Identified {
|
|
440
|
-
x: number;
|
|
441
|
-
y: number;
|
|
442
|
-
/** Magnitude; the bubble's area, not its radius, is proportional to it. Negatives count as zero. */
|
|
443
|
-
z: number;
|
|
444
|
-
label?: string | undefined;
|
|
445
|
-
color?: string | undefined;
|
|
446
|
-
/** The quantity `colorScale` maps to a color. @default z */
|
|
447
|
-
value?: number | undefined;
|
|
448
|
-
}
|
|
449
|
-
interface BubbleSeries extends Identified {
|
|
450
|
-
name: string;
|
|
451
|
-
data: BubblePoint[];
|
|
452
|
-
color?: string | undefined;
|
|
453
|
-
}
|
|
454
|
-
/** A qualitative sector of a gauge or bullet scale. */
|
|
455
|
-
interface Band {
|
|
456
|
-
from: number;
|
|
457
|
-
to: number;
|
|
458
|
-
variant?: Variant | undefined;
|
|
459
|
-
color?: string | undefined;
|
|
460
|
-
label?: string | undefined;
|
|
461
|
-
}
|
|
462
|
-
interface BulletDatum extends Identified {
|
|
463
|
-
name: string;
|
|
464
|
-
/** The measure. */
|
|
465
|
-
value: number;
|
|
466
|
-
target?: number | undefined;
|
|
467
|
-
/** Qualitative upper bounds, ascending, e.g. `[50, 75, 100]` for poor / acceptable / good; overrides the chart-level `ranges`. */
|
|
468
|
-
ranges?: (number | Band)[] | undefined;
|
|
469
|
-
color?: string | undefined;
|
|
470
|
-
}
|
|
471
|
-
/** A combo series must say what it is: a bar, line, area or range. */
|
|
472
|
-
type ComboSeries = (CartesianSeries & {
|
|
473
|
-
type: 'bar' | 'line' | 'area';
|
|
474
|
-
}) | RangeSeries;
|
|
475
|
-
interface RangeChartSeries extends Identified {
|
|
476
|
-
name: string;
|
|
477
|
-
low: Value[];
|
|
478
|
-
high: Value[];
|
|
479
|
-
color?: string | undefined;
|
|
480
|
-
axis?: 'left' | 'right' | undefined;
|
|
481
|
-
curve?: Curve | undefined;
|
|
482
|
-
}
|
|
483
|
-
/** A category with a start and an end value, joined by a connector: before/after, plan/actual. */
|
|
484
|
-
interface DumbbellDatum extends Identified {
|
|
485
|
-
name: string;
|
|
486
|
-
start: Value;
|
|
487
|
-
end: Value;
|
|
488
|
-
color?: string | undefined;
|
|
489
|
-
}
|
|
490
|
-
/** One Marimekko column: its width follows `total` (or the sum of its segments), segments stack to 100%. */
|
|
491
|
-
interface MarimekkoCategory extends Identified {
|
|
492
|
-
name: string;
|
|
493
|
-
/** Segment values; keyed by the `segments` names in order. */
|
|
494
|
-
values: Value[];
|
|
495
|
-
/** Column width measure. @default the sum of `values` */
|
|
496
|
-
total?: number | undefined;
|
|
497
|
-
}
|
|
498
|
-
interface MarimekkoChartInput extends Sized {
|
|
499
|
-
/** Segment names, in stacking order; one color each. */
|
|
500
|
-
segments: (string | Pick<Datum, 'id' | 'name' | 'color'>)[];
|
|
501
|
-
data: MarimekkoCategory[];
|
|
502
|
-
/** Write segment shares inside cells wide enough. @default false */
|
|
503
|
-
labels?: boolean | undefined;
|
|
504
|
-
/** Gap between columns as a share of the plot width. @default 0.01 */
|
|
505
|
-
gap?: number | undefined;
|
|
506
|
-
/** How the column widths (totals) are written in tooltips and the x axis. */
|
|
507
|
-
xAxis?: Pick<AxisOptions, 'format' | 'label'> | undefined;
|
|
508
|
-
}
|
|
509
|
-
/** One axis of a parallel-coordinates chart. */
|
|
510
|
-
interface ParallelDimension extends Identified {
|
|
511
|
-
/** Key in each row's values, and the axis title unless `label` is set. */
|
|
512
|
-
key: string;
|
|
513
|
-
label?: string | undefined;
|
|
514
|
-
min?: number | undefined;
|
|
515
|
-
max?: number | undefined;
|
|
516
|
-
format?: Format | undefined;
|
|
517
|
-
/** Run the axis top-down. @default false */
|
|
518
|
-
reversed?: boolean | undefined;
|
|
519
|
-
}
|
|
520
|
-
interface ParallelRow extends Identified {
|
|
521
|
-
name: string;
|
|
522
|
-
values: Record<string, Value>;
|
|
523
|
-
color?: string | undefined;
|
|
524
|
-
/** Category, for color and the legend. */
|
|
525
|
-
group?: string | undefined;
|
|
526
|
-
}
|
|
527
|
-
interface ParallelCoordinatesInput extends Sized {
|
|
528
|
-
dimensions: ParallelDimension[];
|
|
529
|
-
data: ParallelRow[];
|
|
530
|
-
/** Line opacity. @default 0.6, lower above 200 rows */
|
|
531
|
-
opacity?: number | undefined;
|
|
532
|
-
/** @default 'linear' */
|
|
533
|
-
curve?: Curve | undefined;
|
|
534
|
-
/** Draw lines across missing values instead of breaking them. @default false */
|
|
535
|
-
connectNulls?: boolean | undefined;
|
|
536
|
-
/** Keep rows whose value on `key` lies inside `[min, max]`; the rest fade. */
|
|
537
|
-
filters?: {
|
|
538
|
-
key: string;
|
|
539
|
-
min?: number | undefined;
|
|
540
|
-
max?: number | undefined;
|
|
541
|
-
}[] | undefined;
|
|
542
|
-
}
|
|
543
|
-
interface NetworkNode extends Identified {
|
|
544
|
-
id: string;
|
|
545
|
-
/** @default the id */
|
|
546
|
-
label?: string | undefined;
|
|
547
|
-
/** Node weight; the node's area follows it. */
|
|
548
|
-
value?: number | undefined;
|
|
549
|
-
/** Category, for color and the legend. */
|
|
550
|
-
group?: string | undefined;
|
|
551
|
-
color?: string | undefined;
|
|
552
|
-
/** Position in data units, used by `arrange: 'manual'`. */
|
|
553
|
-
x?: number | undefined;
|
|
554
|
-
y?: number | undefined;
|
|
555
|
-
}
|
|
556
|
-
interface NetworkEdge extends Identified {
|
|
557
|
-
source: string;
|
|
558
|
-
target: string;
|
|
559
|
-
/** Edge weight; the stroke width follows it. */
|
|
560
|
-
value?: number | undefined;
|
|
561
|
-
label?: string | undefined;
|
|
562
|
-
}
|
|
563
|
-
interface TimelineEvent extends Identified {
|
|
564
|
-
date: string | number | Date;
|
|
565
|
-
label: string;
|
|
566
|
-
description?: string | undefined;
|
|
567
|
-
/** Lane the event sits on; lanes share the time axis. */
|
|
568
|
-
group?: string | undefined;
|
|
569
|
-
color?: string | undefined;
|
|
570
|
-
variant?: Variant | undefined;
|
|
571
|
-
}
|
|
572
|
-
interface TimelineChartInput extends Sized {
|
|
573
|
-
/** Point-in-time events, in any order. */
|
|
574
|
-
events: TimelineEvent[];
|
|
575
|
-
/** Time runs along x with labels staggered, or down y with one row per event. @default 'horizontal' */
|
|
576
|
-
orientation?: 'horizontal' | 'vertical' | undefined;
|
|
577
|
-
/** How dates are written. @default date, or time when the events span under two days */
|
|
578
|
-
xAxis?: Pick<AxisOptions, 'format' | 'label'> | undefined;
|
|
579
|
-
/** Write event labels. @default true */
|
|
580
|
-
labels?: boolean | undefined;
|
|
581
|
-
}
|
|
582
|
-
/** One radar axis with its own scale. */
|
|
583
|
-
interface RadarMetric extends Identified {
|
|
584
|
-
label: string;
|
|
585
|
-
/** @default 0 */
|
|
586
|
-
min?: number | undefined;
|
|
587
|
-
/** @default the largest value on this axis, rounded up */
|
|
588
|
-
max?: number | undefined;
|
|
589
|
-
format?: Format | undefined;
|
|
590
|
-
}
|
|
591
|
-
interface CalendarCell {
|
|
592
|
-
date: string | number | Date;
|
|
593
|
-
value: number;
|
|
594
|
-
}
|
|
595
|
-
/** An ordinal palette, a one-way ramp, a two-way ramp around a midpoint, or exact classes. */
|
|
596
|
-
type ColorScale = {
|
|
597
|
-
type: 'ordinal';
|
|
598
|
-
colors?: string[] | undefined;
|
|
599
|
-
} | {
|
|
600
|
-
type: 'sequential';
|
|
601
|
-
/** @default the data extent */
|
|
602
|
-
domain?: [number, number] | undefined;
|
|
603
|
-
/** Stops, low to high; concrete colors interpolate, token colors quantize. @default one color, opacity ramp */
|
|
604
|
-
colors?: string[] | undefined;
|
|
605
|
-
/** Quantize into this many classes. */
|
|
606
|
-
steps?: number | undefined;
|
|
607
|
-
reversed?: boolean | undefined;
|
|
608
|
-
} | {
|
|
609
|
-
type: 'diverging';
|
|
610
|
-
/** `[min, mid, max]`. @default symmetric around zero */
|
|
611
|
-
domain?: [number, number, number] | undefined;
|
|
612
|
-
/** `[low, high]` or `[low, mid, high]` stops. @default danger / surface / primary tokens */
|
|
613
|
-
colors?: string[] | undefined;
|
|
614
|
-
steps?: number | undefined;
|
|
615
|
-
reversed?: boolean | undefined;
|
|
616
|
-
} | {
|
|
617
|
-
type: 'threshold';
|
|
618
|
-
/** Ascending class boundaries; `colors` has one more entry than `thresholds`. */
|
|
619
|
-
thresholds: number[];
|
|
620
|
-
colors: string[];
|
|
621
|
-
labels?: string[] | undefined;
|
|
622
|
-
};
|
|
623
|
-
interface Box {
|
|
624
|
-
x: number;
|
|
625
|
-
y: number;
|
|
626
|
-
width: number;
|
|
627
|
-
height: number;
|
|
628
|
-
}
|
|
629
|
-
interface SankeyNode extends Identified {
|
|
630
|
-
id: string;
|
|
631
|
-
/** @default the id */
|
|
632
|
-
label?: string | undefined;
|
|
633
|
-
color?: string | undefined;
|
|
634
|
-
}
|
|
635
|
-
interface SankeyLink extends Identified {
|
|
636
|
-
source: string;
|
|
637
|
-
target: string;
|
|
638
|
-
value: number;
|
|
639
|
-
}
|
|
640
|
-
interface Candle extends Identified {
|
|
641
|
-
label: Category;
|
|
642
|
-
open: number;
|
|
643
|
-
high: number;
|
|
644
|
-
low: number;
|
|
645
|
-
close: number;
|
|
646
|
-
/** Drawn as a bar in a pane under the candles when any candle has one. */
|
|
647
|
-
volume?: number | undefined;
|
|
648
|
-
}
|
|
649
|
-
/** A moving average over the closes, drawn as a line over the candles. */
|
|
650
|
-
interface CandlestickOverlay {
|
|
651
|
-
type: 'sma' | 'ema';
|
|
652
|
-
/** Number of candles averaged. */
|
|
653
|
-
period: number;
|
|
654
|
-
color?: string | undefined;
|
|
655
|
-
/** @default `SMA 20` */
|
|
656
|
-
name?: string | undefined;
|
|
657
|
-
}
|
|
658
|
-
interface WaterfallDatum extends Datum {
|
|
659
|
-
/**
|
|
660
|
-
* `change` (default) is a signed delta; `subtotal` and `total` stand on zero and show the
|
|
661
|
-
* running total (`value` is ignored). `subtotal: true` is the older spelling.
|
|
662
|
-
*/
|
|
663
|
-
type?: 'change' | 'subtotal' | 'total' | undefined;
|
|
664
|
-
/** A bar from zero to the running total so far, instead of a delta; `value` is ignored. */
|
|
665
|
-
subtotal?: boolean | undefined;
|
|
666
|
-
}
|
|
667
|
-
interface GanttTask extends Identified {
|
|
668
|
-
name: string;
|
|
669
|
-
start: number;
|
|
670
|
-
end: number;
|
|
671
|
-
color?: string | undefined;
|
|
672
|
-
/** Tasks sharing a group share a row, so one row can hold several intervals. */
|
|
673
|
-
group?: string | undefined;
|
|
674
|
-
/** Completed share, 0–1, drawn as a darker inner bar. */
|
|
675
|
-
progress?: number | undefined;
|
|
676
|
-
/** A point in time drawn as a diamond at `start`; `end` is ignored. */
|
|
677
|
-
milestone?: boolean | undefined;
|
|
678
|
-
/** Names (or ids) of tasks that must finish first; drawn as connectors. */
|
|
679
|
-
dependsOn?: ChartItemId[] | undefined;
|
|
680
|
-
/** The planned interval, drawn as a thin bar under the task. */
|
|
681
|
-
baseline?: {
|
|
682
|
-
start: number;
|
|
683
|
-
end: number;
|
|
684
|
-
} | undefined;
|
|
685
|
-
/** Id (or name) of the parent task; children are indented and the parent spans them. */
|
|
686
|
-
parent?: ChartItemId | undefined;
|
|
687
|
-
}
|
|
688
|
-
/** A precomputed five-number summary, instead of raw samples. */
|
|
689
|
-
interface BoxSummary extends Identified {
|
|
690
|
-
name: string;
|
|
691
|
-
min: number;
|
|
692
|
-
q1: number;
|
|
693
|
-
median: number;
|
|
694
|
-
q3: number;
|
|
695
|
-
max: number;
|
|
696
|
-
outliers?: number[] | undefined;
|
|
697
|
-
mean?: number | undefined;
|
|
698
|
-
color?: string | undefined;
|
|
699
|
-
}
|
|
700
|
-
/** A series with one raw sample per category, for grouped boxplots (`categories` required). */
|
|
701
|
-
interface GroupedBoxSeries extends Identified {
|
|
702
|
-
name: string;
|
|
703
|
-
/** `data[categoryIndex]` is that category's sample. */
|
|
704
|
-
data: Value[][];
|
|
705
|
-
color?: string | undefined;
|
|
706
|
-
}
|
|
707
|
-
type BoxplotSeries = Series | BoxSummary | GroupedBoxSeries;
|
|
708
|
-
interface TreeNode extends Identified {
|
|
709
|
-
name: string;
|
|
710
|
-
/** Leaf size; a branch's size is the sum of its children when unset. */
|
|
711
|
-
value?: number | undefined;
|
|
712
|
-
children?: TreeNode[] | undefined;
|
|
713
|
-
color?: string | undefined;
|
|
714
|
-
/** A second line under the name, e.g. a role in an organization chart. */
|
|
715
|
-
subtitle?: string | undefined;
|
|
716
|
-
}
|
|
717
|
-
/** A node-link tree: one box or dot per node, links to its children. */
|
|
718
|
-
interface TreeChartInput extends Sized {
|
|
719
|
-
data: TreeNode[];
|
|
720
|
-
/** Root at the top with levels going down, or root at the left. @default 'vertical' */
|
|
721
|
-
orientation?: 'vertical' | 'horizontal' | undefined;
|
|
722
|
-
/** Dots with labels beside them, or boxes holding the name (and subtitle). @default 'circle' */
|
|
723
|
-
nodeShape?: 'circle' | 'box' | undefined;
|
|
724
|
-
/** Curved, elbow (orthogonal) or straight links. @default 'curve' */
|
|
725
|
-
linkStyle?: 'curve' | 'elbow' | 'straight' | undefined;
|
|
726
|
-
/** Id (or name) of the node to show as the root: controlled drill-down. */
|
|
727
|
-
rootId?: ChartItemId | undefined;
|
|
728
|
-
/** Nodes whose children are hidden: controlled expand/collapse; collapsed nodes get a `+` mark. */
|
|
729
|
-
collapsed?: ChartItemId[] | undefined;
|
|
730
|
-
/** Deepest level drawn. */
|
|
731
|
-
maxDepth?: number | undefined;
|
|
732
|
-
/** Write node names. @default true */
|
|
733
|
-
labels?: boolean | undefined;
|
|
734
|
-
/** Dot radius, or box height, in pixels. @default 5 / 36 */
|
|
735
|
-
nodeSize?: number | undefined;
|
|
736
|
-
}
|
|
737
|
-
/** An organization chart: a tree of boxes with elbow links and optional subtitles. */
|
|
738
|
-
type OrganizationChartInput = Omit<TreeChartInput, 'nodeShape' | 'linkStyle'>;
|
|
739
|
-
/** Nested circles: each node a circle sized by value, children packed inside their parent. */
|
|
740
|
-
interface CirclePackingInput extends Sized {
|
|
741
|
-
data: TreeNode[];
|
|
742
|
-
rootId?: ChartItemId | undefined;
|
|
743
|
-
maxDepth?: number | undefined;
|
|
744
|
-
/** Write names on circles wide enough. @default true */
|
|
745
|
-
labels?: boolean | undefined;
|
|
746
|
-
/** Gap between sibling circles, in pixels. @default 2 */
|
|
747
|
-
padding?: number | undefined;
|
|
748
|
-
/** Colors leaves by their value instead of by branch. */
|
|
749
|
-
colorScale?: ColorScale | undefined;
|
|
750
|
-
}
|
|
751
|
-
/** A rectangular sunburst: one row (or column) per depth, children inside their parent's span. */
|
|
752
|
-
interface IcicleInput extends Sized {
|
|
753
|
-
data: TreeNode[];
|
|
754
|
-
/** Root row at the top with depth going down, or root column at the left. @default 'vertical' */
|
|
755
|
-
orientation?: 'vertical' | 'horizontal' | undefined;
|
|
756
|
-
rootId?: ChartItemId | undefined;
|
|
757
|
-
/** Write the path to `rootId` above the cells. @default false */
|
|
758
|
-
breadcrumbs?: boolean | undefined;
|
|
759
|
-
maxDepth?: number | undefined;
|
|
760
|
-
/** Cell order inside a parent. @default 'none' (input order) */
|
|
761
|
-
sort?: 'asc' | 'desc' | 'none' | undefined;
|
|
762
|
-
/** Write names on cells wide enough. @default true */
|
|
763
|
-
labels?: boolean | undefined;
|
|
764
|
-
/** Gap between cells, in pixels. @default 1 */
|
|
765
|
-
padding?: number | undefined;
|
|
766
|
-
colorScale?: ColorScale | undefined;
|
|
767
|
-
}
|
|
768
|
-
/** Ranks over categories: one line per series, the top rank at the top. */
|
|
769
|
-
interface BumpChartInput extends Sized {
|
|
770
|
-
/** Values per category; ranks are computed per category unless `ranked`. */
|
|
771
|
-
series: Series[];
|
|
772
|
-
categories?: Category[] | undefined;
|
|
773
|
-
/** The data are already ranks (1 = first). @default false */
|
|
774
|
-
ranked?: boolean | undefined;
|
|
775
|
-
/** Only the first `topRank` ranks are drawn; series that drop below leave the plot. */
|
|
776
|
-
topRank?: number | undefined;
|
|
777
|
-
/** @default 'monotone' */
|
|
778
|
-
curve?: Curve | undefined;
|
|
779
|
-
/** Write series names at the right end of their line. @default true */
|
|
780
|
-
labels?: boolean | undefined;
|
|
781
|
-
/** Marker radius in pixels. @default 5 */
|
|
782
|
-
markerSize?: number | undefined;
|
|
783
|
-
xAxis?: XAxisOptions | undefined;
|
|
784
|
-
}
|
|
785
|
-
/** A Nightingale rose: equal angular sectors whose radius follows the value. */
|
|
786
|
-
interface PolarAreaChartInput extends Sized {
|
|
787
|
-
data: Datum[];
|
|
788
|
-
/** Radius proportional to the value (`linear`) or to its square root, so area is proportional (`sqrt`). @default 'sqrt' */
|
|
789
|
-
scale?: 'linear' | 'sqrt' | undefined;
|
|
790
|
-
/** Outer ring value. @default the largest value, rounded up */
|
|
791
|
-
max?: number | undefined;
|
|
792
|
-
/** Degrees clockwise from 12 o'clock. @default 0 */
|
|
793
|
-
startAngle?: number | undefined;
|
|
794
|
-
/** @default startAngle + 360 */
|
|
795
|
-
endAngle?: number | undefined;
|
|
796
|
-
/** Gap between sectors, in degrees. @default 0 */
|
|
797
|
-
padAngle?: number | undefined;
|
|
798
|
-
/** Hole radius as a fraction of the outer radius. @default 0 */
|
|
799
|
-
innerRadius?: number | undefined;
|
|
800
|
-
/** Number of grid rings. @default 4 */
|
|
801
|
-
levels?: number | undefined;
|
|
802
|
-
/** Write each name at its sector's edge. @default false */
|
|
803
|
-
labels?: boolean | undefined;
|
|
804
|
-
}
|
|
805
|
-
/** A beeswarm: every observation as a dot, spread sideways so none overlap. */
|
|
806
|
-
interface SwarmPlotInput extends Sized {
|
|
807
|
-
/** One swarm per series, over that series' raw samples. */
|
|
808
|
-
series: Series[];
|
|
809
|
-
/** @default 'vertical' */
|
|
810
|
-
orientation?: 'vertical' | 'horizontal' | undefined;
|
|
811
|
-
/** Dot radius in pixels. @default 3 */
|
|
812
|
-
markerSize?: number | undefined;
|
|
813
|
-
yAxis?: AxisOptions | undefined;
|
|
814
|
-
references?: Reference[] | undefined;
|
|
815
|
-
}
|
|
816
|
-
/** A grid of cells, each standing for a share of the total, colored by datum. */
|
|
817
|
-
interface WaffleChartInput extends Sized {
|
|
818
|
-
data: Datum[];
|
|
819
|
-
/** What the whole grid stands for. @default the sum of the values */
|
|
820
|
-
total?: number | undefined;
|
|
821
|
-
/** @default 10 */
|
|
822
|
-
rows?: number | undefined;
|
|
823
|
-
/** @default 10 */
|
|
824
|
-
columns?: number | undefined;
|
|
825
|
-
/** Fill column by column from the bottom-left, or row by row from the top-left. @default 'vertical' */
|
|
826
|
-
orientation?: 'vertical' | 'horizontal' | undefined;
|
|
827
|
-
/** Gap between cells in pixels. @default 2 */
|
|
828
|
-
cellGap?: number | undefined;
|
|
829
|
-
/** Cell corner radius in pixels. @default 2 */
|
|
830
|
-
cellRadius?: number | undefined;
|
|
831
|
-
/** Write each datum's share after its name in the legend. @default false */
|
|
832
|
-
labels?: boolean | undefined;
|
|
833
|
-
}
|
|
834
|
-
interface ChordLink extends Identified {
|
|
835
|
-
source: string;
|
|
836
|
-
target: string;
|
|
837
|
-
value: number;
|
|
838
|
-
}
|
|
839
|
-
interface GeoPoint {
|
|
840
|
-
type: 'Point';
|
|
841
|
-
coordinates: [number, number];
|
|
842
|
-
}
|
|
843
|
-
interface GeoMultiPoint {
|
|
844
|
-
type: 'MultiPoint';
|
|
845
|
-
coordinates: [number, number][];
|
|
846
|
-
}
|
|
847
|
-
interface GeoLineString {
|
|
848
|
-
type: 'LineString';
|
|
849
|
-
coordinates: [number, number][];
|
|
850
|
-
}
|
|
851
|
-
interface GeoMultiLineString {
|
|
852
|
-
type: 'MultiLineString';
|
|
853
|
-
coordinates: [number, number][][];
|
|
854
|
-
}
|
|
855
|
-
interface GeoPolygon {
|
|
856
|
-
type: 'Polygon';
|
|
857
|
-
/** Rings of `[longitude, latitude]` pairs. */
|
|
858
|
-
coordinates: [number, number][][];
|
|
859
|
-
}
|
|
860
|
-
interface GeoMultiPolygon {
|
|
861
|
-
type: 'MultiPolygon';
|
|
862
|
-
coordinates: [number, number][][][];
|
|
863
|
-
}
|
|
864
|
-
interface MapFeature extends Identified {
|
|
865
|
-
name: string;
|
|
866
|
-
/** The measure the fill follows; a feature without one is drawn in the neutral fill. */
|
|
867
|
-
value?: number | undefined;
|
|
868
|
-
/** Polygons are regions; points become markers and line strings routes, in the same layers as `points`/`lines`. */
|
|
869
|
-
geometry: GeoPolygon | GeoMultiPolygon | GeoPoint | GeoMultiPoint | GeoLineString | GeoMultiLineString;
|
|
870
|
-
/** A categorical color for this region, drawn at full opacity. */
|
|
871
|
-
color?: string | undefined;
|
|
872
|
-
}
|
|
873
|
-
/** A marker at a coordinate; with a `value` its area follows the value (a bubble). */
|
|
874
|
-
interface MapPoint extends Identified {
|
|
875
|
-
name: string;
|
|
876
|
-
/** `[longitude, latitude]`. */
|
|
877
|
-
coordinates: [number, number];
|
|
878
|
-
value?: number | undefined;
|
|
879
|
-
color?: string | undefined;
|
|
880
|
-
}
|
|
881
|
-
/** A route or connection drawn through `[longitude, latitude]` points. */
|
|
882
|
-
interface MapLine extends Identified {
|
|
883
|
-
name: string;
|
|
884
|
-
coordinates: [number, number][];
|
|
885
|
-
value?: number | undefined;
|
|
886
|
-
color?: string | undefined;
|
|
887
|
-
dash?: string | undefined;
|
|
888
|
-
}
|
|
889
|
-
/** A map's pan/zoom state: the projected centre in `[longitude, latitude]` and a zoom factor. */
|
|
890
|
-
interface MapView {
|
|
891
|
-
/** @default the centre of the features' bounds */
|
|
892
|
-
center?: [number, number] | undefined;
|
|
893
|
-
/** Scale multiplier over the fitted projection, 1–64. @default 1 */
|
|
894
|
-
zoom?: number | undefined;
|
|
895
|
-
}
|
|
896
|
-
interface RadialBand {
|
|
897
|
-
from: number;
|
|
898
|
-
to: number;
|
|
899
|
-
variant?: Variant | undefined;
|
|
900
|
-
}
|
|
901
|
-
/** What a click, focus or hover refers to. */
|
|
902
|
-
interface ChartItem {
|
|
903
|
-
/** The tooltip text. */
|
|
904
|
-
label: string;
|
|
905
|
-
/** Stable identifier of the datum, node, link or feature; the name when none was given. */
|
|
906
|
-
id?: ChartItemId | undefined;
|
|
907
|
-
series?: string | undefined;
|
|
908
|
-
/** Stable identifier of the series; the series name when none was given. */
|
|
909
|
-
seriesId?: ChartItemId | undefined;
|
|
910
|
-
category?: string | undefined;
|
|
911
|
-
index?: number | undefined;
|
|
912
|
-
value?: number | undefined;
|
|
913
|
-
name?: string | undefined;
|
|
914
|
-
/** Set on legend entries, which toggle a series instead of reporting a value. */
|
|
915
|
-
legend?: boolean | undefined;
|
|
916
|
-
/** Set on range-selector buttons: clicking applies this zoom window. */
|
|
917
|
-
range?: Zoom | undefined;
|
|
918
|
-
}
|
|
919
|
-
interface ShapeBase {
|
|
920
|
-
/** The `data-skdx-part` value, e.g. `node`, `link`, `grid`. */
|
|
921
|
-
part: string;
|
|
922
|
-
/** Native tooltip text. */
|
|
923
|
-
title?: string | undefined;
|
|
924
|
-
/** What the mark stands for; makes it clickable and keyboard-focusable. */
|
|
925
|
-
item?: ChartItem | undefined;
|
|
926
|
-
}
|
|
927
|
-
type Shape = (ShapeBase & {
|
|
928
|
-
kind: 'path';
|
|
929
|
-
d: string;
|
|
930
|
-
fill?: string | undefined;
|
|
931
|
-
stroke?: string | undefined;
|
|
932
|
-
strokeWidth?: number | undefined;
|
|
933
|
-
strokeLinecap?: 'round' | undefined;
|
|
934
|
-
strokeLinejoin?: 'round' | undefined;
|
|
935
|
-
opacity?: number | undefined;
|
|
936
|
-
fillOpacity?: number | undefined;
|
|
937
|
-
dash?: string | undefined;
|
|
938
|
-
}) | (ShapeBase & {
|
|
939
|
-
kind: 'rect';
|
|
940
|
-
x: number;
|
|
941
|
-
y: number;
|
|
942
|
-
width: number;
|
|
943
|
-
height: number;
|
|
944
|
-
fill: string;
|
|
945
|
-
stroke?: string | undefined;
|
|
946
|
-
opacity?: number | undefined;
|
|
947
|
-
rx?: number | undefined;
|
|
948
|
-
}) | (ShapeBase & {
|
|
949
|
-
kind: 'line';
|
|
950
|
-
x1: number;
|
|
951
|
-
y1: number;
|
|
952
|
-
x2: number;
|
|
953
|
-
y2: number;
|
|
954
|
-
stroke: string;
|
|
955
|
-
dash?: string | undefined;
|
|
956
|
-
strokeWidth?: number | undefined;
|
|
957
|
-
opacity?: number | undefined;
|
|
958
|
-
}) | (ShapeBase & {
|
|
959
|
-
kind: 'circle';
|
|
960
|
-
cx: number;
|
|
961
|
-
cy: number;
|
|
962
|
-
r: number;
|
|
963
|
-
fill: string;
|
|
964
|
-
stroke?: string | undefined;
|
|
965
|
-
opacity?: number | undefined;
|
|
966
|
-
}) | (ShapeBase & {
|
|
967
|
-
kind: 'text';
|
|
968
|
-
x: number;
|
|
969
|
-
y: number;
|
|
970
|
-
text: string;
|
|
971
|
-
anchor?: 'start' | 'middle' | 'end' | undefined;
|
|
972
|
-
baseline?: 'middle' | 'hanging' | undefined;
|
|
973
|
-
fill?: string | undefined;
|
|
974
|
-
weight?: 'bold' | undefined;
|
|
975
|
-
/** Rotation in degrees around `(x, y)`, e.g. `-45` for long category labels. */
|
|
976
|
-
rotate?: number | undefined;
|
|
977
|
-
});
|
|
978
|
-
/** Where the pointer can act inside a cartesian chart: category slots, the shared tooltip rows and the brush strip. */
|
|
979
|
-
interface Hit {
|
|
980
|
-
plot: Box;
|
|
981
|
-
/** Pixel center of every visible category. */
|
|
982
|
-
xs: number[];
|
|
983
|
-
/** Tooltip lines per visible category: the category, then one per series. */
|
|
984
|
-
rows: string[][];
|
|
985
|
-
/** Total category count, before zooming. */
|
|
986
|
-
count: number;
|
|
987
|
-
zoom: Zoom;
|
|
988
|
-
/** The range strip, when `brush` is on. */
|
|
989
|
-
brush?: {
|
|
990
|
-
box: Box;
|
|
991
|
-
window: Box;
|
|
992
|
-
} | undefined;
|
|
993
|
-
crosshair: boolean;
|
|
994
|
-
}
|
|
995
|
-
/** What every layout returns: the outer size, the whole chart as shapes and the tooltip switch. */
|
|
996
|
-
interface Canvas {
|
|
997
|
-
width: number;
|
|
998
|
-
height: number;
|
|
999
|
-
/** Everything drawn, back to front: grid, marks, legend and labels. */
|
|
1000
|
-
shapes: Shape[];
|
|
1001
|
-
tooltip: boolean;
|
|
1002
|
-
/** Rewrites a mark's tooltip text; from `TooltipOptions.formatter`. */
|
|
1003
|
-
tooltipFormatter?: ((item: ChartItem) => string | string[]) | undefined;
|
|
1004
|
-
description?: string | undefined;
|
|
1005
|
-
decorative?: boolean | undefined;
|
|
1006
|
-
/** Transition duration in ms when animation is on. */
|
|
1007
|
-
animate?: number | undefined;
|
|
1008
|
-
responsive?: boolean | undefined;
|
|
1009
|
-
hit?: Hit | undefined;
|
|
1010
|
-
/** Rewrites the shared axis tooltip rows; from `TooltipOptions.axisFormatter`. */
|
|
1011
|
-
axisTooltipFormatter?: ((rows: string[], index: number) => string[]) | undefined;
|
|
1012
|
-
/** Render the tooltip as an HTML element over the page; from `TooltipOptions.portal`. */
|
|
1013
|
-
tooltipPortal?: boolean | undefined;
|
|
1014
|
-
/** Where the tooltip box sits; from `TooltipOptions.placement`. */
|
|
1015
|
-
tooltipPlacement?: 'auto' | 'top' | 'bottom' | 'left' | 'right' | undefined;
|
|
1016
|
-
/** Anchor the tooltip to the mark instead of the pointer; from `TooltipOptions.followPointer: false`. */
|
|
1017
|
-
tooltipAnchored?: boolean | undefined;
|
|
1018
|
-
/** Gradient definitions the shapes reference as `url(#id)`. */
|
|
1019
|
-
defs?: GradientDef[] | undefined;
|
|
1020
|
-
/** Data problems found while laying out, for `onDataIssue`. */
|
|
1021
|
-
issues?: ChartDataIssue[] | undefined;
|
|
1022
|
-
/** Header and rows of the accessible table, when `accessibleTable` is on. */
|
|
1023
|
-
table?: string[][] | undefined;
|
|
1024
|
-
/** How Gantt bars map to time, so a root can turn a drag into a task change. */
|
|
1025
|
-
edit?: EditModel | undefined;
|
|
1026
|
-
/** The map's projection state, so a root can pan and zoom it. */
|
|
1027
|
-
map?: MapModel | undefined;
|
|
1028
|
-
/** Width of a left legend column the marks still have to move right by; see `placeLegend`. */
|
|
1029
|
-
legendOffset?: number | undefined;
|
|
1030
|
-
}
|
|
1031
|
-
/** A linear gradient a shape's fill can reference as `url(#id)`. */
|
|
1032
|
-
interface GradientDef {
|
|
1033
|
-
id: string;
|
|
1034
|
-
/** Direction: top-to-bottom by default. */
|
|
1035
|
-
vertical?: boolean | undefined;
|
|
1036
|
-
stops: {
|
|
1037
|
-
offset: number;
|
|
1038
|
-
color: string;
|
|
1039
|
-
opacity?: number | undefined;
|
|
1040
|
-
}[];
|
|
1041
|
-
}
|
|
1042
|
-
/** What a root needs to drag Gantt bars: the time scale and where each editable bar sits. */
|
|
1043
|
-
interface EditModel {
|
|
1044
|
-
/** Pixel x of a time value. */
|
|
1045
|
-
scale: (value: number) => number;
|
|
1046
|
-
/** Time value of a pixel x. */
|
|
1047
|
-
invert: (x: number) => number;
|
|
1048
|
-
/** Editable bars by shape index: their task and pixel extent. */
|
|
1049
|
-
bars: {
|
|
1050
|
-
index: number;
|
|
1051
|
-
id: ChartItemId;
|
|
1052
|
-
name: string;
|
|
1053
|
-
start: number;
|
|
1054
|
-
end: number;
|
|
1055
|
-
x0: number;
|
|
1056
|
-
x1: number;
|
|
1057
|
-
y: number;
|
|
1058
|
-
height: number;
|
|
1059
|
-
}[];
|
|
1060
|
-
/** Round dragged times to this step (ms or units), when set. */
|
|
1061
|
-
snap?: number | undefined;
|
|
1062
|
-
}
|
|
1063
|
-
/** A dragged or resized task, as reported by `onTaskChange`. */
|
|
1064
|
-
interface TaskChange {
|
|
1065
|
-
id: ChartItemId;
|
|
1066
|
-
name: string;
|
|
1067
|
-
start: number;
|
|
1068
|
-
end: number;
|
|
1069
|
-
}
|
|
1070
|
-
/** The map's pan/zoom state and the bounds it was fitted to. */
|
|
1071
|
-
interface MapModel {
|
|
1072
|
-
view: {
|
|
1073
|
-
center: [number, number];
|
|
1074
|
-
zoom: number;
|
|
1075
|
-
};
|
|
1076
|
-
/** The projected bounds at zoom 1, in the projection's own units. */
|
|
1077
|
-
bounds: {
|
|
1078
|
-
minLon: number;
|
|
1079
|
-
maxLon: number;
|
|
1080
|
-
minLat: number;
|
|
1081
|
-
maxLat: number;
|
|
1082
|
-
};
|
|
1083
|
-
/** Plot area the map is drawn in. */
|
|
1084
|
-
plot: Box;
|
|
1085
|
-
/** Pixels per projected unit at the current zoom. */
|
|
1086
|
-
scale: number;
|
|
1087
|
-
/** Latitude to the projection's y unit, and back; identity for equirectangular. */
|
|
1088
|
-
toY: (latitude: number) => number;
|
|
1089
|
-
fromY: (y: number) => number;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
25
|
/** What `exportChart` produces and how. */
|
|
1093
26
|
type ChartExportOptions = {
|
|
1094
27
|
/** Accessible name written into the SVG. */
|
|
@@ -2161,6 +1094,11 @@ declare abstract class SkdxRootElement extends LitElement {
|
|
|
2161
1094
|
private readonly token;
|
|
2162
1095
|
private leave;
|
|
2163
1096
|
private joined;
|
|
1097
|
+
private snapshotKind;
|
|
1098
|
+
private snapshotConfiguration;
|
|
1099
|
+
private snapshotSvg;
|
|
1100
|
+
private removeSnapshot;
|
|
1101
|
+
protected updated(): void;
|
|
2164
1102
|
connectedCallback(): void;
|
|
2165
1103
|
disconnectedCallback(): void;
|
|
2166
1104
|
private focused;
|
|
@@ -2192,6 +1130,8 @@ declare abstract class SkdxRootElement extends LitElement {
|
|
|
2192
1130
|
selected: Selection | undefined;
|
|
2193
1131
|
view: MapView | undefined;
|
|
2194
1132
|
};
|
|
1133
|
+
/** Apply responsive overrides after every explicit chart-specific input. */
|
|
1134
|
+
protected compactOverrides(): Record<string, unknown> | undefined;
|
|
2195
1135
|
private emit;
|
|
2196
1136
|
private publish;
|
|
2197
1137
|
private join;
|
|
@@ -2225,7 +1165,7 @@ declare abstract class SkdxRootElement extends LitElement {
|
|
|
2225
1165
|
private onClick;
|
|
2226
1166
|
private onKeyDown;
|
|
2227
1167
|
/** The accessible `<svg>` root: the layout's shapes, then the hover or keyboard tooltip. */
|
|
2228
|
-
protected root(laidOut: Canvas, kind: string, label: string): TemplateResult;
|
|
1168
|
+
protected root(laidOut: Canvas, kind: string, label: string, configuration?: Record<string, unknown>): TemplateResult;
|
|
2229
1169
|
}
|
|
2230
1170
|
/** The cartesian charts (bar, line, area): series and categories plus axes, references, stacking, zoom. */
|
|
2231
1171
|
declare abstract class SkdxChartElement extends SkdxRootElement {
|
|
@@ -2292,7 +1232,7 @@ declare abstract class SkdxChartElement extends SkdxRootElement {
|
|
|
2292
1232
|
barGap: number | undefined;
|
|
2293
1233
|
barWidth: number | undefined;
|
|
2294
1234
|
sort: "asc" | "desc" | undefined;
|
|
2295
|
-
transform: "
|
|
1235
|
+
transform: "cumulative" | "histogram" | undefined;
|
|
2296
1236
|
transforms: SeriesTransform[] | undefined;
|
|
2297
1237
|
bins: number | undefined;
|
|
2298
1238
|
binWidth: number | undefined;
|
|
@@ -2334,4 +1274,4 @@ declare global {
|
|
|
2334
1274
|
}
|
|
2335
1275
|
}
|
|
2336
1276
|
|
|
2337
|
-
export {
|
|
1277
|
+
export { SkdxPieChart as A, SkdxPolarAreaChart as B, type ChartExportOptions as C, SkdxRadarChart as D, SkdxRadialBarChart as E, SkdxRangeChart as F, SkdxSankeyChart as G, SkdxScatterChart as H, SkdxSparkline as I, SkdxSunburstChart as J, SkdxSwarmPlot as K, SkdxTimelineChart as L, SkdxTreeChart as M, SkdxTreemap as N, SkdxWaffleChart as O, SkdxWaterfallChart as P, csv as Q, exportChart as R, type SelectionMode as S, seriesCsv as T, svgMarkup as U, type ChartInstanceExportOptions as a, SkdxAreaChart as b, SkdxBarChart as c, SkdxBoxplot as d, SkdxBubbleChart as e, SkdxBulletChart as f, SkdxBumpChart as g, SkdxCandlestickChart as h, SkdxChordChart as i, SkdxCirclePackingChart as j, SkdxComboChart as k, SkdxDumbbellChart as l, SkdxFunnelChart as m, SkdxGanttChart as n, SkdxGaugeChart as o, SkdxHeatmap as p, SkdxHistogram as q, SkdxIcicleChart as r, SkdxLineChart as s, SkdxLinearGauge as t, SkdxMapChart as u, SkdxMarimekkoChart as v, SkdxNetworkChart as w, SkdxOrganizationChart as x, SkdxParallelCoordinatesChart as y, SkdxParetoChart as z };
|