chartist 2.0.0-rc.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -512,10 +512,14 @@ export interface AnimationDefinition {
512
512
  /** The `id` of the `<animate>` element, to start other animations relative to it. */
513
513
  id?: string;
514
514
  /**
515
- * The easing: a name from {@link easings} or four numbers of a cubic
516
- * Bézier curve. Sets `calcMode`, `keySplines` and `keyTimes` for you.
517
- */
518
- easing?: number[] | keyof typeof easings;
515
+ * The easing: a name from {@link easings}, four numbers of a cubic
516
+ * Bézier curve, or a CSS easing such as `'ease-out'`,
517
+ * `'cubic-bezier(0.34, 1.56, 0.64, 1)'`, `linear()` or `steps()`. Sets
518
+ * `calcMode`, `keySplines` and `keyTimes` for you, or, for easings SMIL
519
+ * can't express (ones that overshoot, `linear()`, `steps()`), `values`
520
+ * sampled between `from` and `to`.
521
+ */
522
+ easing?: number[] | keyof typeof easings | (string & {});
519
523
  /** How values are interpolated (SMIL `calcMode`); an `easing` sets `'spline'`. */
520
524
  calcMode?: 'discrete' | 'linear' | 'paced' | 'spline';
521
525
  /** Whether the animation can restart while it's running (SMIL `restart`). */
@@ -528,6 +532,8 @@ export interface AnimationDefinition {
528
532
  keySplines?: string;
529
533
  /** The times of the key values, from `0` to `1` (SMIL `keyTimes`); an `easing` sets them. */
530
534
  keyTimes?: string;
535
+ /** The values in between, `;`-separated (SMIL `values`); an easing that overshoots sets them. */
536
+ values?: string;
531
537
  /** `'freeze'` keeps the last value after the animation, `'remove'` resets it. Guided mode sets `'freeze'`. */
532
538
  fill?: string;
533
539
  /** The minimum active duration (SMIL `min`). */
@@ -617,6 +623,46 @@ export declare const easings: {
617
623
  easeOutBack: number[];
618
624
  easeInOutBack: number[];
619
625
  };
626
+ /**
627
+ * The SMIL `keySplines` of an easing SMIL can express: a cubic Bézier
628
+ * curve whose four numbers lie within 0 and 1 (the CSS keywords, many
629
+ * `cubic-bezier()` curves, most names of {@link easings}). Browsers ignore
630
+ * an animation whose `keySplines` leave that range, so for other easings
631
+ * it returns nothing: sample them with {@link sampleEasing} instead.
632
+ *
633
+ * @example
634
+ * ```ts
635
+ * import { keySplinesOf } from 'chartist';
636
+ *
637
+ * keySplinesOf('ease-out'); // '0 0 0.58 1'
638
+ * keySplinesOf('easeOutBack'); // undefined: it overshoots
639
+ * ```
640
+ * @param easing A CSS easing, a name of {@link easings}, or four numbers
641
+ * @returns The `keySplines` value, or nothing
642
+ */
643
+ export declare function keySplinesOf(easing: string | readonly number[]): string | undefined;
644
+ /**
645
+ * The eased progress of an animation at evenly spaced times, for SMIL
646
+ * `values` with even `keyTimes`: 12 points, and one per 50 ms for
647
+ * animations longer than 600 ms, at most 40. It takes the CSS easings
648
+ * (the keywords, `cubic-bezier()` curves, also ones that overshoot,
649
+ * `linear()` and `steps()`), the names of {@link easings} and four
650
+ * numbers of a cubic Bézier curve; anything else is sampled as `ease`.
651
+ * Points lie below 0 or above 1 where the easing overshoots.
652
+ *
653
+ * @example
654
+ * ```ts
655
+ * import { sampleEasing } from 'chartist';
656
+ *
657
+ * // A value that grows from 10 to 20 and overshoots a little on the way.
658
+ * const progress = sampleEasing('cubic-bezier(0.34, 1.56, 0.64, 1)', 400);
659
+ * const values = progress.map(p => 10 + (20 - 10) * p).join(';');
660
+ * ```
661
+ * @param easing The easing
662
+ * @param duration The animation's duration in ms
663
+ * @returns The progress at each point, from 0 to 1
664
+ */
665
+ export declare function sampleEasing(easing: string | readonly number[], duration: number): number[];
620
666
  //#endregion
621
667
  //#region src/svg/SvgPath.d.ts
622
668
  /**
@@ -887,7 +933,6 @@ interface TextMetrics {
887
933
  }
888
934
  /**
889
935
  * How labels are drawn: HTML in a `foreignObject` (1.x) or SVG `text`.
890
- * @experimental
891
936
  */
892
937
  type LabelMode = 'html' | 'svg';
893
938
  /** What a {@link MeasureText} function gets with the text to measure. */
@@ -957,7 +1002,6 @@ type MeasureStyle = (property: string, options?: MeasureStyleOptions) => string
957
1002
  * below the top of the line (a typical font's ascent). Lines are one font
958
1003
  * size apart, so a renderer finds a line's vertical center at
959
1004
  * `y - (textAscent - 0.5) * fontSize` from its `y`.
960
- * @experimental
961
1005
  */
962
1006
  export declare const textAscent = 0.85;
963
1007
  /**
@@ -975,10 +1019,129 @@ export declare const textAscent = 0.85;
975
1019
  * return { ...size, width: size.width * 1.1 };
976
1020
  * };
977
1021
  * ```
978
- * @experimental
979
1022
  */
980
1023
  export declare const estimateText: MeasureText;
981
1024
  //#endregion
1025
+ //#region src/render/types.d.ts
1026
+ /**
1027
+ * Why a chart rendered: `create` for its first render, `update` for
1028
+ * `update()` (and the presets' `setOptions()`), `resize` when its
1029
+ * container's size changed, `responsive` when its matching `responsive`
1030
+ * entries changed, `fonts` when web fonts finished loading.
1031
+ */
1032
+ type RenderCause = 'create' | 'update' | 'resize' | 'responsive' | 'fonts';
1033
+ /**
1034
+ * What a render did to one node of the output: `add` for a node the
1035
+ * previous scene didn't have, `update` for a node whose attributes,
1036
+ * classes or text changed (with its `previous` node), `remove` for a node
1037
+ * of the previous scene that's gone.
1038
+ */
1039
+ interface SceneChange {
1040
+ /** What happened to the node. */
1041
+ readonly op: 'add' | 'update' | 'remove';
1042
+ /** The node: of the new scene, or of the previous one for `remove`. */
1043
+ readonly node: SceneNode;
1044
+ /** The node in the previous scene, for `update`. */
1045
+ readonly previous?: SceneNode;
1046
+ }
1047
+ /**
1048
+ * The keyframes of a node's update animation: one set of attributes per
1049
+ * progress point, in the order of the points.
1050
+ */
1051
+ type Keyframes = readonly Readonly<Record<string, AttrValue>>[];
1052
+ /**
1053
+ * The timing of a render's update animation: its duration in ms and its
1054
+ * easing as a CSS easing, such as `ease-out`.
1055
+ */
1056
+ interface UpdateAnimation {
1057
+ /** The duration in ms. */
1058
+ readonly duration: number;
1059
+ /** The CSS easing, such as `ease-out` or `cubic-bezier(0.3, 0, 0.2, 1)`. */
1060
+ readonly easing: string;
1061
+ }
1062
+ /**
1063
+ * What a renderer gets about the previous render, from a chart's second
1064
+ * render on. A renderer can change its previous output in place with it,
1065
+ * instead of replacing it; renderers keep no state themselves.
1066
+ */
1067
+ interface RenderUpdate<TOutput extends RenderOutput = RenderOutput> {
1068
+ /** What this renderer returned for the previous render. */
1069
+ readonly previous: TOutput;
1070
+ /** The previous render's scene. */
1071
+ readonly previousScene: SceneNode;
1072
+ /** Why the chart renders. */
1073
+ readonly cause: RenderCause;
1074
+ /** The data's labels, for keys from labels. */
1075
+ readonly labels: readonly unknown[];
1076
+ /** The previous render's labels, for keys from labels in the previous scene. */
1077
+ readonly previousLabels: readonly unknown[];
1078
+ /**
1079
+ * Asks the chart's plugins, then the layer that drew the node, for the
1080
+ * keyframes of a node's update at the given progress points (0 is the
1081
+ * previous node, 1 the new one; points may lie beyond them when the
1082
+ * easing overshoots). Returns nothing when none of them has any.
1083
+ */
1084
+ readonly keyframes: (previous: SceneNode, next: SceneNode, progress: readonly number[]) => Keyframes | undefined;
1085
+ }
1086
+ /**
1087
+ * What a renderer returns from `render()`. The `render` and `mount` phase
1088
+ * events pass it on as `output`.
1089
+ */
1090
+ interface RenderOutput {
1091
+ /** The rendered element of a scene node, if the output is DOM. */
1092
+ readonly elementOf?: (node: SceneNode) => Element | undefined;
1093
+ /** Removes the output again. */
1094
+ readonly remove?: () => void;
1095
+ /**
1096
+ * `true` when the renderer changed its previous output in place with
1097
+ * the `update` it got, instead of replacing it. Then `changes` says what
1098
+ * it did.
1099
+ */
1100
+ readonly patched?: boolean;
1101
+ /**
1102
+ * What the renderer did to each changed node, with `patched`. Without
1103
+ * them, the chart describes the render as a replacement.
1104
+ */
1105
+ readonly changes?: readonly SceneChange[];
1106
+ /**
1107
+ * The timing of the update animation the renderer started, if any. The
1108
+ * `mount` event passes it on as `animation`.
1109
+ */
1110
+ readonly animation?: UpdateAnimation;
1111
+ }
1112
+ /**
1113
+ * Turns a scene into output. `chart()` renders inline SVG into its
1114
+ * container with the DOM renderer, unless its config sets a `renderer`.
1115
+ * To get markup instead, without a DOM, use `toScene()` and
1116
+ * {@link renderToString}.
1117
+ */
1118
+ interface Renderer<TOutput extends RenderOutput = RenderOutput> {
1119
+ /**
1120
+ * Renders a scene into the chart's container, after the `scene` phase
1121
+ * and on every update and resize. From the second render on, it gets
1122
+ * the previous render as `update`: a renderer that changes its previous
1123
+ * output in place returns `patched: true` and its `changes`; one that
1124
+ * ignores `update` replaces its output, as the DOM renderer does.
1125
+ * @param scene The scene to render, its root the `svg`
1126
+ * @param target The chart's container element
1127
+ * @param update The previous render, from the chart's second render on
1128
+ */
1129
+ render(scene: SceneNode, target: Element, update?: RenderUpdate<TOutput>): TOutput;
1130
+ /**
1131
+ * Measures text for layout, in the container so its CSS applies;
1132
+ * without it, Chartist estimates text sizes.
1133
+ */
1134
+ readonly measureText?: MeasureText;
1135
+ /**
1136
+ * Reads computed styles for layout, in the container so its CSS
1137
+ * applies; without it, layout uses its defaults (a donut's ring is
1138
+ * laid out for 60 px).
1139
+ */
1140
+ readonly measureStyle?: MeasureStyle;
1141
+ /** The default label mode of this renderer; `html` if omitted. */
1142
+ readonly labels?: LabelMode;
1143
+ }
1144
+ //#endregion
982
1145
  //#region src/charts/types.d.ts
983
1146
  /**
984
1147
  * The 1.x events every chart class emits and their payloads, by event name.
@@ -1175,47 +1338,6 @@ interface PipelineOptions {
1175
1338
  readonly preset?: ResolvedConfig['preset'];
1176
1339
  }
1177
1340
  //#endregion
1178
- //#region src/render/types.d.ts
1179
- /**
1180
- * What a renderer returns from `render()`. The `render` and `mount` phase
1181
- * events pass it on as `output`.
1182
- */
1183
- interface RenderOutput {
1184
- /** The rendered element of a scene node, if the output is DOM. */
1185
- readonly elementOf?: (node: SceneNode) => Element | undefined;
1186
- /** Removes the output again. */
1187
- readonly remove?: () => void;
1188
- }
1189
- /**
1190
- * Turns a scene into output. `chart()` renders inline SVG into its
1191
- * container with the DOM renderer, unless its config sets a `renderer`.
1192
- * To get markup instead, without a DOM, use `toScene()` and
1193
- * {@link renderToString}.
1194
- * @experimental
1195
- */
1196
- interface Renderer<TOutput extends RenderOutput = RenderOutput> {
1197
- /**
1198
- * Renders a scene into the chart's container, after the `scene` phase
1199
- * and on every update and resize.
1200
- * @param scene The scene to render, its root the `svg`
1201
- * @param target The chart's container element
1202
- */
1203
- render(scene: SceneNode, target: Element): TOutput;
1204
- /**
1205
- * Measures text for layout, in the container so its CSS applies;
1206
- * without it, Chartist estimates text sizes.
1207
- */
1208
- readonly measureText?: MeasureText;
1209
- /**
1210
- * Reads computed styles for layout, in the container so its CSS
1211
- * applies; without it, layout uses its defaults (a donut's ring is
1212
- * laid out for 60 px).
1213
- */
1214
- readonly measureStyle?: MeasureStyle;
1215
- /** The default label mode of this renderer; `html` if omitted. */
1216
- readonly labels?: LabelMode;
1217
- }
1218
- //#endregion
1219
1341
  //#region src/responsive/responsive.d.ts
1220
1342
  /**
1221
1343
  * Responsive entries: `[condition, overrides]` pairs, merged in order when
@@ -1226,7 +1348,9 @@ interface Renderer<TOutput extends RenderOutput = RenderOutput> {
1226
1348
  /**
1227
1349
  * A container query condition for a responsive entry, created with
1228
1350
  * {@link container}.
1229
- * @experimental
1351
+ * @experimental It rests on `Element.matchContainer()`, a draft standard
1352
+ * (w3c/csswg-drafts#6205), through a polyfill: it may still change in a
1353
+ * 2.x minor.
1230
1354
  */
1231
1355
  interface ContainerCondition {
1232
1356
  /** Always `container`: tells the condition from a media query string. */
@@ -1239,14 +1363,12 @@ interface ContainerCondition {
1239
1363
  * `(max-width: 640px)` (as in 1.x), or a {@link container} condition.
1240
1364
  * Media queries are matched in the window of the chart's container, so a
1241
1365
  * chart in an iframe follows the iframe's viewport.
1242
- * @experimental
1243
1366
  */
1244
1367
  type ResponsiveCondition = string | ContainerCondition;
1245
1368
  /**
1246
1369
  * A responsive entry: a condition and the overrides that apply while it
1247
1370
  * matches, e.g. `['(max-width: 640px)', { showPoint: false }]`. Matching
1248
1371
  * entries apply in order, so later ones win.
1249
- * @experimental
1250
1372
  */
1251
1373
  type ResponsiveEntry<T> = readonly [ResponsiveCondition, T];
1252
1374
  /**
@@ -1282,13 +1404,14 @@ type ResponsiveEntry<T> = readonly [ResponsiveCondition, T];
1282
1404
  * ]
1283
1405
  * );
1284
1406
  * ```
1285
- * @experimental
1407
+ * @experimental It rests on `Element.matchContainer()`, a draft standard
1408
+ * (w3c/csswg-drafts#6205), through a polyfill: it may still change in a
1409
+ * 2.x minor.
1286
1410
  */
1287
1411
  export declare function container(query: string): ContainerCondition;
1288
1412
  /**
1289
1413
  * Watches the conditions of a {@link ResponsiveSet}'s entries, as its
1290
1414
  * `watch()` returns it: which entries match, and when that changes.
1291
- * @experimental
1292
1415
  */
1293
1416
  interface ResponsiveWatcher {
1294
1417
  /** Indexes of the matching entries, as of the last `check()`. */
@@ -1302,7 +1425,6 @@ interface ResponsiveWatcher {
1302
1425
  * Responsive entries for `chart()`, with the watcher that evaluates them.
1303
1426
  * Created by `responsive()`, so charts without responsive entries don't
1304
1427
  * bundle the watcher.
1305
- * @experimental
1306
1428
  */
1307
1429
  interface ResponsiveSet<T> {
1308
1430
  /** The entries as given to `responsive()`. */
@@ -1359,7 +1481,6 @@ interface ResponsiveSet<T> {
1359
1481
  * ])
1360
1482
  * });
1361
1483
  * ```
1362
- * @experimental
1363
1484
  */
1364
1485
  export declare function responsive<T>(entries: readonly ResponsiveEntry<T>[]): ResponsiveSet<T>;
1365
1486
  //#endregion
@@ -1379,7 +1500,6 @@ export declare function responsive<T>(entries: readonly ResponsiveEntry<T>[]): R
1379
1500
  * ```
1380
1501
  *
1381
1502
  * `chartist/compat` declares the 1.x events (`draw`, `created`, …).
1382
- * @experimental
1383
1503
  */
1384
1504
  interface ChartEvents {
1385
1505
  /**
@@ -1437,7 +1557,6 @@ type CustomEventName = keyof ChartEvents & string;
1437
1557
  *
1438
1558
  * barChart('#chart', { series: [[5, 4, 3, 7]] }, { plugins: [threshold(5)] });
1439
1559
  * ```
1440
- * @experimental
1441
1560
  */
1442
1561
  interface ChartPlugin<TOptions = unknown> {
1443
1562
  /** Names the plugin. Prefix your custom events with it to keep them apart. */
@@ -1453,10 +1572,53 @@ interface ChartPlugin<TOptions = unknown> {
1453
1572
  * chart's handle. Listeners registered here stay for every later render,
1454
1573
  * after updates and resizes too, and `off(name)` without a listener
1455
1574
  * leaves them alone: remove one with its reference.
1575
+ *
1576
+ * Return a function to undo what `install` set up outside the chart,
1577
+ * such as a listener on the document: `destroy()` calls it once, after
1578
+ * the chart's output is removed. `detach()` doesn't.
1456
1579
  * @param chart The chart's handle, to listen to events and emit them.
1457
1580
  * @param options The options of a `[plugin, options]` entry, if any.
1581
+ * @returns A cleanup function for `destroy()`, or anything else, which is
1582
+ * ignored (so `install: chart => chart.on(…)` stays valid).
1583
+ */
1584
+ install(chart: ChartHandle, options?: TOptions): unknown;
1585
+ /**
1586
+ * Gives the keyframes of a node's update animation, for nodes that don't
1587
+ * move well number by number, such as a path the plugin draws. A
1588
+ * renderer that animates updates (`smilAnimations()` from
1589
+ * `chartist/live`) asks it once per update, never per frame, with the
1590
+ * progress points of the chart's easing: 0 is the previous node, 1 the
1591
+ * new one, and points beyond them come from an easing that overshoots.
1592
+ * Plugins are asked in their order, before the layer that drew the node;
1593
+ * the first one that returns keyframes wins.
1594
+ *
1595
+ * @example
1596
+ * ```ts
1597
+ * import type { ChartPlugin } from 'chartist';
1598
+ *
1599
+ * // Turns the gauge needle the plugin draws (its angle in `ct:angle`),
1600
+ * // instead of morphing its path.
1601
+ * const needle: ChartPlugin = {
1602
+ * name: 'needle',
1603
+ * install() {},
1604
+ * keyframes(previous, next, progress) {
1605
+ * if (!next.classes.includes('needle')) {
1606
+ * return undefined;
1607
+ * }
1608
+ * const from = Number(previous.attrs['ct:angle']);
1609
+ * const to = Number(next.attrs['ct:angle']);
1610
+ * return progress.map(p => ({
1611
+ * transform: `rotate(${from + (to - from) * p} 100 100)`
1612
+ * }));
1613
+ * }
1614
+ * };
1615
+ * ```
1616
+ * @param previous The node in the previous scene
1617
+ * @param next The node in the new scene
1618
+ * @param progress The progress points to give attributes for
1619
+ * @returns One set of attributes per progress point, or nothing.
1458
1620
  */
1459
- install(chart: ChartHandle, options?: TOptions): void;
1621
+ keyframes?(previous: SceneNode, next: SceneNode, progress: readonly number[]): Keyframes | undefined;
1460
1622
  }
1461
1623
  /**
1462
1624
  * A plugin paired with its options, as {@link withOptions} creates it.
@@ -1477,7 +1639,6 @@ type PluginEntry = ChartPlugin<any> | PluginWithOptions<any>;
1477
1639
  *
1478
1640
  * Without `axes`, layers draw into the whole chart area; the pie layer
1479
1641
  * needs `coordinates: 'polar'`. {@link toScene} takes the same config.
1480
- * @experimental
1481
1642
  */
1482
1643
  interface ChartConfig extends PipelineOptions {
1483
1644
  /**
@@ -1504,14 +1665,12 @@ interface ChartConfig extends PipelineOptions {
1504
1665
  * The part of a {@link ChartConfig} that responsive entries can override:
1505
1666
  * everything but `responsive`, `plugins`, `on` and `renderer`. The
1506
1667
  * matching entries merge over the config in order, shallowly.
1507
- * @experimental
1508
1668
  */
1509
1669
  type ChartOverrides = Partial<Omit<ChartConfig, 'responsive' | 'plugins' | 'on' | 'renderer'>>;
1510
1670
  /**
1511
1671
  * The handle {@link chart} returns: update or remove the chart, and listen
1512
1672
  * to its events. Plugins get the same handle in `install`. The methods
1513
1673
  * other than `destroy` and `emit` return the handle, so calls chain.
1514
- * @experimental
1515
1674
  */
1516
1675
  interface ChartHandle {
1517
1676
  /** The element the chart renders into (undefined in `toScene`). */
@@ -1590,7 +1749,6 @@ interface ChartHandle {
1590
1749
  * { plugins: [withOptions(lastPoint, { className: 'ct-last' })] }
1591
1750
  * );
1592
1751
  * ```
1593
- * @experimental
1594
1752
  */
1595
1753
  export declare function withOptions<TOptions>(plugin: ChartPlugin<TOptions>, options: TOptions): PluginWithOptions<TOptions>;
1596
1754
  //#endregion
@@ -1623,7 +1781,6 @@ interface LineSeriesOptions {
1623
1781
  * The options of the {@link line} layer. Without them, it draws every
1624
1782
  * series as a smooth line with points and no area, on the first X and Y
1625
1783
  * axis.
1626
- * @experimental
1627
1784
  */
1628
1785
  interface LineLayerOptions extends LineSeriesOptions {
1629
1786
  /** Series to draw, by index or name; default: all series. */
@@ -1694,7 +1851,6 @@ interface LineLayerOptions extends LineSeriesOptions {
1694
1851
  * ]
1695
1852
  * });
1696
1853
  * ```
1697
- * @experimental
1698
1854
  */
1699
1855
  export declare function line(options?: LineLayerOptions): Layer;
1700
1856
  //#endregion
@@ -1753,21 +1909,20 @@ interface PresetState<TData = unknown, TOptions = unknown, TKind extends string
1753
1909
  * // Areas from now on; the other options stay.
1754
1910
  * chart.setOptions({ showArea: true });
1755
1911
  * ```
1756
- * @experimental
1757
1912
  */
1758
1913
  interface PresetHandle<TOptions> extends ChartHandle {
1759
1914
  /**
1760
1915
  * Changes the options and redraws: they extend the current options, or
1761
1916
  * with `{ replace: true }`, the defaults, dropping the options given
1762
- * before. Matching responsive options still apply on top. `plugins` and
1763
- * `on` can't change. Coming from 1.x, `setOptions(options)` is
1917
+ * before. Matching responsive options still apply on top. `plugins`,
1918
+ * `on` and `renderer` can't change. Coming from 1.x, `setOptions(options)` is
1764
1919
  * `update(undefined, options, true)` and
1765
1920
  * `setOptions(options, { replace: true })` is `update(undefined, options)`.
1766
1921
  * @param options The options to change.
1767
1922
  * @param how `replace: true` starts from the defaults instead of the
1768
1923
  * current options.
1769
1924
  */
1770
- setOptions(options: Omit<TOptions, 'plugins' | 'on'>, how?: {
1925
+ setOptions(options: Omit<TOptions, 'plugins' | 'on' | 'renderer'>, how?: {
1771
1926
  readonly replace?: boolean;
1772
1927
  }): this;
1773
1928
  }
@@ -1800,7 +1955,6 @@ type PresetAxisOptions = Omit<AxisOptions, 'type'> & {
1800
1955
  * { layers: { above: [targetLine({ value: 1000 })] } }
1801
1956
  * );
1802
1957
  * ```
1803
- * @experimental
1804
1958
  */
1805
1959
  interface PresetLayers {
1806
1960
  /** Layers drawn above the grid and below the chart's series. */
@@ -1811,7 +1965,6 @@ interface PresetLayers {
1811
1965
  /**
1812
1966
  * Responsive options of presets: the 1.x media query pairs, plus container
1813
1967
  * conditions (`container()`). Matching entries extend the options in order.
1814
- * @experimental
1815
1968
  */
1816
1969
  type PresetResponsiveOptions<T> = readonly ResponsiveEntry<T>[];
1817
1970
  //#endregion
@@ -1819,7 +1972,6 @@ type PresetResponsiveOptions<T> = readonly ResponsiveEntry<T>[];
1819
1972
  /**
1820
1973
  * Options of `lineChart`: the 1.x `LineChart` options; axis types may also
1821
1974
  * be v2 axis factories.
1822
- * @experimental
1823
1975
  */
1824
1976
  type LineChartPresetOptions = Omit<LineChartOptions, 'axisX' | 'axisY' | 'plugins' | 'series'> & {
1825
1977
  /** v2 plugins; convert 1.x plugins with `fromLegacyPlugin`. */
@@ -1830,6 +1982,13 @@ type LineChartPresetOptions = Omit<LineChartOptions, 'axisX' | 'axisY' | 'plugin
1830
1982
  * so they see it too.
1831
1983
  */
1832
1984
  readonly on?: PhaseListeners;
1985
+ /**
1986
+ * Turns the scene into output, as `renderer` in the config of
1987
+ * `chart()`: the DOM renderer by default, or `liveDomRenderer()` from
1988
+ * `chartist/live` for a chart that changes in place on updates. It can't
1989
+ * change after the chart is created.
1990
+ */
1991
+ readonly renderer?: Renderer;
1833
1992
  /** Extra layers below or above the chart's lines. */
1834
1993
  readonly layers?: PresetLayers;
1835
1994
  /** Options per series name: only these five apply per series. */
@@ -1860,14 +2019,12 @@ type LinePresetState = PresetState<LineChartData, LineChartPresetOptions, 'line'
1860
2019
  * toScene(config, { width: 600, height: 300 })
1861
2020
  * );
1862
2021
  * ```
1863
- * @experimental
1864
2022
  */
1865
2023
  export declare function lineChartConfig(data: LineChartData, options?: LineChartPresetOptions): ChartConfig;
1866
2024
  /**
1867
2025
  * Creates a line chart with the 1.x options and output, rendered
1868
2026
  * synchronously. Plugins must be v2 plugins; convert 1.x plugins with
1869
2027
  * `fromLegacyPlugin` from `chartist/compat`.
1870
- * @experimental
1871
2028
  */
1872
2029
  export declare function lineChart(target: string | Element, data: LineChartData, options?: LineChartPresetOptions, responsiveOptions?: PresetResponsiveOptions<LineChartPresetOptions>): PresetHandle<LineChartPresetOptions>;
1873
2030
  //#endregion
@@ -1981,7 +2138,6 @@ export type BarChartEventsTypes = BaseChartEventsTypes<BarChartCreatedEvent, Axe
1981
2138
  /**
1982
2139
  * Options of `barChart`: the 1.x `BarChart` options; axis types may also be
1983
2140
  * v2 axis factories.
1984
- * @experimental
1985
2141
  */
1986
2142
  type BarChartPresetOptions = Omit<BarChartOptions, 'axisX' | 'axisY' | 'plugins' | 'stackMode'> & {
1987
2143
  /** v2 plugins; convert 1.x plugins with `fromLegacyPlugin`. */
@@ -1992,6 +2148,13 @@ type BarChartPresetOptions = Omit<BarChartOptions, 'axisX' | 'axisY' | 'plugins'
1992
2148
  * so they see it too.
1993
2149
  */
1994
2150
  readonly on?: PhaseListeners;
2151
+ /**
2152
+ * Turns the scene into output, as `renderer` in the config of
2153
+ * `chart()`: the DOM renderer by default, or `liveDomRenderer()` from
2154
+ * `chartist/live` for a chart that changes in place on updates. It can't
2155
+ * change after the chart is created.
2156
+ */
2157
+ readonly renderer?: Renderer;
1995
2158
  /** Extra layers below or above the chart's bars. */
1996
2159
  readonly layers?: PresetLayers;
1997
2160
  /**
@@ -2014,14 +2177,12 @@ type BarPresetState = PresetState<BarChartData, BarChartPresetOptions, 'bar'>;
2014
2177
  * options, without a container: the bar layer with its axes, grid and labels, horizontal or stacked as the options say. Pass it to `toScene()` to render
2015
2178
  * the preset chart with another renderer. Responsive options and the
2016
2179
  * inline size style of the root svg are left out; both need a container.
2017
- * @experimental
2018
2180
  */
2019
2181
  export declare function barChartConfig(data: BarChartData, options?: BarChartPresetOptions): ChartConfig;
2020
2182
  /**
2021
2183
  * Creates a bar chart with the 1.x options and output, rendered
2022
2184
  * synchronously. Plugins must be v2 plugins; convert 1.x plugins with
2023
2185
  * `fromLegacyPlugin` from `chartist/compat`.
2024
- * @experimental
2025
2186
  */
2026
2187
  export declare function barChart(target: string | Element, data: BarChartData, options?: BarChartPresetOptions, responsiveOptions?: PresetResponsiveOptions<BarChartPresetOptions>): PresetHandle<BarChartPresetOptions>;
2027
2188
  //#endregion
@@ -2184,7 +2345,6 @@ export type PieChartEventsTypes = BaseChartEventsTypes<PieChartCreatedEvent, Sli
2184
2345
  /**
2185
2346
  * Options of `pieChart`: the 1.x `PieChart` options, with v2 plugins and
2186
2347
  * phase listeners.
2187
- * @experimental
2188
2348
  */
2189
2349
  type PieChartPresetOptions = Omit<PieChartOptions, 'plugins'> & {
2190
2350
  /** v2 plugins; convert 1.x plugins with `fromLegacyPlugin`. */
@@ -2195,6 +2355,13 @@ type PieChartPresetOptions = Omit<PieChartOptions, 'plugins'> & {
2195
2355
  * so they see it too.
2196
2356
  */
2197
2357
  readonly on?: PhaseListeners;
2358
+ /**
2359
+ * Turns the scene into output, as `renderer` in the config of
2360
+ * `chart()`: the DOM renderer by default, or `liveDomRenderer()` from
2361
+ * `chartist/live` for a chart that changes in place on updates. It can't
2362
+ * change after the chart is created.
2363
+ */
2364
+ readonly renderer?: Renderer;
2198
2365
  /** Extra layers below or above the pie's slices, in polar coordinates. */
2199
2366
  readonly layers?: PresetLayers;
2200
2367
  };
@@ -2205,14 +2372,12 @@ type PiePresetState = PresetState<PieChartData, PieChartPresetOptions, 'pie'>;
2205
2372
  * options, without a container: the pie layer with its labels. Pass it to `toScene()` to render
2206
2373
  * the preset chart with another renderer. Responsive options and the
2207
2374
  * inline size style of the root svg are left out; both need a container.
2208
- * @experimental
2209
2375
  */
2210
2376
  export declare function pieChartConfig(data: PieChartData, options?: PieChartPresetOptions): ChartConfig;
2211
2377
  /**
2212
2378
  * Creates a pie or donut chart with the 1.x options and output, rendered
2213
2379
  * synchronously. Plugins must be v2 plugins; convert 1.x plugins with
2214
2380
  * `fromLegacyPlugin` from `chartist/compat`.
2215
- * @experimental
2216
2381
  */
2217
2382
  export declare function pieChart(target: string | Element, data: PieChartData, options?: PieChartPresetOptions, responsiveOptions?: PresetResponsiveOptions<PieChartPresetOptions>): PresetHandle<PieChartPresetOptions>;
2218
2383
  //#endregion
@@ -2339,7 +2504,6 @@ interface LayerContext {
2339
2504
  /**
2340
2505
  * What a layer's `extent` gets: its series as the axes see them, and the
2341
2506
  * ids of the axes it draws on.
2342
- * @experimental
2343
2507
  */
2344
2508
  interface ExtentContext {
2345
2509
  /**
@@ -2358,7 +2522,6 @@ interface ExtentContext {
2358
2522
  * use the same contract: the "Custom layers" guide explains each field
2359
2523
  * and how to write and share a layer.
2360
2524
  * @see https://chartist.dev/docs/custom-layers/
2361
- * @experimental
2362
2525
  */
2363
2526
  interface Layer {
2364
2527
  /** Name used in error messages, e.g. `line`. */
@@ -2439,6 +2602,42 @@ interface Layer {
2439
2602
  * ```
2440
2603
  */
2441
2604
  refine?(node: SceneNode, context: LayerContext): SceneNode | undefined;
2605
+ /**
2606
+ * Gives the keyframes of an update animation for one of the layer's
2607
+ * nodes, for attributes that don't move well number by number, such as
2608
+ * an arc that should turn around its center. A renderer that animates
2609
+ * updates (`smilAnimations()` from `chartist/live`) asks once per update,
2610
+ * never per frame, with the progress points of the chart's easing: 0 is
2611
+ * the previous node, 1 the new one, and points beyond them come from an
2612
+ * easing that overshoots. Plugins with `keyframes` are asked first.
2613
+ * Leave it out to animate the layer's nodes number by number.
2614
+ *
2615
+ * @param previous The node in the previous scene
2616
+ * @param next The node in the new scene
2617
+ * @param context The context this layer's `compose` got for `next`
2618
+ * @param progress The progress points to give attributes for
2619
+ * @returns One set of attributes per progress point, or nothing.
2620
+ *
2621
+ * @example
2622
+ * ```ts
2623
+ * import type { Layer } from 'chartist';
2624
+ *
2625
+ * // A gauge whose needle (its angle in `ct:angle`) turns on an update.
2626
+ * declare const gauge: Layer;
2627
+ * const turningGauge: Layer = {
2628
+ * ...gauge,
2629
+ * keyframes: (previous, next, context, progress) => {
2630
+ * const from = Number(previous.attrs['ct:angle']);
2631
+ * const to = Number(next.attrs['ct:angle']);
2632
+ * const { x1, y1, width, height } = context.area;
2633
+ * return progress.map(p => ({
2634
+ * transform: `rotate(${from + (to - from) * p} ${x1 + width / 2} ${y1 - height / 2})`
2635
+ * }));
2636
+ * }
2637
+ * };
2638
+ * ```
2639
+ */
2640
+ keyframes?(previous: SceneNode, next: SceneNode, context: LayerContext, progress: readonly number[]): Keyframes | undefined;
2442
2641
  }
2443
2642
  /** Options after the `resolve` phase: defaults applied, listeners removed. */
2444
2643
  interface ResolvedConfig {
@@ -2535,27 +2734,61 @@ interface PhaseEvents {
2535
2734
  scene: {
2536
2735
  readonly scene: SceneNode;
2537
2736
  };
2538
- /** The renderer has written the scene; `output` is what it returned. */
2539
- render: {
2540
- readonly scene: SceneNode;
2541
- readonly output: RenderOutput;
2542
- };
2543
- /** The rendered SVG is in the page; touch elements only here. */
2544
- mount: {
2545
- readonly scene: SceneNode;
2546
- readonly output: RenderOutput;
2547
- /** The rendered element of a scene node, if the renderer has one. */
2737
+ /**
2738
+ * The renderer has applied the scene: created, replaced or changed the
2739
+ * output in place. `output` is what it returned.
2740
+ */
2741
+ render: RenderEvent;
2742
+ /**
2743
+ * The output is in the page; touch elements only here. Return a function
2744
+ * to undo what the listener did: it runs before the next render changes
2745
+ * the output, and on `destroy()`.
2746
+ */
2747
+ mount: RenderEvent & {
2748
+ /**
2749
+ * The rendered element of a scene node, if the renderer has one; for a
2750
+ * node of a `remove` change, the element just taken out of the page.
2751
+ */
2548
2752
  readonly elementOf: (node: SceneNode) => Element | undefined;
2753
+ /**
2754
+ * The timing of the update animation the renderer started, if it
2755
+ * animated this render. Animate what your plugin draws with it, so it
2756
+ * moves in step with the chart.
2757
+ */
2758
+ readonly animation?: UpdateAnimation;
2549
2759
  };
2550
2760
  }
2761
+ /**
2762
+ * What the `render` and `mount` events carry about a render: the scene, the
2763
+ * renderer's output, why the chart rendered and what changed.
2764
+ */
2765
+ interface RenderEvent {
2766
+ /** The scene the renderer applied. */
2767
+ readonly scene: SceneNode;
2768
+ /** What the renderer returned. */
2769
+ readonly output: RenderOutput;
2770
+ /** Why the chart rendered, e.g. `update` or `resize`. */
2771
+ readonly cause: RenderCause;
2772
+ /** The previous render's scene; absent on the first render. */
2773
+ readonly previous?: SceneNode;
2774
+ /**
2775
+ * What the render did to the output, in document order. When the
2776
+ * renderer changed its output in place (`liveDomRenderer()` from
2777
+ * `chartist/live`), these are its changes; otherwise every node of the
2778
+ * previous scene is removed and every node of the new one added.
2779
+ */
2780
+ readonly changes: readonly SceneChange[];
2781
+ }
2551
2782
  /** The name of a pipeline phase, such as `compose`: a key of {@link PhaseEvents}. */
2552
2783
  type PhaseName = keyof PhaseEvents;
2553
2784
  /**
2554
2785
  * What a phase listener returns: a new payload to transform the phase, or
2555
2786
  * nothing to keep it. `compose` listeners may return `null` to drop the
2556
- * node. `render` and `mount` listeners return nothing (they observe).
2787
+ * node. `render` listeners return nothing (they observe). A function a
2788
+ * `mount` listener returns is its cleanup; other values are ignored, so
2789
+ * `() => chart.detach()` stays a valid listener.
2557
2790
  */
2558
- type PhaseResult<K extends PhaseName> = K extends 'render' | 'mount' ? void : PhaseEvents[K] | (K extends 'compose' ? null : never) | undefined | void;
2791
+ type PhaseResult<K extends PhaseName> = K extends 'render' ? void : K extends 'mount' ? unknown : PhaseEvents[K] | (K extends 'compose' ? null : never) | undefined | void;
2559
2792
  /**
2560
2793
  * A listener of one phase: gets the phase's payload and may return a new
2561
2794
  * one (see {@link PhaseResult}). Listeners of a phase run in the order they
@@ -2610,7 +2843,6 @@ interface AxisContext {
2610
2843
  /**
2611
2844
  * A range of values on an axis, from `low` to `high`: what a layer reports
2612
2845
  * in {@link Layer.extent}.
2613
- * @experimental
2614
2846
  */
2615
2847
  interface AxisExtent {
2616
2848
  /** The lowest value. */
@@ -2622,7 +2854,6 @@ interface AxisExtent {
2622
2854
  * A positioned axis: ticks, range and projection into px along the axis.
2623
2855
  * An {@link AxisFactory} creates it once the chart area is known; layers
2624
2856
  * read it to place what they draw.
2625
- * @experimental
2626
2857
  */
2627
2858
  interface ScaleAxis {
2628
2859
  /** Which way the axis runs: `x` or `y`. */
@@ -2659,7 +2890,6 @@ interface ScaleAxis {
2659
2890
  * {@link stepAxis}, {@link autoScaleAxis} and {@link fixedScaleAxis} return
2660
2891
  * one; write your own for a scale they don't cover. It goes in the `type`
2661
2892
  * of an axis.
2662
- * @experimental
2663
2893
  */
2664
2894
  interface AxisFactory {
2665
2895
  /**
@@ -2686,7 +2916,6 @@ interface AxisSetup extends Omit<AxisOptions, 'type'> {
2686
2916
  /**
2687
2917
  * An axis of a composed chart, in the list form of {@link cartesianAxes}:
2688
2918
  * an id that layers bind to, a side, a type and the 1.x axis options.
2689
- * @experimental
2690
2919
  */
2691
2920
  interface AxisDefinition extends AxisSetup {
2692
2921
  /**
@@ -2756,7 +2985,6 @@ interface ChartAxes {
2756
2985
  * Axes for a chart's `axes` option, created by {@link cartesianAxes}. The
2757
2986
  * pipeline asks them for the chart area and, after `layout`, to create the
2758
2987
  * axes. Charts without axes don't bundle any of this.
2759
- * @experimental
2760
2988
  */
2761
2989
  interface CartesianAxes {
2762
2990
  /** The config the axes were created from, with the default offsets filled in. */
@@ -2874,6 +3102,11 @@ interface PathContext extends SeriesContext {
2874
3102
  readonly values: NormalizedSeries;
2875
3103
  /** The path as drawn (a copy, safe to change). */
2876
3104
  readonly path: SvgPath;
3105
+ /**
3106
+ * The interpolation the path was drawn with (`lineSmooth`), so the path
3107
+ * can be drawn again through other points, e.g. for update animations.
3108
+ */
3109
+ readonly smoothing: LineInterpolation;
2877
3110
  }
2878
3111
  /**
2879
3112
  * The context of a `slice` node: a pie or donut slice, which is one series
@@ -3043,6 +3276,8 @@ interface BandContext extends NoSeries {
3043
3276
  readonly series?: readonly number[];
3044
3277
  /** The piece's outline as drawn (a copy, safe to change). */
3045
3278
  readonly path: SvgPath;
3279
+ /** The interpolation the edges were drawn with (`lineSmooth`). */
3280
+ readonly smoothing: LineInterpolation;
3046
3281
  }
3047
3282
  /** The attributes of a target label's SVG `text` element. */
3048
3283
  interface TextAttrs {
@@ -3413,7 +3648,6 @@ export declare function node(name: string, attributes?: Record<string, AttrValue
3413
3648
  /**
3414
3649
  * How an SVG text label sits in its label box, as set in the `align`
3415
3650
  * option of {@link axisLabels}.
3416
- * @experimental
3417
3651
  */
3418
3652
  interface LabelAlign {
3419
3653
  /** Aligns the text to the box's left (`start`), center or right (`end`). */
@@ -4331,7 +4565,6 @@ interface Dot$1 {
4331
4565
  /**
4332
4566
  * The options of the {@link pie} layer. Without them, it draws a filled
4333
4567
  * pie from the top, with a label halfway out on each slice.
4334
- * @experimental
4335
4568
  */
4336
4569
  interface PieLayerOptions {
4337
4570
  /** Where the first slice starts, in degrees clockwise from the top. */
@@ -4420,7 +4653,6 @@ export declare function determineAnchorPosition(center: Dot$1, label: Dot$1, dir
4420
4653
  * className: 'ct-chart-donut'
4421
4654
  * });
4422
4655
  * ```
4423
- * @experimental
4424
4656
  */
4425
4657
  export declare function pie(options?: PieLayerOptions): Layer;
4426
4658
  //#endregion
@@ -4673,7 +4905,6 @@ interface NodeQuery {
4673
4905
  * }
4674
4906
  * );
4675
4907
  * ```
4676
- * @experimental
4677
4908
  */
4678
4909
  export declare function findAll<R extends NodeRole>(scene: SceneNode, query: NodeQuery & {
4679
4910
  readonly role: R;
@@ -4724,7 +4955,6 @@ export declare function findAll(scene: SceneNode, query?: NodeQuery): SceneNode[
4724
4955
  * });
4725
4956
  * const markup = mapped ? renderToString(mapped) : '';
4726
4957
  * ```
4727
- * @experimental
4728
4958
  */
4729
4959
  export declare function mapNodes(scene: SceneNode, mapper: (current: SceneNode) => SceneNode | null | undefined | void): SceneNode | null;
4730
4960
  //#endregion
@@ -4732,7 +4962,6 @@ export declare function mapNodes(scene: SceneNode, mapper: (current: SceneNode)
4732
4962
  /**
4733
4963
  * What {@link domRenderer} returns from `render()`: the inline SVG it
4734
4964
  * added to the container.
4735
- * @experimental
4736
4965
  */
4737
4966
  interface DomRenderOutput extends RenderOutput {
4738
4967
  /** The chart's `svg` element, in the container. */
@@ -4742,11 +4971,59 @@ interface DomRenderOutput extends RenderOutput {
4742
4971
  /** Takes the SVG out of the container again. */
4743
4972
  readonly remove: () => void;
4744
4973
  }
4974
+ /**
4975
+ * Sets one scene attribute on an element as the DOM renderer does: names
4976
+ * with a known prefix (`ct:value`) in their namespace, and `style` through
4977
+ * the CSSOM, which a Content Security Policy allows. For renderers that
4978
+ * change elements they keep.
4979
+ *
4980
+ * @example
4981
+ * ```ts
4982
+ * import { applyAttribute } from 'chartist';
4983
+ *
4984
+ * const point = document.querySelector('.ct-point');
4985
+ * if (point) {
4986
+ * applyAttribute(point, 'ct:value', 12);
4987
+ * applyAttribute(point, 'style', 'stroke-width: 12px;');
4988
+ * }
4989
+ * ```
4990
+ * @param element The element to change
4991
+ * @param name The attribute's name, as in a scene node's `attrs`
4992
+ * @param value The attribute's value
4993
+ */
4994
+ export declare function applyAttribute(element: Element, name: string, value: string | number): void;
4995
+ /** What {@link renderElement} takes besides the node and the document. */
4996
+ interface RenderElementOptions {
4997
+ /** Creates the elements in the XHTML namespace, as inside a `foreignObject`. */
4998
+ readonly html?: boolean;
4999
+ /** Called for every node and the element created for it. */
5000
+ readonly created?: (node: SceneNode, element: Element) => void;
5001
+ }
5002
+ /**
5003
+ * Creates the element tree of a scene node as the DOM renderer does: SVG
5004
+ * elements, HTML elements inside a `foreignObject`, attributes set with
5005
+ * {@link applyAttribute}. For renderers that create elements.
5006
+ *
5007
+ * @example
5008
+ * ```ts
5009
+ * import { node, renderElement } from 'chartist';
5010
+ *
5011
+ * const dot = renderElement(node('circle', { cx: 5, cy: 5, r: 4 }, 'ct-dot'), document);
5012
+ * document.querySelector('svg')?.append(dot);
5013
+ * ```
5014
+ * @param current The node to create
5015
+ * @param document The document to create the elements in
5016
+ * @param options The namespace, and a callback for each created element
5017
+ * @returns The node's element, with its children
5018
+ */
5019
+ export declare function renderElement(current: SceneNode, document: Document, options?: RenderElementOptions): Element;
4745
5020
  /**
4746
5021
  * Creates the renderer `chart()` uses by default: it renders scenes as
4747
5022
  * inline SVG into the container, replacing an earlier Chartist SVG there
4748
- * (as 1.x does), and measures text and reads styles for layout in the
4749
- * container, so its CSS applies.
5023
+ * (as 1.x does) on every render, and measures text and reads styles for
5024
+ * layout in the container, so its CSS applies. It ignores the previous
5025
+ * render it gets from a chart's second render on; `liveDomRenderer()`
5026
+ * from `chartist/live` keeps its SVG and changes it instead.
4750
5027
  * Wrap it to change what every render puts on the page.
4751
5028
  *
4752
5029
  * @example
@@ -4772,7 +5049,6 @@ interface DomRenderOutput extends RenderOutput {
4772
5049
  * renderer
4773
5050
  * });
4774
5051
  * ```
4775
- * @experimental
4776
5052
  */
4777
5053
  export declare function domRenderer(): Renderer<DomRenderOutput>;
4778
5054
  //#endregion
@@ -4790,7 +5066,6 @@ export declare function domRenderer(): Renderer<DomRenderOutput>;
4790
5066
  * // The color of series `c`, the third.
4791
5067
  * export const third = seriesColors[2];
4792
5068
  * ```
4793
- * @experimental
4794
5069
  */
4795
5070
  export declare const seriesColors: readonly string[];
4796
5071
  //#endregion
@@ -4836,7 +5111,6 @@ export declare const seriesColors: readonly string[];
4836
5111
  * return renderToString(scene);
4837
5112
  * }
4838
5113
  * ```
4839
- * @experimental
4840
5114
  */
4841
5115
  export declare function renderToString(scene: SceneNode): string;
4842
5116
  //#endregion
@@ -4898,7 +5172,6 @@ export declare function renderToString(scene: SceneNode): string;
4898
5172
  * @param target The container element, or a CSS selector for it.
4899
5173
  * @param config The data, axes, layers and the rest of the chart.
4900
5174
  * @returns A handle to update the chart, listen to it or remove it.
4901
- * @experimental
4902
5175
  */
4903
5176
  export declare function chart(target: string | Element, config: ChartConfig): ChartHandle;
4904
5177
  //#endregion
@@ -4979,7 +5252,6 @@ interface SceneSize {
4979
5252
  *
4980
5253
  * export const markup = renderToString(scene);
4981
5254
  * ```
4982
- * @experimental
4983
5255
  */
4984
5256
  export declare function toScene(config: ChartConfig, size: SceneSize): SceneNode;
4985
5257
  //#endregion
@@ -5016,7 +5288,6 @@ export declare function toScene(config: ChartConfig, size: SceneSize): SceneNode
5016
5288
  * layers: [axisGrid(), line(), axisLabels()]
5017
5289
  * });
5018
5290
  * ```
5019
- * @experimental
5020
5291
  */
5021
5292
  export declare function stepAxis(): AxisFactory;
5022
5293
  /**
@@ -5057,7 +5328,6 @@ export declare function stepAxis(): AxisFactory;
5057
5328
  * layers: [axisGrid(), line(), axisLabels()]
5058
5329
  * });
5059
5330
  * ```
5060
- * @experimental
5061
5331
  */
5062
5332
  export declare function autoScaleAxis(): AxisFactory;
5063
5333
  /**
@@ -5098,7 +5368,6 @@ export declare function autoScaleAxis(): AxisFactory;
5098
5368
  * layers: [axisGrid(), line({ showLine: false }), axisLabels()]
5099
5369
  * });
5100
5370
  * ```
5101
- * @experimental
5102
5371
  */
5103
5372
  export declare function fixedScaleAxis(): AxisFactory;
5104
5373
  //#endregion
@@ -5161,7 +5430,6 @@ export declare function fixedScaleAxis(): AxisFactory;
5161
5430
  * `{ x, y }` form.
5162
5431
  * @param extra `reverseData` and `normalize`, for the list form (the
5163
5432
  * `{ x, y }` form takes them inline).
5164
- * @experimental
5165
5433
  */
5166
5434
  export declare function cartesianAxes(input: AxesConfig | readonly AxisDefinition[], extra?: Pick<AxesConfig, 'reverseData' | 'normalize'>): CartesianAxes;
5167
5435
  //#endregion
@@ -5185,7 +5453,6 @@ type BandEdgeOption = number | readonly BandEdgeValue[] | string | {
5185
5453
  /**
5186
5454
  * The options of the {@link band} layer: `low` and `high` edges, or a
5187
5455
  * `series` group.
5188
- * @experimental
5189
5456
  */
5190
5457
  interface BandOptions {
5191
5458
  /** The low edge: a constant value, values or a series. */
@@ -5277,7 +5544,6 @@ interface BandOptions {
5277
5544
  * ]
5278
5545
  * });
5279
5546
  * ```
5280
- * @experimental
5281
5547
  */
5282
5548
  export declare function band(options: BandOptions): Layer;
5283
5549
  //#endregion
@@ -5285,7 +5551,6 @@ export declare function band(options: BandOptions): Layer;
5285
5551
  /**
5286
5552
  * The options of the {@link bar} layer. Without them, it draws the bars of
5287
5553
  * each label side by side, 15 px apart, on the first X and Y axis.
5288
- * @experimental
5289
5554
  */
5290
5555
  interface BarLayerOptions {
5291
5556
  /** Series to draw, by index or name; default: all series. */
@@ -5372,7 +5637,6 @@ interface BarLayerOptions {
5372
5637
  * className: 'ct-chart-bar'
5373
5638
  * });
5374
5639
  * ```
5375
- * @experimental
5376
5640
  */
5377
5641
  export declare function bar(options?: BarLayerOptions): Layer;
5378
5642
  //#endregion
@@ -5381,7 +5645,6 @@ export declare function bar(options?: BarLayerOptions): Layer;
5381
5645
  * The options of the {@link targetLine} layer: the line's value, its
5382
5646
  * label and class, and the axis it's on. For several lines, add a layer
5383
5647
  * per line.
5384
- * @experimental
5385
5648
  */
5386
5649
  interface TargetLineOptions {
5387
5650
  /**
@@ -5452,7 +5715,6 @@ interface TargetLineOptions {
5452
5715
  * ]
5453
5716
  * });
5454
5717
  * ```
5455
- * @experimental
5456
5718
  */
5457
5719
  export declare function targetLine(options: TargetLineOptions): Layer;
5458
5720
  //#endregion
@@ -5460,7 +5722,6 @@ export declare function targetLine(options: TargetLineOptions): Layer;
5460
5722
  /**
5461
5723
  * The options of the {@link trendLine} layer. Without them, it draws a
5462
5724
  * trend line for every series, on the first X and Y axis.
5463
- * @experimental
5464
5725
  */
5465
5726
  interface TrendLineOptions {
5466
5727
  /** Series to draw a trend line for, by index or name; default: all series. */
@@ -5521,7 +5782,6 @@ interface TrendLineOptions {
5521
5782
  * layers: [axisGrid(), line(), trendLine(), axisLabels()]
5522
5783
  * });
5523
5784
  * ```
5524
- * @experimental
5525
5785
  */
5526
5786
  export declare function trendLine(options?: TrendLineOptions): Layer;
5527
5787
  //#endregion
@@ -5540,7 +5800,6 @@ interface AxisLayerClassNames extends AxisClassNames {
5540
5800
  }
5541
5801
  /**
5542
5802
  * The options of {@link axisGrid} and {@link axisLabels}.
5543
- * @experimental
5544
5803
  */
5545
5804
  interface AxisLayerOptions {
5546
5805
  /**
@@ -5554,7 +5813,6 @@ interface AxisLayerOptions {
5554
5813
  /**
5555
5814
  * The options of {@link axisLabels}: those of every axis layer, plus how
5556
5815
  * the labels are drawn.
5557
- * @experimental
5558
5816
  */
5559
5817
  interface AxisLabelsOptions extends AxisLayerOptions {
5560
5818
  /** HTML (`foreignObject`) or SVG `text`; default: the chart's mode. */
@@ -5602,7 +5860,6 @@ interface AxisLabelsOptions extends AxisLayerOptions {
5602
5860
  * ```
5603
5861
  * @param options The axes to draw and their classes; `background` adds a
5604
5862
  * `rect.ct-grid-background` over the chart area, behind the lines.
5605
- * @experimental
5606
5863
  */
5607
5864
  export declare function axisGrid(options?: AxisLayerOptions & {
5608
5865
  readonly background?: boolean;
@@ -5644,8 +5901,7 @@ export declare function axisGrid(options?: AxisLayerOptions & {
5644
5901
  * ]
5645
5902
  * });
5646
5903
  * ```
5647
- * @experimental
5648
5904
  */
5649
5905
  export declare function axisLabels(options?: AxisLabelsOptions): Layer;
5650
5906
  //#endregion
5651
- export { type AllPhasesListener, type Area, type AttrValue, type AxesConfig, type AxisContext, type AxisDefinition, type AxisDimension, type AxisExtent, type AxisFactory, type AxisLabelContext, type AxisLabelsOptions, type AxisLayerClassNames, type AxisLayerOptions, type AxisSetup, type AxisSide, type BandContext, type BandEdge, type BandEdgeOption, type BandEdgeValue, type BandOptions, type BarChartPresetOptions, type BarContext, type BarLayerOptions, type BarPresetState, type CartesianAxes, type ChartAxes, type ChartConfig, type ChartData, type ChartEvents, type ChartHandle, type ChartOverrides, type ChartPlugin, type ContainerCondition, type Coordinates, type CustomEventName, type DomRenderOutput, type ExtentContext, type GridContext, index_d_exports as Interpolation, type LabelAlign, type LabelMode, type Layer, type LayerContext, type Layout, type LegacyAxisClass, type LineAttrs, type LineChartPresetOptions, type LineLayerOptions, type LinePresetState, type LineSeriesOptions, type MeasureStyle, type MeasureStyleOptions, type MeasureText, type MeasureTextOptions, type NoSeries, type NodeContext, type NodeMeta, type NodeQuery, type NodeRole, type NodeRoles, type NormalizedChartData, type PathAttrs, type PathContext, type PhaseEvents, type PhaseListener, type PhaseListeners, type PhaseName, type PhaseResult, type PieChartPresetOptions, type PieLabelContext, type PieLayerOptions, type PiePresetState, type PlacedScaleAxis, type PlainNode, type PluginEntry, type PluginWithOptions, type Point, type PointContext, type PreparedData, type PreparedSeries, type PresetAxisOptions, type PresetHandle, type PresetLayers, type PresetResponsiveOptions, type PresetState, type RectAttrs, type RenderOutput, type Renderer, type ResolvedConfig, type ResponsiveCondition, type ResponsiveEntry, type ResponsiveSet, type ResponsiveWatcher, type RoleMeta, type RoleNode, type ScaleAxis, type SceneNode, type SceneNodeFields, type SceneNodeMethods, type SceneSize, type SeriesAttrs, type SeriesContext, type SeriesGroupContext, type SliceContext, type TargetLabelContext, type TargetLineContext, type TargetLineOptions, type TextAttrs, type TextMetrics, type TrendLineContext, type TrendLineOptions, type ValueContext };
5907
+ export { type AllPhasesListener, type Area, type AttrValue, type AxesConfig, type AxisContext, type AxisDefinition, type AxisDimension, type AxisExtent, type AxisFactory, type AxisLabelContext, type AxisLabelsOptions, type AxisLayerClassNames, type AxisLayerOptions, type AxisSetup, type AxisSide, type BandContext, type BandEdge, type BandEdgeOption, type BandEdgeValue, type BandOptions, type BarChartPresetOptions, type BarContext, type BarLayerOptions, type BarPresetState, type CartesianAxes, type ChartAxes, type ChartConfig, type ChartData, type ChartEvents, type ChartHandle, type ChartOverrides, type ChartPlugin, type ContainerCondition, type Coordinates, type CustomEventName, type DomRenderOutput, type ExtentContext, type GridContext, index_d_exports as Interpolation, type Keyframes, type LabelAlign, type LabelMode, type Layer, type LayerContext, type Layout, type LegacyAxisClass, type LineAttrs, type LineChartPresetOptions, type LineLayerOptions, type LinePresetState, type LineSeriesOptions, type MeasureStyle, type MeasureStyleOptions, type MeasureText, type MeasureTextOptions, type NoSeries, type NodeContext, type NodeMeta, type NodeQuery, type NodeRole, type NodeRoles, type NormalizedChartData, type PathAttrs, type PathContext, type PhaseEvents, type PhaseListener, type PhaseListeners, type PhaseName, type PhaseResult, type PieChartPresetOptions, type PieLabelContext, type PieLayerOptions, type PiePresetState, type PlacedScaleAxis, type PlainNode, type PluginEntry, type PluginWithOptions, type Point, type PointContext, type PreparedData, type PreparedSeries, type PresetAxisOptions, type PresetHandle, type PresetLayers, type PresetResponsiveOptions, type PresetState, type RectAttrs, type RenderCause, type RenderElementOptions, type RenderEvent, type RenderOutput, type RenderUpdate, type Renderer, type ResolvedConfig, type ResponsiveCondition, type ResponsiveEntry, type ResponsiveSet, type ResponsiveWatcher, type RoleMeta, type RoleNode, type ScaleAxis, type SceneChange, type SceneNode, type SceneNodeFields, type SceneNodeMethods, type SceneSize, type SeriesAttrs, type SeriesContext, type SeriesGroupContext, type SliceContext, type TargetLabelContext, type TargetLineContext, type TargetLineOptions, type TextAttrs, type TextMetrics, type TrendLineContext, type TrendLineOptions, type UpdateAnimation, type ValueContext };