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