@skdx/web-components-charts 0.38.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.
Files changed (169) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +98 -0
  3. package/dist/area.cjs +109 -0
  4. package/dist/area.d.cts +2 -0
  5. package/dist/area.d.ts +2 -0
  6. package/dist/area.js +109 -0
  7. package/dist/bar.cjs +109 -0
  8. package/dist/bar.d.cts +2 -0
  9. package/dist/bar.d.ts +2 -0
  10. package/dist/bar.js +109 -0
  11. package/dist/boxplot.cjs +109 -0
  12. package/dist/boxplot.d.cts +2 -0
  13. package/dist/boxplot.d.ts +2 -0
  14. package/dist/boxplot.js +109 -0
  15. package/dist/bubble.cjs +109 -0
  16. package/dist/bubble.d.cts +2 -0
  17. package/dist/bubble.d.ts +2 -0
  18. package/dist/bubble.js +109 -0
  19. package/dist/bullet.cjs +109 -0
  20. package/dist/bullet.d.cts +2 -0
  21. package/dist/bullet.d.ts +2 -0
  22. package/dist/bullet.js +109 -0
  23. package/dist/bump.cjs +109 -0
  24. package/dist/bump.d.cts +2 -0
  25. package/dist/bump.d.ts +2 -0
  26. package/dist/bump.js +109 -0
  27. package/dist/candlestick.cjs +109 -0
  28. package/dist/candlestick.d.cts +2 -0
  29. package/dist/candlestick.d.ts +2 -0
  30. package/dist/candlestick.js +109 -0
  31. package/dist/chord.cjs +109 -0
  32. package/dist/chord.d.cts +2 -0
  33. package/dist/chord.d.ts +2 -0
  34. package/dist/chord.js +109 -0
  35. package/dist/circle-packing.cjs +109 -0
  36. package/dist/circle-packing.d.cts +2 -0
  37. package/dist/circle-packing.d.ts +2 -0
  38. package/dist/circle-packing.js +109 -0
  39. package/dist/combo.cjs +109 -0
  40. package/dist/combo.d.cts +2 -0
  41. package/dist/combo.d.ts +2 -0
  42. package/dist/combo.js +109 -0
  43. package/dist/dumbbell.cjs +109 -0
  44. package/dist/dumbbell.d.cts +2 -0
  45. package/dist/dumbbell.d.ts +2 -0
  46. package/dist/dumbbell.js +109 -0
  47. package/dist/funnel.cjs +109 -0
  48. package/dist/funnel.d.cts +2 -0
  49. package/dist/funnel.d.ts +2 -0
  50. package/dist/funnel.js +109 -0
  51. package/dist/gantt.cjs +109 -0
  52. package/dist/gantt.d.cts +2 -0
  53. package/dist/gantt.d.ts +2 -0
  54. package/dist/gantt.js +109 -0
  55. package/dist/gauge.cjs +109 -0
  56. package/dist/gauge.d.cts +2 -0
  57. package/dist/gauge.d.ts +2 -0
  58. package/dist/gauge.js +109 -0
  59. package/dist/heatmap.cjs +109 -0
  60. package/dist/heatmap.d.cts +2 -0
  61. package/dist/heatmap.d.ts +2 -0
  62. package/dist/heatmap.js +109 -0
  63. package/dist/histogram.cjs +109 -0
  64. package/dist/histogram.d.cts +2 -0
  65. package/dist/histogram.d.ts +2 -0
  66. package/dist/histogram.js +109 -0
  67. package/dist/icicle.cjs +109 -0
  68. package/dist/icicle.d.cts +2 -0
  69. package/dist/icicle.d.ts +2 -0
  70. package/dist/icicle.js +109 -0
  71. package/dist/index-oF5ss8v9.d.cts +2331 -0
  72. package/dist/index-oF5ss8v9.d.ts +2331 -0
  73. package/dist/index.cjs +109 -0
  74. package/dist/index.d.cts +29 -0
  75. package/dist/index.d.ts +29 -0
  76. package/dist/index.js +109 -0
  77. package/dist/line.cjs +109 -0
  78. package/dist/line.d.cts +2 -0
  79. package/dist/line.d.ts +2 -0
  80. package/dist/line.js +109 -0
  81. package/dist/linear-gauge.cjs +109 -0
  82. package/dist/linear-gauge.d.cts +2 -0
  83. package/dist/linear-gauge.d.ts +2 -0
  84. package/dist/linear-gauge.js +109 -0
  85. package/dist/map.cjs +109 -0
  86. package/dist/map.d.cts +2 -0
  87. package/dist/map.d.ts +2 -0
  88. package/dist/map.js +109 -0
  89. package/dist/marimekko.cjs +109 -0
  90. package/dist/marimekko.d.cts +2 -0
  91. package/dist/marimekko.d.ts +2 -0
  92. package/dist/marimekko.js +109 -0
  93. package/dist/network.cjs +109 -0
  94. package/dist/network.d.cts +2 -0
  95. package/dist/network.d.ts +2 -0
  96. package/dist/network.js +109 -0
  97. package/dist/organization.cjs +109 -0
  98. package/dist/organization.d.cts +2 -0
  99. package/dist/organization.d.ts +2 -0
  100. package/dist/organization.js +109 -0
  101. package/dist/parallel.cjs +109 -0
  102. package/dist/parallel.d.cts +2 -0
  103. package/dist/parallel.d.ts +2 -0
  104. package/dist/parallel.js +109 -0
  105. package/dist/pareto.cjs +109 -0
  106. package/dist/pareto.d.cts +2 -0
  107. package/dist/pareto.d.ts +2 -0
  108. package/dist/pareto.js +109 -0
  109. package/dist/pie.cjs +109 -0
  110. package/dist/pie.d.cts +2 -0
  111. package/dist/pie.d.ts +2 -0
  112. package/dist/pie.js +109 -0
  113. package/dist/polar-area.cjs +109 -0
  114. package/dist/polar-area.d.cts +2 -0
  115. package/dist/polar-area.d.ts +2 -0
  116. package/dist/polar-area.js +109 -0
  117. package/dist/radar.cjs +109 -0
  118. package/dist/radar.d.cts +2 -0
  119. package/dist/radar.d.ts +2 -0
  120. package/dist/radar.js +109 -0
  121. package/dist/radial.cjs +109 -0
  122. package/dist/radial.d.cts +2 -0
  123. package/dist/radial.d.ts +2 -0
  124. package/dist/radial.js +109 -0
  125. package/dist/range.cjs +109 -0
  126. package/dist/range.d.cts +2 -0
  127. package/dist/range.d.ts +2 -0
  128. package/dist/range.js +109 -0
  129. package/dist/sankey.cjs +109 -0
  130. package/dist/sankey.d.cts +2 -0
  131. package/dist/sankey.d.ts +2 -0
  132. package/dist/sankey.js +109 -0
  133. package/dist/scatter.cjs +109 -0
  134. package/dist/scatter.d.cts +2 -0
  135. package/dist/scatter.d.ts +2 -0
  136. package/dist/scatter.js +109 -0
  137. package/dist/sparkline.cjs +109 -0
  138. package/dist/sparkline.d.cts +2 -0
  139. package/dist/sparkline.d.ts +2 -0
  140. package/dist/sparkline.js +109 -0
  141. package/dist/sunburst.cjs +109 -0
  142. package/dist/sunburst.d.cts +2 -0
  143. package/dist/sunburst.d.ts +2 -0
  144. package/dist/sunburst.js +109 -0
  145. package/dist/swarm.cjs +109 -0
  146. package/dist/swarm.d.cts +2 -0
  147. package/dist/swarm.d.ts +2 -0
  148. package/dist/swarm.js +109 -0
  149. package/dist/timeline.cjs +109 -0
  150. package/dist/timeline.d.cts +2 -0
  151. package/dist/timeline.d.ts +2 -0
  152. package/dist/timeline.js +109 -0
  153. package/dist/tree.cjs +109 -0
  154. package/dist/tree.d.cts +2 -0
  155. package/dist/tree.d.ts +2 -0
  156. package/dist/tree.js +109 -0
  157. package/dist/treemap.cjs +109 -0
  158. package/dist/treemap.d.cts +2 -0
  159. package/dist/treemap.d.ts +2 -0
  160. package/dist/treemap.js +109 -0
  161. package/dist/waffle.cjs +109 -0
  162. package/dist/waffle.d.cts +2 -0
  163. package/dist/waffle.d.ts +2 -0
  164. package/dist/waffle.js +109 -0
  165. package/dist/waterfall.cjs +109 -0
  166. package/dist/waterfall.d.cts +2 -0
  167. package/dist/waterfall.d.ts +2 -0
  168. package/dist/waterfall.js +109 -0
  169. package/package.json +76 -0
@@ -0,0 +1,2331 @@
1
+ import * as lit from 'lit';
2
+ import { LitElement, TemplateResult } from 'lit';
3
+
4
+ /** Grouped, stacked, horizontal or histogram bars; series may also be lines, areas or ranges. */
5
+ declare class SkdxBarChart extends SkdxChartElement {
6
+ protected render(): lit.TemplateResult;
7
+ }
8
+ declare global {
9
+ interface HTMLElementTagNameMap {
10
+ 'skdx-bar-chart': SkdxBarChart;
11
+ }
12
+ }
13
+
14
+ /** One polyline per series with a dot per value; series may also be bars, areas or ranges. */
15
+ declare class SkdxLineChart extends SkdxChartElement {
16
+ protected render(): lit.TemplateResult;
17
+ }
18
+ declare global {
19
+ interface HTMLElementTagNameMap {
20
+ 'skdx-line-chart': SkdxLineChart;
21
+ }
22
+ }
23
+
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
+ /** What `exportChart` produces and how. */
1093
+ type ChartExportOptions = {
1094
+ /** Accessible name written into the SVG. */
1095
+ label: string;
1096
+ /** Maps `var(--skdx-…)` to concrete colors, e.g. from `getComputedStyle`. Required for PNG. */
1097
+ resolve?: ((cssVariable: string) => string) | undefined;
1098
+ } & ({
1099
+ type: 'svg';
1100
+ } | {
1101
+ type: 'png';
1102
+ /** Device pixels per unit. @default 2 */
1103
+ scale?: number | undefined;
1104
+ /** Fill behind the chart, e.g. the page surface; transparent by default. */
1105
+ background?: string | undefined;
1106
+ } | {
1107
+ type: 'csv';
1108
+ rows: (string | number | null | undefined)[][];
1109
+ });
1110
+ /**
1111
+ * One entry point for the export formats: SVG markup, a PNG blob (browser only), or CSV of the
1112
+ * rows given. Rejects when a PNG is asked for outside a browser.
1113
+ */
1114
+ declare function exportChart(layout: Canvas, options: ChartExportOptions): Promise<string | Blob>;
1115
+ /**
1116
+ * A standalone SVG document of a layout, for download or server rendering. Colors stay as
1117
+ * `var(--skdx-…)` references unless `resolve` maps them to concrete values, e.g. from
1118
+ * `getComputedStyle(document.documentElement).getPropertyValue(name)`.
1119
+ */
1120
+ declare function svgMarkup(layout: Canvas, label: string, resolve?: (cssVariable: string) => string): string;
1121
+ /** RFC 4180 CSV of rows, for "download data" and clipboard copy. */
1122
+ declare function csv(rows: (string | number | null | undefined)[][]): string;
1123
+ /** Series and categories as CSV rows: a header of series names, one row per category. */
1124
+ declare function seriesCsv(series: {
1125
+ name: string;
1126
+ data: (number | null)[];
1127
+ }[], categories?: (string | number | Date)[]): string;
1128
+
1129
+ /** A pie, a donut when `innerRadius` is set, or a half circle with `startAngle`/`endAngle`; one slice per datum. */
1130
+ declare class SkdxPieChart extends SkdxRootElement {
1131
+ data: Datum[];
1132
+ /** A donut is a pie with innerRadius 0.6 unless set. */
1133
+ variant: 'pie' | 'donut' | undefined;
1134
+ /** Hole radius as a fraction of the outer radius: 0 is a pie, 0.6 a donut. */
1135
+ innerRadius: number | undefined;
1136
+ /** Outer radius as a fraction of the space available. */
1137
+ outerRadius: number | undefined;
1138
+ /** Write each slice's name and share on the slice. */
1139
+ labels: boolean;
1140
+ /** Inside the slice, or outside with a connector. */
1141
+ labelPosition: 'inside' | 'outside' | undefined;
1142
+ /** Gap between slices, in degrees. */
1143
+ padAngle: number | undefined;
1144
+ /** Order slices by value. */
1145
+ sort: 'asc' | 'desc' | undefined;
1146
+ /** Degrees clockwise from 12 o'clock where the first slice starts. */
1147
+ startAngle: number | undefined;
1148
+ /** Degrees where the last slice ends; -90/90 makes a half circle. */
1149
+ endAngle: number | undefined;
1150
+ /** Text in the middle of a donut. */
1151
+ centerLabel: string | undefined;
1152
+ protected render(): lit.TemplateResult;
1153
+ }
1154
+ declare global {
1155
+ interface HTMLElementTagNameMap {
1156
+ 'skdx-pie-chart': SkdxPieChart;
1157
+ }
1158
+ }
1159
+
1160
+ /** One dot per `[x, y]` pair, or a bubble per `[x, y, size]` triple, on two linear axes. */
1161
+ declare class SkdxScatterChart extends SkdxRootElement {
1162
+ series: ScatterSeries[];
1163
+ /** Bubble radius range in pixels. */
1164
+ sizeRange: [number, number] | undefined;
1165
+ /** Write each point's label next to it. */
1166
+ labels: boolean;
1167
+ xAxis: AxisOptions | undefined;
1168
+ yAxis: AxisOptions | undefined;
1169
+ references: Reference[] | undefined;
1170
+ annotations: Annotation[] | undefined;
1171
+ /** Colors points by their `value`. */
1172
+ colorScale: ColorScale | undefined;
1173
+ /** Draw the color scale under the plot; an object sets orientation and title. */
1174
+ colorLegend: boolean | ColorLegendOptions | undefined;
1175
+ /** Extra invisible hover radius in pixels. */
1176
+ hitRadius: number | undefined;
1177
+ /** Ring offset in pixels for overlapping points. */
1178
+ jitter: number | undefined;
1179
+ /** Least-squares fit per series; true is linear. */
1180
+ trendline: boolean | 'linear' | 'exponential' | 'logarithmic' | 'power' | 'polynomial' | undefined;
1181
+ /** Systematic sampling above this many points. */
1182
+ sampling: 'none' | 'auto' | {
1183
+ threshold: number;
1184
+ } | undefined;
1185
+ protected render(): lit.TemplateResult;
1186
+ }
1187
+ declare global {
1188
+ interface HTMLElementTagNameMap {
1189
+ 'skdx-scatter-chart': SkdxScatterChart;
1190
+ }
1191
+ }
1192
+
1193
+ /** A small axis-less trend: an area, a bare line or bars, with optional extremes and last value. */
1194
+ declare class SkdxSparkline extends SkdxRootElement {
1195
+ data: Value[];
1196
+ color: string | undefined;
1197
+ curve: Curve | undefined;
1198
+ variant: 'area' | 'line' | 'bar' | 'winloss' | undefined;
1199
+ /** Color by direction: success when rising, danger when falling. */
1200
+ trend: boolean;
1201
+ /** Mark the minimum and maximum. */
1202
+ extremes: boolean;
1203
+ /** Write the last value after the line. */
1204
+ lastValue: boolean;
1205
+ /** A dashed reference line at this value. */
1206
+ target: number | undefined;
1207
+ /** A shaded band between two values. */
1208
+ band: [number, number] | undefined;
1209
+ /** Dots on the first and/or last point. */
1210
+ markers: ('first' | 'last')[] | undefined;
1211
+ protected render(): lit.TemplateResult;
1212
+ }
1213
+ declare global {
1214
+ interface HTMLElementTagNameMap {
1215
+ 'skdx-sparkline': SkdxSparkline;
1216
+ }
1217
+ }
1218
+
1219
+ /** One polygon per series over a spoke per category. */
1220
+ declare class SkdxRadarChart extends SkdxRootElement {
1221
+ series: Series[];
1222
+ /** One axis per category. */
1223
+ categories: string[] | undefined;
1224
+ /** Axes with their own min/max scales. */
1225
+ metrics: RadarMetric[] | undefined;
1226
+ /** `metric` scales each axis by its own bounds; `series` (or `true`) scales each series to its own maximum; `none` shares one scale. */
1227
+ normalized: boolean | 'metric' | 'series' | 'none' | undefined;
1228
+ /** Outer ring value. */
1229
+ max: number | undefined;
1230
+ /** Fill the polygons. */
1231
+ fill: boolean;
1232
+ /** Number of grid rings. */
1233
+ levels: number | undefined;
1234
+ /** Dots on the vertices. */
1235
+ markers: boolean;
1236
+ /** Marker radius in pixels. */
1237
+ markerSize: number | undefined;
1238
+ /** Write each value at its vertex. */
1239
+ labels: boolean;
1240
+ /** Degrees clockwise from 12 o'clock of the first axis. */
1241
+ startAngle: number | undefined;
1242
+ /** Grid rings as polygons or circles. */
1243
+ gridShape: 'polygon' | 'circle' | undefined;
1244
+ protected render(): lit.TemplateResult;
1245
+ }
1246
+ declare global {
1247
+ interface HTMLElementTagNameMap {
1248
+ 'skdx-radar-chart': SkdxRadarChart;
1249
+ }
1250
+ }
1251
+
1252
+ /** A grid of cells whose opacity follows the value; `calendar` lays days out as weekday rows and week columns. */
1253
+ declare class SkdxHeatmap extends SkdxRootElement {
1254
+ rows: string[] | undefined;
1255
+ columns: string[] | undefined;
1256
+ /** `data[row][column]`. */
1257
+ data: Value[][] | undefined;
1258
+ /** One value per day, instead of rows/columns/data. */
1259
+ calendar: CalendarCell[] | undefined;
1260
+ color: string | undefined;
1261
+ /** Split around zero: negatives use `negativeColor`. */
1262
+ diverging: boolean;
1263
+ negativeColor: string | undefined;
1264
+ /** Write each value in its cell. */
1265
+ labels: boolean;
1266
+ /** Value range the opacity ramp covers. */
1267
+ domain: [number, number] | undefined;
1268
+ /** Quantize the color ramp into this many steps. */
1269
+ steps: number | undefined;
1270
+ /** First day of the calendar week. */
1271
+ weekStart: 'monday' | 'sunday' | undefined;
1272
+ /** A full color scale; wins over color/diverging/steps/domain. */
1273
+ colorScale: ColorScale | undefined;
1274
+ /** Draw the color scale under the grid; an object sets orientation and title. */
1275
+ colorLegend: boolean | ColorLegendOptions | undefined;
1276
+ /** Fill for null cells. */
1277
+ missingColor: string | undefined;
1278
+ /** Gap between cells in pixels. */
1279
+ cellGap: number | undefined;
1280
+ /** Cell corner radius in pixels. */
1281
+ cellRadius: number | undefined;
1282
+ /** Order rows by their sum. */
1283
+ rowOrder: 'asc' | 'desc' | undefined;
1284
+ /** Order columns by their sum. */
1285
+ columnOrder: 'asc' | 'desc' | undefined;
1286
+ protected render(): lit.TemplateResult;
1287
+ }
1288
+ declare global {
1289
+ interface HTMLElementTagNameMap {
1290
+ 'skdx-heatmap': SkdxHeatmap;
1291
+ }
1292
+ }
1293
+
1294
+ /** Stages narrowing with their value, or a pyramid; vertical or horizontal. */
1295
+ declare class SkdxFunnelChart extends SkdxRootElement {
1296
+ data: Datum[];
1297
+ orientation: 'vertical' | 'horizontal' | undefined;
1298
+ variant: 'funnel' | 'pyramid' | undefined;
1299
+ /** Gap between stages in pixels. */
1300
+ gap: number | undefined;
1301
+ /** Stage labels inside, beside, or hidden. */
1302
+ labelPosition: 'inside' | 'outside' | 'none' | undefined;
1303
+ /** Order stages by value. */
1304
+ sort: 'asc' | 'desc' | undefined;
1305
+ protected render(): lit.TemplateResult;
1306
+ }
1307
+ declare global {
1308
+ interface HTMLElementTagNameMap {
1309
+ 'skdx-funnel-chart': SkdxFunnelChart;
1310
+ }
1311
+ }
1312
+
1313
+ /** Flows between nodes, node heights and ribbon widths by value. */
1314
+ declare class SkdxSankeyChart extends SkdxRootElement {
1315
+ links: SankeyLink[];
1316
+ /** Explicit nodes with labels and colors. */
1317
+ nodes: SankeyNode[] | undefined;
1318
+ /** justify pushes sinks to the last column. */
1319
+ align: 'left' | 'justify' | undefined;
1320
+ /** Node thickness in pixels. */
1321
+ nodeWidth: number | undefined;
1322
+ /** Vertical gap between nodes in a column. */
1323
+ nodePadding: number | undefined;
1324
+ /** Order nodes inside a column by value. */
1325
+ nodeSort: 'asc' | 'desc' | undefined;
1326
+ /** Order the ribbons leaving a node by value. */
1327
+ linkSort: 'asc' | 'desc' | undefined;
1328
+ /** Write node names. */
1329
+ nodeLabels: boolean;
1330
+ /** Write each link's value on it. */
1331
+ linkLabels: boolean;
1332
+ /** What to do with links that close a cycle. */
1333
+ cyclePolicy: 'drop' | 'warn' | 'error' | undefined;
1334
+ protected render(): lit.TemplateResult;
1335
+ }
1336
+ declare global {
1337
+ interface HTMLElementTagNameMap {
1338
+ 'skdx-sankey-chart': SkdxSankeyChart;
1339
+ }
1340
+ }
1341
+
1342
+ /** Squarified tiles by value; branches are outlined and their children tiled inside. */
1343
+ declare class SkdxTreemap extends SkdxRootElement {
1344
+ data: TreeNode[];
1345
+ /** Id (or name) of the node shown as the whole chart: controlled drill-down. */
1346
+ rootId: ChartItemId | undefined;
1347
+ /** Write the path to `rootId` above the tiles. */
1348
+ breadcrumbs: boolean;
1349
+ /** Deepest level tiled. */
1350
+ maxDepth: number | undefined;
1351
+ /** Tile order inside a branch. */
1352
+ sort: 'asc' | 'desc' | 'none' | undefined;
1353
+ /** Inset of children inside their branch, in pixels. */
1354
+ padding: number | undefined;
1355
+ /** Tiling algorithm. */
1356
+ tiling: 'squarify' | 'slice' | 'dice' | 'sliceDice' | undefined;
1357
+ /** Colors leaves by their value. */
1358
+ colorScale: ColorScale | undefined;
1359
+ /** Write leaf names on tiles wide enough. */
1360
+ labels: boolean;
1361
+ protected render(): lit.TemplateResult;
1362
+ }
1363
+ declare global {
1364
+ interface HTMLElementTagNameMap {
1365
+ 'skdx-treemap': SkdxTreemap;
1366
+ }
1367
+ }
1368
+
1369
+ /** Candles or OHLC bars on a time axis, with an optional volume pane, references, zoom and brush. */
1370
+ declare class SkdxCandlestickChart extends SkdxRootElement {
1371
+ data: Candle[];
1372
+ scale: 'linear' | 'log' | undefined;
1373
+ variant: 'candlestick' | 'ohlc' | undefined;
1374
+ xAxis: Pick<AxisOptions, 'format'> | undefined;
1375
+ references: Reference[] | undefined;
1376
+ annotations: Annotation[] | undefined;
1377
+ /** Moving-average lines over the candles. */
1378
+ overlays: CandlestickOverlay[] | undefined;
1379
+ upColor: string | undefined;
1380
+ downColor: string | undefined;
1381
+ brush: boolean;
1382
+ crosshair: boolean;
1383
+ protected render(): lit.TemplateResult;
1384
+ }
1385
+ declare global {
1386
+ interface HTMLElementTagNameMap {
1387
+ 'skdx-candlestick-chart': SkdxCandlestickChart;
1388
+ }
1389
+ }
1390
+
1391
+ /** Signed deltas stacked on the running total, with an optional closing total bar. */
1392
+ declare class SkdxWaterfallChart extends SkdxRootElement {
1393
+ /** Signed deltas; `subtotal` rows show the running total. */
1394
+ data: WaterfallDatum[];
1395
+ /** Label of a final bar showing the running total. */
1396
+ total: string | undefined;
1397
+ /** Opening value the first delta applies to. */
1398
+ start: number | undefined;
1399
+ /** Label of the opening bar. */
1400
+ startLabel: string | undefined;
1401
+ orientation: 'vertical' | 'horizontal' | undefined;
1402
+ /** Dashed lines carrying the running total between bars. */
1403
+ connectors: boolean;
1404
+ /** Write each delta next to its bar. */
1405
+ labels: boolean;
1406
+ positiveColor: string | undefined;
1407
+ negativeColor: string | undefined;
1408
+ /** Color of subtotal and total bars. */
1409
+ totalColor: string | undefined;
1410
+ protected render(): lit.TemplateResult;
1411
+ }
1412
+ declare global {
1413
+ interface HTMLElementTagNameMap {
1414
+ 'skdx-waterfall-chart': SkdxWaterfallChart;
1415
+ }
1416
+ }
1417
+
1418
+ /** Intervals on a numeric time axis, one row per task or per `group`. */
1419
+ declare class SkdxGanttChart extends SkdxRootElement {
1420
+ tasks: GanttTask[];
1421
+ /** Vertical lines and bands in time coordinates, e.g. today. */
1422
+ references: Reference[] | undefined;
1423
+ annotations: Annotation[] | undefined;
1424
+ /** A labelled "Today" line at this time. */
1425
+ today: number | Date | undefined;
1426
+ /** Highlight the longest dependency chain. */
1427
+ criticalPath: boolean;
1428
+ /** How task times are written. */
1429
+ xAxis: Pick<AxisOptions, 'format' | 'label' | 'ticks'> | undefined;
1430
+ protected render(): lit.TemplateResult;
1431
+ }
1432
+ declare global {
1433
+ interface HTMLElementTagNameMap {
1434
+ 'skdx-gantt-chart': SkdxGanttChart;
1435
+ }
1436
+ }
1437
+
1438
+ /** One Tukey box per series over its raw samples. */
1439
+ declare class SkdxBoxplot extends SkdxRootElement {
1440
+ /** Raw samples, or precomputed summaries. */
1441
+ series: BoxplotSeries[];
1442
+ orientation: 'vertical' | 'horizontal' | undefined;
1443
+ /** How quartiles are taken from a sample. */
1444
+ quartileMethod: 'linear' | 'exclusive' | 'tukey' | undefined;
1445
+ /** Whisker reach as a multiple of the IQR. */
1446
+ whisker: number | undefined;
1447
+ /** Mark the mean with a diamond. */
1448
+ mean: boolean;
1449
+ /** Draw every observation, jittered. */
1450
+ points: boolean;
1451
+ /** Notch the box around the median. */
1452
+ notched: boolean;
1453
+ /** Groups: one box per series inside each category. */
1454
+ categories: string[] | undefined;
1455
+ yAxis: AxisOptions | undefined;
1456
+ protected render(): lit.TemplateResult;
1457
+ }
1458
+ declare global {
1459
+ interface HTMLElementTagNameMap {
1460
+ 'skdx-boxplot': SkdxBoxplot;
1461
+ }
1462
+ }
1463
+
1464
+ /** Nested rings, one per tree depth, children inside their parent's span. */
1465
+ declare class SkdxSunburstChart extends SkdxRootElement {
1466
+ data: TreeNode[];
1467
+ /** Hole radius as a fraction of the outer radius. */
1468
+ innerRadius: number | undefined;
1469
+ /** Text in the middle, e.g. the total. */
1470
+ centerLabel: string | undefined;
1471
+ /** Write names on the arcs wide enough to hold them. */
1472
+ labels: boolean;
1473
+ /** Id (or name) of the node whose subtree fills the rings. */
1474
+ rootId: ChartItemId | undefined;
1475
+ /** Write the path to `rootId` in the middle. */
1476
+ breadcrumbs: boolean;
1477
+ /** Deepest ring drawn. */
1478
+ maxDepth: number | undefined;
1479
+ /** Arc order inside a parent. */
1480
+ sort: 'asc' | 'desc' | 'none' | undefined;
1481
+ /** Degrees clockwise from 12 o'clock. */
1482
+ startAngle: number | undefined;
1483
+ endAngle: number | undefined;
1484
+ /** Gap between sibling arcs, in degrees. */
1485
+ padAngle: number | undefined;
1486
+ /** Colors arcs by their value. */
1487
+ colorScale: ColorScale | undefined;
1488
+ protected render(): lit.TemplateResult;
1489
+ }
1490
+ declare global {
1491
+ interface HTMLElementTagNameMap {
1492
+ 'skdx-sunburst-chart': SkdxSunburstChart;
1493
+ }
1494
+ }
1495
+
1496
+ /** Groups around a circle with ribbons for the flows between them. */
1497
+ declare class SkdxChordChart extends SkdxRootElement {
1498
+ /** Group names in order; required with `matrix`. */
1499
+ names: string[] | undefined;
1500
+ /** `matrix[i][j]` is the flow from `i` to `j`. */
1501
+ matrix: number[][] | undefined;
1502
+ /** Edge-list form of the matrix. */
1503
+ links: ChordLink[] | undefined;
1504
+ /** Angular gap between groups, in degrees. */
1505
+ padding: number | undefined;
1506
+ /** Order groups by their total flow. */
1507
+ sort: 'asc' | 'desc' | undefined;
1508
+ protected render(): lit.TemplateResult;
1509
+ }
1510
+ declare global {
1511
+ interface HTMLElementTagNameMap {
1512
+ 'skdx-chord-chart': SkdxChordChart;
1513
+ }
1514
+ }
1515
+
1516
+ /** A choropleth of GeoJSON regions, opacity by value. */
1517
+ declare class SkdxMapChart extends SkdxRootElement {
1518
+ features: MapFeature[];
1519
+ /** The region color; each region's opacity follows its value. */
1520
+ color: string | undefined;
1521
+ /** A full color scale for the regions. */
1522
+ colorScale: ColorScale | undefined;
1523
+ /** Draw the color scale under the map; an object sets orientation and title. */
1524
+ colorLegend: boolean | ColorLegendOptions | undefined;
1525
+ projection: 'equirectangular' | 'mercator' | undefined;
1526
+ /** A marker layer; markers with a value are sized by it. */
1527
+ points: MapPoint[] | undefined;
1528
+ /** A line layer: routes and connections. */
1529
+ lines: MapLine[] | undefined;
1530
+ /** Marker radius range in pixels. */
1531
+ sizeRange: [number, number] | undefined;
1532
+ /** Write each region's name at its centre. */
1533
+ labels: boolean;
1534
+ protected render(): lit.TemplateResult;
1535
+ }
1536
+ declare global {
1537
+ interface HTMLElementTagNameMap {
1538
+ 'skdx-map-chart': SkdxMapChart;
1539
+ }
1540
+ }
1541
+
1542
+ /** Concentric arcs, one per datum, each a share of `max`: KPI completion, utilization, quota, health. */
1543
+ declare class SkdxRadialBarChart extends SkdxRootElement {
1544
+ data: Datum[];
1545
+ /** The value a full arc represents. */
1546
+ max: number | undefined;
1547
+ /** Degrees clockwise from 12 o'clock. */
1548
+ startAngle: number | undefined;
1549
+ endAngle: number | undefined;
1550
+ /** Hole radius as a fraction of the outer radius. */
1551
+ innerRadius: number | undefined;
1552
+ /** Gap between arcs as a fraction of one arc's thickness. */
1553
+ gap: number | undefined;
1554
+ /** Draw the full-range track behind each arc. */
1555
+ track: boolean;
1556
+ /** Round the arc ends. */
1557
+ rounded: boolean;
1558
+ /** Write each name and value at the arc start. */
1559
+ labels: boolean;
1560
+ /** Threshold sectors outside the arcs, in value units. */
1561
+ bands: RadialBand[] | undefined;
1562
+ /** A tick across every arc at this value. */
1563
+ target: number | undefined;
1564
+ /** Text in the middle, e.g. the headline value. */
1565
+ centerLabel: string | undefined;
1566
+ protected render(): lit.TemplateResult;
1567
+ }
1568
+ declare global {
1569
+ interface HTMLElementTagNameMap {
1570
+ 'skdx-radial-bar-chart': SkdxRadialBarChart;
1571
+ }
1572
+ }
1573
+
1574
+ /** One reading on an arc scale: a needle over threshold bands (`radial`), or the arc filled up to the value (`solid`). */
1575
+ declare class SkdxGaugeChart extends SkdxRootElement {
1576
+ /** The reading; values outside min–max are clamped. */
1577
+ value: number;
1578
+ /** Scale start. Defaults to 0. */
1579
+ min: number | undefined;
1580
+ /** Scale end. Defaults to 100. */
1581
+ max: number | undefined;
1582
+ variant: 'radial' | 'solid' | undefined;
1583
+ /** Degrees clockwise from 12 o'clock; -90/90 is a semi-circle. */
1584
+ startAngle: number | undefined;
1585
+ endAngle: number | undefined;
1586
+ /** Arc thickness as a fraction of the radius. */
1587
+ thickness: number | undefined;
1588
+ /** Threshold sectors in value units. */
1589
+ bands: Band[] | undefined;
1590
+ /** A marker at this value. */
1591
+ target: number | undefined;
1592
+ /** Tick count including both ends; false or 0 for none, true for 5. Defaults to 5. */
1593
+ ticks: number | boolean | undefined;
1594
+ /** Write the tick values. */
1595
+ tickLabels: boolean;
1596
+ /** Text in the middle; defaults to the formatted value. */
1597
+ centerLabel: string | undefined;
1598
+ /** Smaller text under the value, e.g. the metric name. */
1599
+ caption: string | undefined;
1600
+ protected render(): lit.TemplateResult;
1601
+ }
1602
+ declare global {
1603
+ interface HTMLElementTagNameMap {
1604
+ 'skdx-gauge-chart': SkdxGaugeChart;
1605
+ }
1606
+ }
1607
+
1608
+ /** Three quantities per mark: x, y and a magnitude the bubble's area follows. */
1609
+ declare class SkdxBubbleChart extends SkdxRootElement {
1610
+ series: BubbleSeries[];
1611
+ /** Smallest and largest bubble radius in pixels. */
1612
+ sizeRange: [number, number] | undefined;
1613
+ /** Write each bubble's label on it. */
1614
+ labels: boolean;
1615
+ xAxis: AxisOptions | undefined;
1616
+ yAxis: AxisOptions | undefined;
1617
+ /** How the magnitude is named and written. */
1618
+ zAxis: Pick<AxisOptions, 'format' | 'label'> | undefined;
1619
+ references: Reference[] | undefined;
1620
+ annotations: Annotation[] | undefined;
1621
+ /** Colors bubbles by their `value` (or `z`). */
1622
+ colorScale: ColorScale | undefined;
1623
+ /** Draw the color scale under the plot; an object sets orientation and title. */
1624
+ colorLegend: boolean | ColorLegendOptions | undefined;
1625
+ /** Extra invisible hover radius in pixels. */
1626
+ hitRadius: number | undefined;
1627
+ /** Ring offset in pixels for overlapping points. */
1628
+ jitter: number | undefined;
1629
+ /** Least-squares fit per series; true is linear. */
1630
+ trendline: boolean | 'linear' | 'exponential' | 'logarithmic' | 'power' | 'polynomial' | undefined;
1631
+ /** Systematic sampling above this many points. */
1632
+ sampling: 'none' | 'auto' | {
1633
+ threshold: number;
1634
+ } | undefined;
1635
+ protected render(): lit.TemplateResult;
1636
+ }
1637
+ declare global {
1638
+ interface HTMLElementTagNameMap {
1639
+ 'skdx-bubble-chart': SkdxBubbleChart;
1640
+ }
1641
+ }
1642
+
1643
+ /** The distribution of a raw sample in equal-width or explicit bins, as counts, density or shares. */
1644
+ declare class SkdxHistogram extends SkdxRootElement {
1645
+ /** The raw sample. */
1646
+ data: Value[];
1647
+ /** Series name in tooltips and the legend. */
1648
+ name: string | undefined;
1649
+ color: string | undefined;
1650
+ /** Bin count; defaults to Sturges' rule. */
1651
+ bins: number | undefined;
1652
+ /** Bin width; wins over bins. */
1653
+ binWidth: number | undefined;
1654
+ /** Explicit ascending bin edges. */
1655
+ thresholds: number[] | undefined;
1656
+ /** Value range binned; samples outside are dropped. */
1657
+ domain: [number, number] | undefined;
1658
+ mode: 'count' | 'density' | 'percent' | undefined;
1659
+ xAxis: Pick<AxisOptions, 'format' | 'label'> | undefined;
1660
+ yAxis: AxisOptions | undefined;
1661
+ references: Reference[] | undefined;
1662
+ annotations: Annotation[] | undefined;
1663
+ /** Write each bin's value above its bar. */
1664
+ labels: boolean;
1665
+ /** Share of each bin slot left empty. */
1666
+ barGap: number | undefined;
1667
+ protected render(): lit.TemplateResult;
1668
+ }
1669
+ declare global {
1670
+ interface HTMLElementTagNameMap {
1671
+ 'skdx-histogram': SkdxHistogram;
1672
+ }
1673
+ }
1674
+
1675
+ /** A measure against a target over qualitative ranges, one row (or column) per KPI. */
1676
+ declare class SkdxBulletChart extends SkdxRootElement {
1677
+ data: BulletDatum[];
1678
+ orientation: 'horizontal' | 'vertical' | undefined;
1679
+ /** Qualitative ranges shared by every datum without its own. */
1680
+ ranges: (number | Band)[] | undefined;
1681
+ /** Scale start. */
1682
+ min: number | undefined;
1683
+ /** Scale end. */
1684
+ max: number | undefined;
1685
+ /** Write each value after its bar. */
1686
+ labels: boolean;
1687
+ /** Approximate tick count of the value axis. */
1688
+ ticks: number | undefined;
1689
+ protected render(): lit.TemplateResult;
1690
+ }
1691
+ declare global {
1692
+ interface HTMLElementTagNameMap {
1693
+ 'skdx-bullet-chart': SkdxBulletChart;
1694
+ }
1695
+ }
1696
+
1697
+ /** Bars, lines, areas and ranges on one category axis; every series declares its `type`. */
1698
+ declare class SkdxComboChart extends SkdxChartElement {
1699
+ protected render(): lit.TemplateResult;
1700
+ }
1701
+ declare global {
1702
+ interface HTMLElementTagNameMap {
1703
+ 'skdx-combo-chart': SkdxComboChart;
1704
+ }
1705
+ }
1706
+
1707
+ /** Low–high intervals per category: a shaded band, floating bars or two outlines. */
1708
+ declare class SkdxRangeChart extends SkdxRootElement {
1709
+ series: RangeChartSeries[];
1710
+ variant: 'area' | 'bar' | 'line' | undefined;
1711
+ categories: Category[] | undefined;
1712
+ xAxis: XAxisOptions | undefined;
1713
+ yAxis: AxisOptions | undefined;
1714
+ rightAxis: AxisOptions | undefined;
1715
+ references: Reference[] | undefined;
1716
+ annotations: Annotation[] | undefined;
1717
+ curve: Curve | undefined;
1718
+ connectNulls: boolean;
1719
+ orientation: 'vertical' | 'horizontal' | undefined;
1720
+ radius: number | undefined;
1721
+ barGap: number | undefined;
1722
+ /** Largest bar thickness in pixels. */
1723
+ barWidth: number | undefined;
1724
+ brush: boolean;
1725
+ crosshair: boolean;
1726
+ protected render(): lit.TemplateResult;
1727
+ }
1728
+ declare global {
1729
+ interface HTMLElementTagNameMap {
1730
+ 'skdx-range-chart': SkdxRangeChart;
1731
+ }
1732
+ }
1733
+
1734
+ /** Nodes and edges of a graph: force-directed, circular or at given coordinates. */
1735
+ declare class SkdxNetworkChart extends SkdxRootElement {
1736
+ nodes: NetworkNode[];
1737
+ edges: NetworkEdge[];
1738
+ arrange: 'force' | 'circular' | 'manual' | undefined;
1739
+ /** Write node labels (off above 60 nodes unless set). */
1740
+ labels: boolean;
1741
+ /** Smallest and largest node radius in pixels. */
1742
+ nodeRange: [number, number] | undefined;
1743
+ /** Force-layout iterations. */
1744
+ iterations: number | undefined;
1745
+ /** Draw an arrowhead at the target end of every edge. */
1746
+ directed: boolean;
1747
+ /** Write edge labels at the middle of each edge. */
1748
+ edgeLabels: boolean;
1749
+ protected render(): lit.TemplateResult;
1750
+ }
1751
+ declare global {
1752
+ interface HTMLElementTagNameMap {
1753
+ 'skdx-network-chart': SkdxNetworkChart;
1754
+ }
1755
+ }
1756
+
1757
+ /** Point-in-time events on a time axis, in lanes with staggered labels, or as a vertical list. */
1758
+ declare class SkdxTimelineChart extends SkdxRootElement {
1759
+ events: TimelineEvent[];
1760
+ orientation: 'horizontal' | 'vertical' | undefined;
1761
+ /** How dates are written. */
1762
+ xAxis: Pick<AxisOptions, 'format' | 'label'> | undefined;
1763
+ /** Write event labels. */
1764
+ labels: boolean;
1765
+ protected render(): lit.TemplateResult;
1766
+ }
1767
+ declare global {
1768
+ interface HTMLElementTagNameMap {
1769
+ 'skdx-timeline-chart': SkdxTimelineChart;
1770
+ }
1771
+ }
1772
+
1773
+ /** Columns as wide as their total with segments stacked to 100% inside: size and mix in one chart. */
1774
+ declare class SkdxMarimekkoChart extends SkdxRootElement {
1775
+ /** Segment names in stacking order, one color each. */
1776
+ segments: (string | Pick<Datum, 'id' | 'name' | 'color'>)[];
1777
+ data: MarimekkoCategory[];
1778
+ /** Write segment shares inside cells wide enough. */
1779
+ labels: boolean;
1780
+ /** Gap between columns as a share of the plot width. */
1781
+ gap: number | undefined;
1782
+ /** How column totals are written. */
1783
+ xAxis: Pick<AxisOptions, 'format' | 'label'> | undefined;
1784
+ protected render(): lit.TemplateResult;
1785
+ }
1786
+ declare global {
1787
+ interface HTMLElementTagNameMap {
1788
+ 'skdx-marimekko-chart': SkdxMarimekkoChart;
1789
+ }
1790
+ }
1791
+
1792
+ /** One vertical axis per dimension, each on its own scale, and a line per row through its values. */
1793
+ declare class SkdxParallelCoordinatesChart extends SkdxRootElement {
1794
+ dimensions: ParallelDimension[];
1795
+ data: ParallelRow[];
1796
+ /** Line opacity; defaults to 0.6, lower above 200 rows. */
1797
+ opacity: number | undefined;
1798
+ curve: Curve | undefined;
1799
+ /** Draw lines across missing values. */
1800
+ connectNulls: boolean;
1801
+ /** Rows outside these ranges fade. */
1802
+ filters: {
1803
+ key: string;
1804
+ min?: number | undefined;
1805
+ max?: number | undefined;
1806
+ }[] | undefined;
1807
+ protected render(): lit.TemplateResult;
1808
+ }
1809
+ declare global {
1810
+ interface HTMLElementTagNameMap {
1811
+ 'skdx-parallel-coordinates-chart': SkdxParallelCoordinatesChart;
1812
+ }
1813
+ }
1814
+
1815
+ /** A single reading on a straight scale with bands and a target: the bullet engine with gauge semantics. */
1816
+ declare class SkdxLinearGauge extends SkdxRootElement {
1817
+ /** The reading. */
1818
+ value: number;
1819
+ /** Scale start. Defaults to 0. */
1820
+ min: number | undefined;
1821
+ /** Scale end. Defaults to 100 or the largest of value, target and bands. */
1822
+ max: number | undefined;
1823
+ /** A marker at this value. */
1824
+ target: number | undefined;
1825
+ /** Threshold sectors in value units. */
1826
+ bands: Band[] | undefined;
1827
+ orientation: 'horizontal' | 'vertical' | undefined;
1828
+ /** The metric name, written before the scale and in tooltips. */
1829
+ caption: string | undefined;
1830
+ /** Write the value after the bar. */
1831
+ labels: boolean;
1832
+ /** Approximate tick count of the scale. */
1833
+ ticks: number | undefined;
1834
+ protected render(): lit.TemplateResult;
1835
+ }
1836
+ declare global {
1837
+ interface HTMLElementTagNameMap {
1838
+ 'skdx-linear-gauge': SkdxLinearGauge;
1839
+ }
1840
+ }
1841
+
1842
+ /** A start and an end value per category joined by a connector: before/after, plan/actual. */
1843
+ declare class SkdxDumbbellChart extends SkdxRootElement {
1844
+ data: DumbbellDatum[];
1845
+ /** Name of the start markers, for the legend and tooltips. */
1846
+ startLabel: string | undefined;
1847
+ /** Name of the end markers. */
1848
+ endLabel: string | undefined;
1849
+ orientation: 'horizontal' | 'vertical' | undefined;
1850
+ /** Write both values next to their markers. */
1851
+ labels: boolean;
1852
+ /** Order categories by end value, or by the change. */
1853
+ sort: 'asc' | 'desc' | 'change' | undefined;
1854
+ /** Marker radius in pixels. */
1855
+ markerSize: number | undefined;
1856
+ xAxis: AxisOptions | undefined;
1857
+ references: Reference[] | undefined;
1858
+ protected render(): lit.TemplateResult;
1859
+ }
1860
+ declare global {
1861
+ interface HTMLElementTagNameMap {
1862
+ 'skdx-dumbbell-chart': SkdxDumbbellChart;
1863
+ }
1864
+ }
1865
+
1866
+ /** Categories sorted by value with the cumulative share as a line on the right axis. */
1867
+ declare class SkdxParetoChart extends SkdxRootElement {
1868
+ data: Datum[];
1869
+ /** A cumulative-share reference line, e.g. 0.8. */
1870
+ threshold: number | undefined;
1871
+ /** Name of the cumulative line. */
1872
+ cumulativeLabel: string | undefined;
1873
+ /** Name of the bars. */
1874
+ name: string | undefined;
1875
+ labels: boolean;
1876
+ radius: number | undefined;
1877
+ barGap: number | undefined;
1878
+ barWidth: number | undefined;
1879
+ xAxis: XAxisOptions | undefined;
1880
+ yAxis: AxisOptions | undefined;
1881
+ brush: boolean;
1882
+ crosshair: boolean;
1883
+ protected render(): lit.TemplateResult;
1884
+ }
1885
+ declare global {
1886
+ interface HTMLElementTagNameMap {
1887
+ 'skdx-pareto-chart': SkdxParetoChart;
1888
+ }
1889
+ }
1890
+
1891
+ /** Ranks over categories: one line per series, the top rank at the top. */
1892
+ declare class SkdxBumpChart extends SkdxRootElement {
1893
+ /** Values per category; ranks are computed unless `ranked`. */
1894
+ series: Series[];
1895
+ categories: Category[] | undefined;
1896
+ /** The data are already ranks (1 = first). */
1897
+ ranked: boolean;
1898
+ /** Only the first `topRank` ranks are drawn. */
1899
+ topRank: number | undefined;
1900
+ curve: Curve | undefined;
1901
+ /** Write series names at the right end of their line. */
1902
+ labels: boolean;
1903
+ /** Marker radius in pixels. */
1904
+ markerSize: number | undefined;
1905
+ xAxis: XAxisOptions | undefined;
1906
+ protected render(): lit.TemplateResult;
1907
+ }
1908
+ declare global {
1909
+ interface HTMLElementTagNameMap {
1910
+ 'skdx-bump-chart': SkdxBumpChart;
1911
+ }
1912
+ }
1913
+
1914
+ /** A Nightingale rose: equal angular sectors whose radius follows the value. */
1915
+ declare class SkdxPolarAreaChart extends SkdxRootElement {
1916
+ data: Datum[];
1917
+ /** Radius proportional to the value, or to its square root (area-proportional). */
1918
+ scale: 'linear' | 'sqrt' | undefined;
1919
+ /** Outer ring value. */
1920
+ max: number | undefined;
1921
+ /** Degrees clockwise from 12 o'clock. */
1922
+ startAngle: number | undefined;
1923
+ endAngle: number | undefined;
1924
+ /** Gap between sectors, in degrees. */
1925
+ padAngle: number | undefined;
1926
+ /** Hole radius as a fraction of the outer radius. */
1927
+ innerRadius: number | undefined;
1928
+ /** Number of grid rings. */
1929
+ levels: number | undefined;
1930
+ /** Write each name at its sector's edge. */
1931
+ labels: boolean;
1932
+ protected render(): lit.TemplateResult;
1933
+ }
1934
+ declare global {
1935
+ interface HTMLElementTagNameMap {
1936
+ 'skdx-polar-area-chart': SkdxPolarAreaChart;
1937
+ }
1938
+ }
1939
+
1940
+ /** A beeswarm: every observation as a dot, spread sideways so none overlap. */
1941
+ declare class SkdxSwarmPlot extends SkdxRootElement {
1942
+ /** One swarm per series, over its raw samples. */
1943
+ series: Series[];
1944
+ orientation: 'vertical' | 'horizontal' | undefined;
1945
+ /** Dot radius in pixels. */
1946
+ markerSize: number | undefined;
1947
+ yAxis: AxisOptions | undefined;
1948
+ references: Reference[] | undefined;
1949
+ protected render(): lit.TemplateResult;
1950
+ }
1951
+ declare global {
1952
+ interface HTMLElementTagNameMap {
1953
+ 'skdx-swarm-plot': SkdxSwarmPlot;
1954
+ }
1955
+ }
1956
+
1957
+ /** A grid of cells, each standing for a share of the total, colored by datum. */
1958
+ declare class SkdxWaffleChart extends SkdxRootElement {
1959
+ data: Datum[];
1960
+ /** What the whole grid stands for. */
1961
+ total: number | undefined;
1962
+ rows: number | undefined;
1963
+ columns: number | undefined;
1964
+ /** Fill direction. */
1965
+ orientation: 'vertical' | 'horizontal' | undefined;
1966
+ /** Gap between cells in pixels. */
1967
+ cellGap: number | undefined;
1968
+ /** Cell corner radius in pixels. */
1969
+ cellRadius: number | undefined;
1970
+ /** Write each datum's share after its name in the legend. */
1971
+ labels: boolean;
1972
+ protected render(): lit.TemplateResult;
1973
+ }
1974
+ declare global {
1975
+ interface HTMLElementTagNameMap {
1976
+ 'skdx-waffle-chart': SkdxWaffleChart;
1977
+ }
1978
+ }
1979
+
1980
+ /** A node-link tree: one dot or box per node with links to its children, top-down or left-right. */
1981
+ declare class SkdxTreeChart extends SkdxRootElement {
1982
+ data: TreeNode[];
1983
+ /** Root at the top, or at the left. */
1984
+ orientation: 'vertical' | 'horizontal' | undefined;
1985
+ /** Dots with labels beside them, or boxes holding the name. */
1986
+ nodeShape: 'circle' | 'box' | undefined;
1987
+ linkStyle: 'curve' | 'elbow' | 'straight' | undefined;
1988
+ /** Id (or name) of the node shown as the root. */
1989
+ rootId: ChartItemId | undefined;
1990
+ /** Nodes whose children are hidden. */
1991
+ collapsed: ChartItemId[] | undefined;
1992
+ /** Deepest level drawn. */
1993
+ maxDepth: number | undefined;
1994
+ /** Write node names. */
1995
+ labels: boolean;
1996
+ /** Dot radius, or box height, in pixels. */
1997
+ nodeSize: number | undefined;
1998
+ protected render(): lit.TemplateResult;
1999
+ }
2000
+ declare global {
2001
+ interface HTMLElementTagNameMap {
2002
+ 'skdx-tree-chart': SkdxTreeChart;
2003
+ }
2004
+ }
2005
+
2006
+ /** A tree of boxes with elbow links and optional subtitles: reporting lines, ownership, hierarchies. */
2007
+ declare class SkdxOrganizationChart extends SkdxRootElement {
2008
+ data: TreeNode[];
2009
+ /** Root at the top, or at the left. */
2010
+ orientation: 'vertical' | 'horizontal' | undefined;
2011
+ /** Id (or name) of the node shown as the root. */
2012
+ rootId: ChartItemId | undefined;
2013
+ /** Nodes whose children are hidden. */
2014
+ collapsed: ChartItemId[] | undefined;
2015
+ /** Deepest level drawn. */
2016
+ maxDepth: number | undefined;
2017
+ /** Write node names. */
2018
+ labels: boolean;
2019
+ /** Box height in pixels. */
2020
+ nodeSize: number | undefined;
2021
+ protected render(): lit.TemplateResult;
2022
+ }
2023
+ declare global {
2024
+ interface HTMLElementTagNameMap {
2025
+ 'skdx-organization-chart': SkdxOrganizationChart;
2026
+ }
2027
+ }
2028
+
2029
+ /** Nested circles sized by value, children packed inside their parent. */
2030
+ declare class SkdxCirclePackingChart extends SkdxRootElement {
2031
+ data: TreeNode[];
2032
+ /** Id (or name) of the node shown as the whole chart. */
2033
+ rootId: ChartItemId | undefined;
2034
+ /** Deepest level drawn. */
2035
+ maxDepth: number | undefined;
2036
+ /** Write names on circles wide enough. */
2037
+ labels: boolean;
2038
+ /** Gap between sibling circles, in pixels. */
2039
+ padding: number | undefined;
2040
+ /** Colors leaves by their value. */
2041
+ colorScale: ColorScale | undefined;
2042
+ protected render(): lit.TemplateResult;
2043
+ }
2044
+ declare global {
2045
+ interface HTMLElementTagNameMap {
2046
+ 'skdx-circle-packing-chart': SkdxCirclePackingChart;
2047
+ }
2048
+ }
2049
+
2050
+ /** A rectangular sunburst: one row per depth, children inside their parent's span. */
2051
+ declare class SkdxIcicleChart extends SkdxRootElement {
2052
+ data: TreeNode[];
2053
+ /** Root row at the top, or root column at the left. */
2054
+ orientation: 'vertical' | 'horizontal' | undefined;
2055
+ /** Id (or name) of the node shown as the whole chart. */
2056
+ rootId: ChartItemId | undefined;
2057
+ /** Write the path to `rootId` above the cells. */
2058
+ breadcrumbs: boolean;
2059
+ /** Deepest level drawn. */
2060
+ maxDepth: number | undefined;
2061
+ /** Cell order inside a parent. */
2062
+ sort: 'asc' | 'desc' | 'none' | undefined;
2063
+ /** Write names on cells wide enough. */
2064
+ labels: boolean;
2065
+ /** Gap between cells, in pixels. */
2066
+ padding: number | undefined;
2067
+ /** Colors cells by their value. */
2068
+ colorScale: ColorScale | undefined;
2069
+ protected render(): lit.TemplateResult;
2070
+ }
2071
+ declare global {
2072
+ interface HTMLElementTagNameMap {
2073
+ 'skdx-icicle-chart': SkdxIcicleChart;
2074
+ }
2075
+ }
2076
+
2077
+ /** How clicks (and, for `brush`/`lasso`, drags) change the selection. */
2078
+ type SelectionMode = 'none' | 'single' | 'multiple' | 'brush' | 'lasso';
2079
+ /**
2080
+ * The accessible `<svg>` root every chart renders into. Owns focus, hidden-series, zoom,
2081
+ * selection and map-view state and drives it with the core helpers; fires `skdx-item-click`,
2082
+ * `skdx-hidden-series-change`, `skdx-zoom-change`, `skdx-view-change`, `skdx-selected-change`,
2083
+ * `skdx-highlighted-change`, `skdx-task-change` and `skdx-data-issue`.
2084
+ */
2085
+ declare abstract class SkdxRootElement extends LitElement {
2086
+ static styles: lit.CSSResult;
2087
+ /** @default 600 (300 for the round charts, 120 for sparklines) */
2088
+ width: number | undefined;
2089
+ /** @default 300 (32 for sparklines) */
2090
+ height: number | undefined;
2091
+ /** Accessible name of the chart; defaults to "<Kind> chart". */
2092
+ label: string | undefined;
2093
+ /** Draw a legend row above the plot; set an object as a property for position and item limit. */
2094
+ legend: boolean | LegendOptions;
2095
+ /** Show a hover tooltip for the mark under the pointer; set an object as a property to configure it. @default true */
2096
+ tooltip: boolean | TooltipOptions;
2097
+ /** How values are written: a function or an `Intl` style such as `{ style: 'currency', currency: 'EUR' }`. */
2098
+ format: Format | undefined;
2099
+ /** Categorical series colors, cycled by series index. */
2100
+ palette: string[] | undefined;
2101
+ /** Series left out of the plot; set it to control the legend toggles, listen to `skdx-hidden-series-change`. */
2102
+ hiddenSeries: string[] | undefined;
2103
+ /** Selected items; set it to control the selection, listen to `skdx-selected-change`. */
2104
+ selected: Selection | undefined;
2105
+ /** Clicks select marks: one, any number, a dragged rectangle or a drawn outline. */
2106
+ selectionMode: SelectionMode;
2107
+ /** The item(s) under emphasis; listen to `skdx-highlighted-change` for hover and focus. */
2108
+ highlighted: Sized['highlighted'];
2109
+ highlightScope: HighlightScope | undefined;
2110
+ /** Draw a loading placeholder instead of the chart. */
2111
+ loading: boolean;
2112
+ /** Draw this message instead of the chart. */
2113
+ error: string | undefined;
2114
+ /** Written in place of an empty chart. */
2115
+ emptyMessage: string | undefined;
2116
+ /** Longer accessible description, rendered as the svg `<desc>`. */
2117
+ description: string | undefined;
2118
+ /** Hide the chart from assistive technology. */
2119
+ decorative: boolean;
2120
+ /** Render a visually hidden data table next to the svg. */
2121
+ accessibleTable: boolean | AccessibleTableOptions;
2122
+ /** Visible category window; set it to control zoom, listen to `skdx-zoom-change`. */
2123
+ zoom: Zoom | undefined;
2124
+ /** The map's pan/zoom state; set it to control the view, listen to `skdx-view-change`. */
2125
+ view: MapView | undefined;
2126
+ /** Wheel and pinch zoom, drag pans the category axis (or the map). */
2127
+ zoomable: boolean;
2128
+ /** Gantt bars can be dragged and resized; listen to `skdx-task-change`. */
2129
+ editable: boolean;
2130
+ /** Charts sharing a `sync-id` share highlight, selection, zoom, hidden series and the crosshair. */
2131
+ syncId: string | undefined;
2132
+ /** With `sync-id`: a selection made in another chart of the group fades everything else here. */
2133
+ crossFilter: boolean;
2134
+ /**
2135
+ * Fade marks in and transition them on change; the `animated` attribute is 300 ms,
2136
+ * `animated="120"` sets the duration. (`animate()` is a DOM method, hence the name.)
2137
+ */
2138
+ animated: boolean | number;
2139
+ /** Lay the chart out at the host's width, so text keeps its size; set an object as a property for `compact` overrides. */
2140
+ responsive: boolean | ResponsiveOptions;
2141
+ private tip;
2142
+ private overlay;
2143
+ private portal;
2144
+ private measured;
2145
+ private viewState;
2146
+ private highlightState;
2147
+ private crossState;
2148
+ private lastCross;
2149
+ private observer;
2150
+ private readonly pointers;
2151
+ private hover;
2152
+ private reported;
2153
+ private readonly token;
2154
+ private leave;
2155
+ private joined;
2156
+ connectedCallback(): void;
2157
+ disconnectedCallback(): void;
2158
+ private focused;
2159
+ private hiddenState;
2160
+ private zoomState;
2161
+ private selectedState;
2162
+ private drag;
2163
+ private layout;
2164
+ /** The shared options, with the effective hidden series, zoom and selection, to spread into a layout input. */
2165
+ protected sized(): {
2166
+ width: number | undefined;
2167
+ height: number | undefined;
2168
+ animate: number | boolean;
2169
+ responsive: boolean | ResponsiveOptions;
2170
+ legend: boolean | LegendOptions;
2171
+ tooltip: boolean | TooltipOptions;
2172
+ format: Format | undefined;
2173
+ palette: string[] | undefined;
2174
+ loading: boolean;
2175
+ error: string | undefined;
2176
+ emptyMessage: string | undefined;
2177
+ description: string | undefined;
2178
+ decorative: boolean;
2179
+ highlighted: ChartItemRef | ChartItemId | (ChartItemRef | ChartItemId)[] | null | undefined;
2180
+ highlightScope: HighlightScope | undefined;
2181
+ accessibleTable: boolean | AccessibleTableOptions;
2182
+ hiddenSeries: string[];
2183
+ zoom: Zoom | undefined;
2184
+ selected: Selection | undefined;
2185
+ view: MapView | undefined;
2186
+ };
2187
+ private emit;
2188
+ private publish;
2189
+ private join;
2190
+ private setZoom;
2191
+ private setView;
2192
+ private setSelected;
2193
+ private toggle;
2194
+ private highlight;
2195
+ private select;
2196
+ private shareCrosshair;
2197
+ private clearTip;
2198
+ private canZoom;
2199
+ private canPan;
2200
+ private canEdit;
2201
+ private brushing;
2202
+ private viewBox;
2203
+ /** The rendered `<svg>`, or `null` before the first render. */
2204
+ getSvgElement(): SVGSVGElement | null;
2205
+ /** The current layout: shapes, size, hit model. */
2206
+ getLayout(): Canvas | undefined;
2207
+ resetZoom(): void;
2208
+ zoomTo(zoom: Zoom): void;
2209
+ /** Moves keyboard focus to the first mark matching the ref; `false` when none matches. */
2210
+ focusItem(ref: ChartItemRef): boolean;
2211
+ /** SVG markup, a PNG blob, or CSV, through the core's `exportChart`. */
2212
+ export(options: Omit<ChartExportOptions, 'label'> & {
2213
+ label?: string;
2214
+ }): Promise<string | Blob>;
2215
+ private onPointerMove;
2216
+ private onPointerDown;
2217
+ private onPointerUp;
2218
+ private onWheel;
2219
+ private onClick;
2220
+ private onKeyDown;
2221
+ /** The accessible `<svg>` root: the layout's shapes, then the hover or keyboard tooltip. */
2222
+ protected root(laidOut: Canvas, kind: string, label: string): TemplateResult;
2223
+ }
2224
+ /** The cartesian charts (bar, line, area): series and categories plus axes, references, stacking, zoom. */
2225
+ declare abstract class SkdxChartElement extends SkdxRootElement {
2226
+ /** The plotted series; set as a property, not an attribute. */
2227
+ series: (CartesianSeries | RangeSeries)[];
2228
+ /** X-axis labels; numbers and dates are written with `xAxis.format`. */
2229
+ categories: Category[] | undefined;
2230
+ xAxis: XAxisOptions | undefined;
2231
+ yAxis: AxisOptions | undefined;
2232
+ /** Enables the second y axis; series opt in with `axis: 'right'`. */
2233
+ rightAxis: AxisOptions | undefined;
2234
+ /** Lines and bands in data coordinates: targets, SLAs, forecast periods. */
2235
+ references: Reference[] | undefined;
2236
+ /** Points, callouts, text and rectangles in data coordinates. */
2237
+ annotations: Annotation[] | undefined;
2238
+ /** Write each value next to its mark. */
2239
+ labels: boolean;
2240
+ curve: Curve | undefined;
2241
+ connectNulls: boolean;
2242
+ /** What a null does to a line: a gap, a bridge, or a zero. */
2243
+ nulls: 'gap' | 'connect' | 'zero' | undefined;
2244
+ /** Stack the series; `stacked="percent"` normalizes each category to 100%. */
2245
+ stacked: boolean | 'percent';
2246
+ /** Where stacks stand: zero, expand (100%), silhouette or wiggle (streamgraph). */
2247
+ stackOffset: 'zero' | 'expand' | 'silhouette' | 'wiggle' | undefined;
2248
+ orientation: 'vertical' | 'horizontal' | undefined;
2249
+ /** Corner radius of bars. */
2250
+ radius: number | undefined;
2251
+ /** Share of each category slot left empty around its bars, 0–0.9. */
2252
+ barGap: number | undefined;
2253
+ /** Largest bar thickness in pixels. */
2254
+ barWidth: number | undefined;
2255
+ sort: 'asc' | 'desc' | undefined;
2256
+ transform: 'histogram' | 'cumulative' | undefined;
2257
+ /** Transforms applied to every series, in order. */
2258
+ transforms: SeriesTransform[] | undefined;
2259
+ bins: number | undefined;
2260
+ binWidth: number | undefined;
2261
+ binDomain: [number, number] | undefined;
2262
+ binMode: 'count' | 'density' | 'cumulative' | undefined;
2263
+ /** Point reduction for dense series: `auto` (default), `lttb`, `minmax`, `none`, or an object. */
2264
+ sampling: Sampling | undefined;
2265
+ /** Draw a range strip under the plot showing the whole series and the zoomed window. */
2266
+ brush: boolean;
2267
+ /** Snap the hover tooltip to the nearest category and list every series. */
2268
+ crosshair: boolean;
2269
+ /** The full cartesian layout input. */
2270
+ protected input(): {
2271
+ series: (CartesianSeries | RangeSeries)[];
2272
+ categories: Category[] | undefined;
2273
+ xAxis: XAxisOptions | undefined;
2274
+ yAxis: AxisOptions | undefined;
2275
+ rightAxis: AxisOptions | undefined;
2276
+ references: Reference[] | undefined;
2277
+ annotations: Annotation[] | undefined;
2278
+ labels: boolean;
2279
+ curve: Curve | undefined;
2280
+ connectNulls: boolean;
2281
+ nulls: "gap" | "connect" | "zero" | undefined;
2282
+ stacked: boolean | "percent";
2283
+ stackOffset: "zero" | "expand" | "silhouette" | "wiggle" | undefined;
2284
+ orientation: "vertical" | "horizontal" | undefined;
2285
+ radius: number | undefined;
2286
+ barGap: number | undefined;
2287
+ barWidth: number | undefined;
2288
+ sort: "asc" | "desc" | undefined;
2289
+ transform: "histogram" | "cumulative" | undefined;
2290
+ transforms: SeriesTransform[] | undefined;
2291
+ bins: number | undefined;
2292
+ binWidth: number | undefined;
2293
+ binDomain: [number, number] | undefined;
2294
+ binMode: "cumulative" | "count" | "density" | undefined;
2295
+ sampling: Sampling | undefined;
2296
+ brush: boolean;
2297
+ crosshair: boolean;
2298
+ width: number | undefined;
2299
+ height: number | undefined;
2300
+ animate: number | boolean;
2301
+ responsive: boolean | ResponsiveOptions;
2302
+ legend: boolean | LegendOptions;
2303
+ tooltip: boolean | TooltipOptions;
2304
+ format: Format | undefined;
2305
+ palette: string[] | undefined;
2306
+ loading: boolean;
2307
+ error: string | undefined;
2308
+ emptyMessage: string | undefined;
2309
+ description: string | undefined;
2310
+ decorative: boolean;
2311
+ highlighted: ChartItemRef | ChartItemId | (ChartItemRef | ChartItemId)[] | null | undefined;
2312
+ highlightScope: HighlightScope | undefined;
2313
+ accessibleTable: boolean | AccessibleTableOptions;
2314
+ hiddenSeries: string[];
2315
+ zoom: Zoom | undefined;
2316
+ selected: Selection | undefined;
2317
+ view: MapView | undefined;
2318
+ };
2319
+ }
2320
+
2321
+ /** Filled, optionally stacked, areas down to zero; series may also be bars, lines or ranges. */
2322
+ declare class SkdxAreaChart extends SkdxChartElement {
2323
+ protected render(): lit.TemplateResult;
2324
+ }
2325
+ declare global {
2326
+ interface HTMLElementTagNameMap {
2327
+ 'skdx-area-chart': SkdxAreaChart;
2328
+ }
2329
+ }
2330
+
2331
+ export { type RangeChartSeries as $, type AccessibleTableOptions as A, type Band as B, type ChartItemRef as C, type Datum as D, type ErrorValue as E, type Format as F, type GanttTask as G, type HighlightScope as H, type IcicleInput as I, type MapLine as J, type MapPoint as K, type LegendOptions as L, type MapFeature as M, type MapView as N, type MarimekkoCategory as O, type MarimekkoChartInput as P, type MarkerSymbol as Q, type NetworkEdge as R, type NetworkNode as S, type OrganizationChartInput as T, type ParallelCoordinatesInput as U, type ParallelDimension as V, type ParallelRow as W, type PolarAreaChartInput as X, type RadarMetric as Y, type Zoom as Z, type RadialBand as _, type Annotation as a, csv as a$, type RangeSeries as a0, type Reference as a1, type Sampling as a2, type SankeyLink as a3, type SankeyNode as a4, type ScatterPoint as a5, type ScatterSeries as a6, type Selection as a7, type SelectionMode as a8, type Series as a9, SkdxPieChart as aA, SkdxPolarAreaChart as aB, SkdxRadarChart as aC, SkdxRadialBarChart as aD, SkdxRangeChart as aE, SkdxSankeyChart as aF, SkdxScatterChart as aG, SkdxSparkline as aH, SkdxSunburstChart as aI, SkdxSwarmPlot as aJ, SkdxTimelineChart as aK, SkdxTreeChart as aL, SkdxTreemap as aM, SkdxWaffleChart as aN, SkdxWaterfallChart as aO, type SwarmPlotInput as aP, type TaskChange as aQ, type TimelineChartInput as aR, type TimelineEvent as aS, type TooltipOptions as aT, type TreeChartInput as aU, type TreeNode as aV, type Value as aW, type Variant as aX, type WaffleChartInput as aY, type WaterfallDatum as aZ, type XAxisOptions as a_, type SeriesTransform as aa, SkdxAreaChart as ab, SkdxBarChart as ac, SkdxBoxplot as ad, SkdxBubbleChart as ae, SkdxBulletChart as af, SkdxBumpChart as ag, SkdxCandlestickChart as ah, SkdxChordChart as ai, SkdxCirclePackingChart as aj, SkdxComboChart as ak, SkdxDumbbellChart as al, SkdxFunnelChart as am, SkdxGanttChart as an, SkdxGaugeChart as ao, SkdxHeatmap as ap, SkdxHistogram as aq, SkdxIcicleChart as ar, SkdxLineChart as as, SkdxLinearGauge as at, SkdxMapChart as au, SkdxMarimekkoChart as av, SkdxNetworkChart as aw, SkdxOrganizationChart as ax, SkdxParallelCoordinatesChart as ay, SkdxParetoChart as az, type AxisOptions as b, exportChart as b0, seriesCsv as b1, svgMarkup as b2, type BoxSummary as c, type BoxplotSeries as d, type BubblePoint as e, type BubbleSeries as f, type BulletDatum as g, type BumpChartInput as h, type CalendarCell as i, type Candle as j, type CandlestickOverlay as k, type CartesianSeries as l, type Category as m, type ChartDataIssue as n, type ChartExportOptions as o, type ChartItem as p, type ChartItemId as q, type ChordLink as r, type CirclePackingInput as s, type ColorScale as t, type ComboSeries as u, type Curve as v, type DumbbellDatum as w, type GeoMultiPolygon as x, type GeoPolygon as y, type GroupedBoxSeries as z };