teechart.js 4.0.4 → 5.0.0-beta.1

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 (274) hide show
  1. package/3D-COMPATIBILITY.md +45 -0
  2. package/README.md +463 -27
  3. package/dist/chunks/chart-p639xVyw.js +16 -0
  4. package/dist/chunks/chart-p639xVyw.js.map +1 -0
  5. package/dist/chunks/palette-series-DfyYptK1.js +16 -0
  6. package/dist/chunks/palette-series-DfyYptK1.js.map +1 -0
  7. package/dist/chunks/series-DeozLXIv.js +16 -0
  8. package/dist/chunks/series-DeozLXIv.js.map +1 -0
  9. package/dist/teechart.3d.esm.js +27 -0
  10. package/dist/teechart.3d.esm.js.map +1 -0
  11. package/dist/teechart.auto.esm.js +16 -0
  12. package/dist/teechart.auto.esm.js.map +1 -0
  13. package/dist/teechart.core.esm.js +16 -0
  14. package/dist/teechart.core.esm.js.map +1 -0
  15. package/dist/teechart.esm.js +16 -0
  16. package/dist/teechart.esm.js.map +1 -0
  17. package/dist/teechart.js +14 -3
  18. package/dist/teechart.js.map +1 -1
  19. package/dist/teechart.maps.esm.js +16 -0
  20. package/dist/teechart.maps.esm.js.map +1 -0
  21. package/dist/types/accessibility.d.ts +29 -0
  22. package/dist/types/accessibility.d.ts.map +1 -0
  23. package/dist/types/auto.d.ts +4 -0
  24. package/dist/types/auto.d.ts.map +1 -0
  25. package/dist/types/chart-options.d.ts +826 -0
  26. package/dist/types/chart-options.d.ts.map +1 -0
  27. package/dist/types/chart.d.ts +252 -0
  28. package/dist/types/chart.d.ts.map +1 -0
  29. package/dist/types/checkbox.d.ts +12 -0
  30. package/dist/types/checkbox.d.ts.map +1 -0
  31. package/dist/types/core/elements/axes.d.ts +17 -0
  32. package/dist/types/core/elements/axes.d.ts.map +1 -0
  33. package/dist/types/core/elements/axis-grid.d.ts +20 -0
  34. package/dist/types/core/elements/axis-grid.d.ts.map +1 -0
  35. package/dist/types/core/elements/axis-labels.d.ts +54 -0
  36. package/dist/types/core/elements/axis-labels.d.ts.map +1 -0
  37. package/dist/types/core/elements/axis-ticks.d.ts +19 -0
  38. package/dist/types/core/elements/axis-ticks.d.ts.map +1 -0
  39. package/dist/types/core/elements/axis-title.d.ts +16 -0
  40. package/dist/types/core/elements/axis-title.d.ts.map +1 -0
  41. package/dist/types/core/elements/axis.d.ts +125 -0
  42. package/dist/types/core/elements/axis.d.ts.map +1 -0
  43. package/dist/types/core/elements/chart-image.d.ts +13 -0
  44. package/dist/types/core/elements/chart-image.d.ts.map +1 -0
  45. package/dist/types/core/elements/font.d.ts +28 -0
  46. package/dist/types/core/elements/font.d.ts.map +1 -0
  47. package/dist/types/core/elements/format.d.ts +125 -0
  48. package/dist/types/core/elements/format.d.ts.map +1 -0
  49. package/dist/types/core/elements/gradient.d.ts +23 -0
  50. package/dist/types/core/elements/gradient.d.ts.map +1 -0
  51. package/dist/types/core/elements/legend-symbol.d.ts +49 -0
  52. package/dist/types/core/elements/legend-symbol.d.ts.map +1 -0
  53. package/dist/types/core/elements/legend.d.ts +131 -0
  54. package/dist/types/core/elements/legend.d.ts.map +1 -0
  55. package/dist/types/core/elements/margins.d.ts +9 -0
  56. package/dist/types/core/elements/margins.d.ts.map +1 -0
  57. package/dist/types/core/elements/panel.d.ts +13 -0
  58. package/dist/types/core/elements/panel.d.ts.map +1 -0
  59. package/dist/types/core/elements/scroll.d.ts +14 -0
  60. package/dist/types/core/elements/scroll.d.ts.map +1 -0
  61. package/dist/types/core/elements/shadow.d.ts +14 -0
  62. package/dist/types/core/elements/shadow.d.ts.map +1 -0
  63. package/dist/types/core/elements/stroke.d.ts +19 -0
  64. package/dist/types/core/elements/stroke.d.ts.map +1 -0
  65. package/dist/types/core/elements/wall.d.ts +13 -0
  66. package/dist/types/core/elements/wall.d.ts.map +1 -0
  67. package/dist/types/core/elements/zoom.d.ts +33 -0
  68. package/dist/types/core/elements/zoom.d.ts.map +1 -0
  69. package/dist/types/core/primitives.d.ts +33 -0
  70. package/dist/types/core/primitives.d.ts.map +1 -0
  71. package/dist/types/core.d.ts +96 -0
  72. package/dist/types/core.d.ts.map +1 -0
  73. package/dist/types/data/data-engine.d.ts +245 -0
  74. package/dist/types/data/data-engine.d.ts.map +1 -0
  75. package/dist/types/date.format.d.ts +5 -0
  76. package/dist/types/date.format.d.ts.map +1 -0
  77. package/dist/types/declarative-tools.d.ts +6 -0
  78. package/dist/types/declarative-tools.d.ts.map +1 -0
  79. package/dist/types/do-http-request.d.ts +2 -0
  80. package/dist/types/do-http-request.d.ts.map +1 -0
  81. package/dist/types/dom-tip.d.ts +41 -0
  82. package/dist/types/dom-tip.d.ts.map +1 -0
  83. package/dist/types/events.d.ts +82 -0
  84. package/dist/types/events.d.ts.map +1 -0
  85. package/dist/types/extras.d.ts +18 -0
  86. package/dist/types/extras.d.ts.map +1 -0
  87. package/dist/types/index.d.ts +5 -0
  88. package/dist/types/index.d.ts.map +1 -0
  89. package/dist/types/interaction.d.ts +67 -0
  90. package/dist/types/interaction.d.ts.map +1 -0
  91. package/dist/types/map-series-definition.d.ts +5 -0
  92. package/dist/types/map-series-definition.d.ts.map +1 -0
  93. package/dist/types/maps/africa-map.d.ts +10 -0
  94. package/dist/types/maps/africa-map.d.ts.map +1 -0
  95. package/dist/types/maps/asia-map.d.ts +10 -0
  96. package/dist/types/maps/asia-map.d.ts.map +1 -0
  97. package/dist/types/maps/australia-map.d.ts +10 -0
  98. package/dist/types/maps/australia-map.d.ts.map +1 -0
  99. package/dist/types/maps/europe-map.d.ts +10 -0
  100. package/dist/types/maps/europe-map.d.ts.map +1 -0
  101. package/dist/types/maps/europe27-map.d.ts +10 -0
  102. package/dist/types/maps/europe27-map.d.ts.map +1 -0
  103. package/dist/types/maps/layout-map.d.ts +51 -0
  104. package/dist/types/maps/layout-map.d.ts.map +1 -0
  105. package/dist/types/maps/map-types.d.ts +19 -0
  106. package/dist/types/maps/map-types.d.ts.map +1 -0
  107. package/dist/types/maps/south-america-map.d.ts +10 -0
  108. package/dist/types/maps/south-america-map.d.ts.map +1 -0
  109. package/dist/types/maps/spain-map.d.ts +11 -0
  110. package/dist/types/maps/spain-map.d.ts.map +1 -0
  111. package/dist/types/maps/svg-map.d.ts +37 -0
  112. package/dist/types/maps/svg-map.d.ts.map +1 -0
  113. package/dist/types/maps/usa-map.d.ts +12 -0
  114. package/dist/types/maps/usa-map.d.ts.map +1 -0
  115. package/dist/types/maps/world-map.d.ts +14 -0
  116. package/dist/types/maps/world-map.d.ts.map +1 -0
  117. package/dist/types/maps.d.ts +15 -0
  118. package/dist/types/maps.d.ts.map +1 -0
  119. package/dist/types/marks-animation.d.ts +16 -0
  120. package/dist/types/marks-animation.d.ts.map +1 -0
  121. package/dist/types/modern-theme.d.ts +14 -0
  122. package/dist/types/modern-theme.d.ts.map +1 -0
  123. package/dist/types/optional-options.d.ts +6 -0
  124. package/dist/types/optional-options.d.ts.map +1 -0
  125. package/dist/types/palette.d.ts +11 -0
  126. package/dist/types/palette.d.ts.map +1 -0
  127. package/dist/types/platform.d.ts +27 -0
  128. package/dist/types/platform.d.ts.map +1 -0
  129. package/dist/types/plugin.d.ts +80 -0
  130. package/dist/types/plugin.d.ts.map +1 -0
  131. package/dist/types/quadrants-plugin.d.ts +45 -0
  132. package/dist/types/quadrants-plugin.d.ts.map +1 -0
  133. package/dist/types/register-all.d.ts +3 -0
  134. package/dist/types/register-all.d.ts.map +1 -0
  135. package/dist/types/rendering/canvas-graphics.d.ts +65 -0
  136. package/dist/types/rendering/canvas-graphics.d.ts.map +1 -0
  137. package/dist/types/rendering/graphics.d.ts +59 -0
  138. package/dist/types/rendering/graphics.d.ts.map +1 -0
  139. package/dist/types/rendering/renderer.d.ts +58 -0
  140. package/dist/types/rendering/renderer.d.ts.map +1 -0
  141. package/dist/types/rendering/three-graphics.d.ts +22 -0
  142. package/dist/types/rendering/three-graphics.d.ts.map +1 -0
  143. package/dist/types/responsive.d.ts +8 -0
  144. package/dist/types/responsive.d.ts.map +1 -0
  145. package/dist/types/series/activity-gauge.d.ts +18 -0
  146. package/dist/types/series/activity-gauge.d.ts.map +1 -0
  147. package/dist/types/series/arc-gauge.d.ts +74 -0
  148. package/dist/types/series/arc-gauge.d.ts.map +1 -0
  149. package/dist/types/series/area.d.ts +24 -0
  150. package/dist/types/series/area.d.ts.map +1 -0
  151. package/dist/types/series/bar.d.ts +17 -0
  152. package/dist/types/series/bar.d.ts.map +1 -0
  153. package/dist/types/series/box-plot.d.ts +140 -0
  154. package/dist/types/series/box-plot.d.ts.map +1 -0
  155. package/dist/types/series/bubble.d.ts +25 -0
  156. package/dist/types/series/bubble.d.ts.map +1 -0
  157. package/dist/types/series/bullet.d.ts +86 -0
  158. package/dist/types/series/bullet.d.ts.map +1 -0
  159. package/dist/types/series/candle.d.ts +27 -0
  160. package/dist/types/series/candle.d.ts.map +1 -0
  161. package/dist/types/series/circular-gauge.d.ts +100 -0
  162. package/dist/types/series/circular-gauge.d.ts.map +1 -0
  163. package/dist/types/series/color-series.d.ts +59 -0
  164. package/dist/types/series/color-series.d.ts.map +1 -0
  165. package/dist/types/series/composed-series.d.ts +76 -0
  166. package/dist/types/series/composed-series.d.ts.map +1 -0
  167. package/dist/types/series/custom-bar.d.ts +63 -0
  168. package/dist/types/series/custom-bar.d.ts.map +1 -0
  169. package/dist/types/series/custom-series.d.ts +74 -0
  170. package/dist/types/series/custom-series.d.ts.map +1 -0
  171. package/dist/types/series/donut.d.ts +17 -0
  172. package/dist/types/series/donut.d.ts.map +1 -0
  173. package/dist/types/series/gantt.d.ts +47 -0
  174. package/dist/types/series/gantt.d.ts.map +1 -0
  175. package/dist/types/series/high-low-bar.d.ts +24 -0
  176. package/dist/types/series/high-low-bar.d.ts.map +1 -0
  177. package/dist/types/series/histogram.d.ts +36 -0
  178. package/dist/types/series/histogram.d.ts.map +1 -0
  179. package/dist/types/series/horiz-area.d.ts +11 -0
  180. package/dist/types/series/horiz-area.d.ts.map +1 -0
  181. package/dist/types/series/horiz-bar.d.ts +23 -0
  182. package/dist/types/series/horiz-bar.d.ts.map +1 -0
  183. package/dist/types/series/line.d.ts +22 -0
  184. package/dist/types/series/line.d.ts.map +1 -0
  185. package/dist/types/series/linear-gauge.d.ts +73 -0
  186. package/dist/types/series/linear-gauge.d.ts.map +1 -0
  187. package/dist/types/series/map-series.d.ts +82 -0
  188. package/dist/types/series/map-series.d.ts.map +1 -0
  189. package/dist/types/series/numeric-gauge.d.ts +96 -0
  190. package/dist/types/series/numeric-gauge.d.ts.map +1 -0
  191. package/dist/types/series/palette-series.d.ts +39 -0
  192. package/dist/types/series/palette-series.d.ts.map +1 -0
  193. package/dist/types/series/pie.d.ts +81 -0
  194. package/dist/types/series/pie.d.ts.map +1 -0
  195. package/dist/types/series/point-xy.d.ts +13 -0
  196. package/dist/types/series/point-xy.d.ts.map +1 -0
  197. package/dist/types/series/polar.d.ts +37 -0
  198. package/dist/types/series/polar.d.ts.map +1 -0
  199. package/dist/types/series/sankey.d.ts +90 -0
  200. package/dist/types/series/sankey.d.ts.map +1 -0
  201. package/dist/types/series/series-list.d.ts +127 -0
  202. package/dist/types/series/series-list.d.ts.map +1 -0
  203. package/dist/types/series/series-list.types.d.ts +43 -0
  204. package/dist/types/series/series-list.types.d.ts.map +1 -0
  205. package/dist/types/series/sliced.d.ts +13 -0
  206. package/dist/types/series/sliced.d.ts.map +1 -0
  207. package/dist/types/series/surface.d.ts +24 -0
  208. package/dist/types/series/surface.d.ts.map +1 -0
  209. package/dist/types/series/treemap.d.ts +107 -0
  210. package/dist/types/series/treemap.d.ts.map +1 -0
  211. package/dist/types/series/violin.d.ts +105 -0
  212. package/dist/types/series/violin.d.ts.map +1 -0
  213. package/dist/types/series/volume.d.ts +11 -0
  214. package/dist/types/series/volume.d.ts.map +1 -0
  215. package/dist/types/series-definitions.d.ts +30 -0
  216. package/dist/types/series-definitions.d.ts.map +1 -0
  217. package/dist/types/series-registry.d.ts +37 -0
  218. package/dist/types/series-registry.d.ts.map +1 -0
  219. package/dist/types/series-utils.d.ts +29 -0
  220. package/dist/types/series-utils.d.ts.map +1 -0
  221. package/dist/types/series.d.ts +342 -0
  222. package/dist/types/series.d.ts.map +1 -0
  223. package/dist/types/slider.d.ts +49 -0
  224. package/dist/types/slider.d.ts.map +1 -0
  225. package/dist/types/spline.d.ts +2 -0
  226. package/dist/types/spline.d.ts.map +1 -0
  227. package/dist/types/table/chart-table.d.ts +27 -0
  228. package/dist/types/table/chart-table.d.ts.map +1 -0
  229. package/dist/types/teechart-3d.d.ts +4 -0
  230. package/dist/types/teechart-3d.d.ts.map +1 -0
  231. package/dist/types/theme.d.ts +41 -0
  232. package/dist/types/theme.d.ts.map +1 -0
  233. package/dist/types/three/chart-3d.d.ts +77 -0
  234. package/dist/types/three/chart-3d.d.ts.map +1 -0
  235. package/dist/types/three/chart-options-3d.d.ts +5 -0
  236. package/dist/types/three/chart-options-3d.d.ts.map +1 -0
  237. package/dist/types/three/teechart-3d.d.ts +25 -0
  238. package/dist/types/three/teechart-3d.d.ts.map +1 -0
  239. package/dist/types/three-context.d.ts +184 -0
  240. package/dist/types/three-context.d.ts.map +1 -0
  241. package/dist/types/three-context.types.d.ts +177 -0
  242. package/dist/types/three-context.types.d.ts.map +1 -0
  243. package/dist/types/three-parametric-geometry.d.ts +7 -0
  244. package/dist/types/three-parametric-geometry.d.ts.map +1 -0
  245. package/dist/types/three.d.ts +6 -0
  246. package/dist/types/three.d.ts.map +1 -0
  247. package/dist/types/tools/animate-hover.d.ts +13 -0
  248. package/dist/types/tools/animate-hover.d.ts.map +1 -0
  249. package/dist/types/tools/annotation.d.ts +169 -0
  250. package/dist/types/tools/annotation.d.ts.map +1 -0
  251. package/dist/types/tools/base-animation.d.ts +83 -0
  252. package/dist/types/tools/base-animation.d.ts.map +1 -0
  253. package/dist/types/tools/cursor-tool.d.ts +51 -0
  254. package/dist/types/tools/cursor-tool.d.ts.map +1 -0
  255. package/dist/types/tools/drag-tool.d.ts +28 -0
  256. package/dist/types/tools/drag-tool.d.ts.map +1 -0
  257. package/dist/types/tools/index.d.ts +8 -0
  258. package/dist/types/tools/index.d.ts.map +1 -0
  259. package/dist/types/tools/tool.d.ts +27 -0
  260. package/dist/types/tools/tool.d.ts.map +1 -0
  261. package/dist/types/tools/tools.d.ts +33 -0
  262. package/dist/types/tools/tools.d.ts.map +1 -0
  263. package/dist/types/utils.d.ts +23 -0
  264. package/dist/types/utils.d.ts.map +1 -0
  265. package/dist/types/worker.d.ts +92 -0
  266. package/dist/types/worker.d.ts.map +1 -0
  267. package/package.json +74 -27
  268. package/dist/Tween.js +0 -13
  269. package/dist/date.format.js +0 -145
  270. package/dist/excanvas/canvas.text.js +0 -489
  271. package/dist/excanvas/excanvas.compiled.js +0 -35
  272. package/dist/excanvas/excanvas.js +0 -924
  273. package/dist/excanvas/excanvas_text.js +0 -1416
  274. package/dist/three.js +0 -990
@@ -0,0 +1,90 @@
1
+ import type { Point } from "../core/primitives.js";
2
+ import { Series, type TooltipParts } from "../series.js";
3
+ /** A flow of `value` from the node named `source` to the node named `target`. */
4
+ export interface SankeyLink {
5
+ source: string;
6
+ target: string;
7
+ value: number;
8
+ /** Overrides the link color, which otherwise follows `Sankey.linkColor`. */
9
+ color?: string;
10
+ }
11
+ export interface SankeyNode {
12
+ name: string;
13
+ /** Overrides the palette color of the node. */
14
+ color?: string;
15
+ }
16
+ /**
17
+ * The flow graph of a Sankey series. Nodes are created from the links in order of appearance; list `nodes`
18
+ * to set their colors or to control their vertical order in the first column.
19
+ */
20
+ export interface SankeyGraph {
21
+ links: SankeyLink[];
22
+ nodes?: Array<string | SankeyNode>;
23
+ }
24
+ export type SankeyLinkColor = "source" | "target" | "gradient";
25
+ /**
26
+ * @constructor
27
+ * @augments Tee.Series
28
+ * @class Plots a Sankey diagram: nodes arranged in columns, joined by links whose width is proportional to the
29
+ * flow between them. The data is a graph without cycles; see `SankeyGraph`.
30
+ *
31
+ * Points are the nodes first, then the links: `data.values` holds the node totals and `data.labels` the node
32
+ * names. Hover, tooltips and `clicked` return the node index, or `nodeCount + linkIndex` for a link.
33
+ */
34
+ export declare class Sankey extends Series {
35
+ useAxes: boolean;
36
+ colorEach: string;
37
+ /** Width of the node bars in pixels. */
38
+ nodeWidth: number;
39
+ /** Minimum vertical space between the nodes of a column in pixels. */
40
+ nodePadding: number;
41
+ /** Opacity of the links, from 0 to 1. */
42
+ linkOpacity: number;
43
+ /** Link painting: the color of the source node, of the target node, or a gradient between both. */
44
+ linkColor: SankeyLinkColor;
45
+ /** Number of relaxation passes that move nodes toward the nodes they are linked to. */
46
+ iterations: number;
47
+ /** Draws the node names and values. */
48
+ labels: boolean;
49
+ /** Formats the values shown in labels and tooltips. */
50
+ formatValue: ((value: number) => string) | undefined;
51
+ private nodes;
52
+ private links;
53
+ private columns;
54
+ /** The last position passed to `clicked`, which is where the pointer is. */
55
+ private lastPoint;
56
+ constructor(graph?: SankeyGraph | null);
57
+ /** Replaces the flow graph. Throws when a link is invalid or the links form a cycle. */
58
+ setGraph(graph: SankeyGraph, redraw?: boolean): this;
59
+ private build;
60
+ /** Column of each node: the longest path from a source; nodes that only receive flow go to the last column. */
61
+ private computeDepths;
62
+ private formatNumber;
63
+ private text;
64
+ valueText(index: number): string;
65
+ legendColor(index: number): string;
66
+ tooltipParts(index: number): TooltipParts | undefined;
67
+ legendCount(): number;
68
+ private font;
69
+ private labelWidth;
70
+ /** Positions nodes and links inside the chart rectangle. */
71
+ private layout;
72
+ private relax;
73
+ private collide;
74
+ /** Orders the links of each node by the position of the other end, to reduce crossings, and stacks them. */
75
+ private placeLinks;
76
+ private nodeColor;
77
+ /** The solid color of a link, which is the source color for gradient links. */
78
+ private linkStyleColor;
79
+ private drawLinks;
80
+ private drawNodes;
81
+ private drawLabels;
82
+ draw(): void;
83
+ /** The node index under `p`, `nodeCount + linkIndex` for a link, or -1. Nodes are on top of links. */
84
+ clicked(p: Point): number;
85
+ /** Vertical distance from `p` to the center of the link when inside its ribbon, else infinity. */
86
+ private linkDistance;
87
+ /** Where tooltips point at: the pointer position, kept inside the node bar for nodes. */
88
+ calc(index: number, p: Point): void;
89
+ }
90
+ //# sourceMappingURL=sankey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sankey.d.ts","sourceRoot":"","sources":["../../../src/series/sankey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AAExD,iFAAiF;AACjF,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC,CAAA;CAClC;AAED,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAA;AA6B9D;;;;;;;;GAQG;AACH,qBAAa,MAAO,SAAQ,MAAM;IACjC,OAAO,UAAQ;IACf,SAAS,SAAQ;IACjB,wCAAwC;IACxC,SAAS,SAAK;IACd,sEAAsE;IACtE,WAAW,SAAK;IAChB,yCAAyC;IACzC,WAAW,SAAO;IAClB,mGAAmG;IACnG,SAAS,EAAE,eAAe,CAAW;IACrC,uFAAuF;IACvF,UAAU,SAAI;IACd,uCAAuC;IACvC,MAAM,UAAO;IACb,uDAAuD;IACvD,WAAW,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;IAEpD,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,OAAO,CAAqB;IACpC,4EAA4E;IAC5E,OAAO,CAAC,SAAS,CAAiB;gBAEtB,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI;IAQtC,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,UAAO,GAAG,IAAI;IAUjD,OAAO,CAAC,KAAK;IAuEb,+GAA+G;IAC/G,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,IAAI;IAIZ,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAKhC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAKlC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAoBrD,WAAW,IAAI,MAAM;IAIrB,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,UAAU;IAOlB,4DAA4D;IAC5D,OAAO,CAAC,MAAM;IAkDd,OAAO,CAAC,KAAK;IAkBb,OAAO,CAAC,OAAO;IAgCf,4GAA4G;IAC5G,OAAO,CAAC,UAAU;IAkBlB,OAAO,CAAC,SAAS;IAIjB,+EAA+E;IAC/E,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,SAAS;IAsCjB,OAAO,CAAC,SAAS;IAajB,OAAO,CAAC,UAAU;IAmClB,IAAI,IAAI,IAAI;IAmBZ,sGAAsG;IACtG,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM;IAmBzB,kGAAkG;IAClG,OAAO,CAAC,YAAY;IAuBpB,yFAAyF;IACzF,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI;CAUnC"}
@@ -0,0 +1,127 @@
1
+ import type { Chart } from "../chart.js";
2
+ import type { Axis } from "../core/elements/axis.js";
3
+ import { type Point } from "../core/primitives.js";
4
+ import type { Series } from "../series.js";
5
+ interface Margins {
6
+ x: number;
7
+ y: number;
8
+ }
9
+ type SeriesConstructor = abstract new (...args: never[]) => object;
10
+ /**
11
+ * @memberOf Tee.Chart
12
+ * @constructor
13
+ * @class Contains a list of chart series objects
14
+ * @param {Tee.Chart} chart The parent chart this list of series belongs to.
15
+ * @property {Tee.Series[]} items The array containing series instances.
16
+ */
17
+ export declare class SeriesList {
18
+ chart: Chart;
19
+ items: Series[];
20
+ constructor(chart: Chart);
21
+ /**
22
+ * Adds a series unless it is already present.
23
+ *
24
+ * @param {Tee.Series} series Series to add.
25
+ * @returns {Tee.Series} The added or existing series.
26
+ */
27
+ add(series: Series): Series;
28
+ /**
29
+ * Removes a series from the list.
30
+ *
31
+ * @param {Tee.Series} series Series to remove.
32
+ * @returns {Boolean} Whether the series was removed.
33
+ */
34
+ remove(series: Series, destroy?: boolean): boolean;
35
+ /**
36
+ * Removes all series from the list.
37
+ *
38
+ * @returns {Tee.SeriesList} This list.
39
+ */
40
+ clear(destroy?: boolean): this;
41
+ destroy(): void;
42
+ /**
43
+ * @returns {Number} Returns the total number of series in chart, visible or not.
44
+ */
45
+ count(): number;
46
+ /**
47
+ * @returns {Boolean} Returns if {@link Point} p parameter is over any series point.
48
+ */
49
+ clicked(p: Point): boolean;
50
+ mousedown(event: MouseEvent): boolean;
51
+ mousemove(p: Point): void;
52
+ mouseout(): void;
53
+ /**
54
+ * Counts how many visible series exist of the same class type.
55
+ * @param {Series} [s]
56
+ * @param {Function} [c]
57
+ * @param {{index: number, total: number}} [res]
58
+ * @returns {Number} Returns the number of visible series in chart of the same type as this.
59
+ */
60
+ visibleCount(s?: Series, constructorType?: SeriesConstructor, result?: {
61
+ index: number;
62
+ total: number;
63
+ }): number;
64
+ beforeDraw(): void;
65
+ /**
66
+ * @returns {Boolean} Returns if any visible series in chart needs axes to be represented.
67
+ */
68
+ /** @returns {boolean} */
69
+ anyUsesAxes(): boolean;
70
+ /**
71
+ * @returns {Tee.Series} Returns the first visible series in chart, or null if any.
72
+ */
73
+ /** @returns {Series | null} */
74
+ firstVisible(): Series | null;
75
+ /**
76
+ * Calculates the maximum amount of vertical margins in pixels from all series.
77
+ * @returns {Point} Returns the maximum top/bottom distance in pixels that all series need to be separated from axes.
78
+ */
79
+ /** @returns {{x: number, y: number} | undefined} */
80
+ vertMargins(): Margins | undefined;
81
+ /**
82
+ * Calculates the maximum amount of horizontal margins in pixels from all series
83
+ * @returns {Point} Returns the maximum left/right distance in pixels that all series need to be separated from axes.
84
+ */
85
+ /** @returns {{x: number, y: number} | undefined} */
86
+ horizMargins(): Margins | undefined;
87
+ /**
88
+ * @returns {Number} Returns the minimum of all visible non-empty series associated to axis, minimum x values.
89
+ * @param {import("../core/elements/axis").Axis | null} axis
90
+ */
91
+ /** @returns {number} */
92
+ minXValue(axis: Axis | null): number;
93
+ /**
94
+ * @returns {Number} Returns the minimum of all visible series mininum data values.
95
+ * @param {import("../core/elements/axis").Axis | null} axis
96
+ */
97
+ /** @returns {number} */
98
+ minYValue(axis: Axis | null): number;
99
+ /**
100
+ * @returns {Number} Returns the maximum of all visible series maximum x values.
101
+ * @param {import("../core/elements/axis").Axis | null} axis
102
+ */
103
+ /** @returns {number} */
104
+ maxXValue(axis: Axis | null): number;
105
+ /**
106
+ * @returns {Number} Returns the maximum of all visible series maximum data values.
107
+ * @param {import("../core/elements/axis").Axis | null} axis
108
+ */
109
+ /** @returns {number} */
110
+ maxYValue(axis: Axis | null): number;
111
+ draw(): void;
112
+ /**
113
+ * Calls a function for each series in list.
114
+ * @param {(series: Series) => void} f
115
+ * @returns {void}
116
+ */
117
+ each(callback: (series: Series) => void): void;
118
+ /**
119
+ * Calls a function for each series associated with an axis.
120
+ * @param {import("../core/elements/axis").Axis | null} axis
121
+ * @param {(series: Series) => void} func
122
+ * @returns {void}
123
+ */
124
+ eachAxis(axis: Axis | null, callback: (series: Series) => void): void;
125
+ }
126
+ export {};
127
+ //# sourceMappingURL=series-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series-list.d.ts","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U,IAAI,IAAI;IAQlB;;OAEG;IACH,yBAAyB;IACzB,WAAW,IAAI,OAAO;IAStB;;OAEG;IACH,+BAA+B;IAC/B,YAAY,IAAI,MAAM,GAAG,IAAI;IAO7B;;;OAGG;IACH,oDAAoD;IACpD,WAAW,IAAI,OAAO,GAAG,SAAS;IAmBlC;;;OAGG;IACH,oDAAoD;IACpD,YAAY,IAAI,OAAO,GAAG,SAAS;IAoBnC;;;OAGG;IACH,wBAAwB;IACxB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM;IASpC;;;OAGG;IACH,wBAAwB;IACxB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM;IASpC;;;OAGG;IACH,wBAAwB;IACxB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM;IASpC;;;OAGG;IACH,wBAAwB;IACxB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM;IASpC,IAAI,IAAI,IAAI;IA+DZ;;;;OAIG;IACH,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAI9C;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;CAQrE"}
@@ -0,0 +1,43 @@
1
+ import type { Chart } from "../chart.js";
2
+ import type { Axis } from "../core/elements/axis.js";
3
+ import type { Point } from "../core/primitives.js";
4
+ import type { Series } from "../series.js";
5
+ export type SeriesConstructor = abstract new (...args: never[]) => object;
6
+ /** TypeScript contract consumed by Chart while SeriesList remains legacy JS. */
7
+ export interface SeriesCollection {
8
+ chart: Chart;
9
+ items: Array<Series & {
10
+ continuous?: boolean;
11
+ maxZ?: number;
12
+ }>;
13
+ add(series: Series): Series;
14
+ remove(series: Series, destroy?: boolean): boolean;
15
+ each(callback: (series: Series) => void): void;
16
+ count(): number;
17
+ clicked(point: Point): boolean;
18
+ mousedown(event: MouseEvent): boolean;
19
+ mousemove(point: Point): void;
20
+ mouseout(): void;
21
+ firstVisible(): Series | null;
22
+ visibleCount(series?: Series, constructorType?: SeriesConstructor, result?: {
23
+ index: number;
24
+ total: number;
25
+ }): number;
26
+ beforeDraw(): void;
27
+ anyUsesAxes(): boolean;
28
+ horizMargins(): {
29
+ x: number;
30
+ y: number;
31
+ } | undefined;
32
+ vertMargins(): {
33
+ x: number;
34
+ y: number;
35
+ } | undefined;
36
+ minXValue(axis: Axis | null): number;
37
+ minYValue(axis: Axis | null): number;
38
+ maxXValue(axis: Axis | null): number;
39
+ maxYValue(axis: Axis | null): number;
40
+ draw(): void;
41
+ destroy(): void;
42
+ }
43
+ //# sourceMappingURL=series-list.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series-list.types.d.ts","sourceRoot":"","sources":["../../../src/series/series-list.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,CAAA;AAEzE,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,KAAK,CAAA;IACZ,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG;QAAE,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC9D,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,MAAM,CAAC,MAAM,EAAE,MAAM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SeriesInput, SeriesLabels } from "../series.js";
3
+ /**
4
+ * @constructor
5
+ * @augments Tee.Series
6
+ * plots a Sliced Treemap
7
+ * @class plots a sliced Treemap.
8
+ */
9
+ export declare class Sliced extends Series {
10
+ constructor(o?: SeriesInput | null, o2?: SeriesLabels | null);
11
+ draw(): void;
12
+ }
13
+ //# sourceMappingURL=sliced.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sliced.d.ts","sourceRoot":"","sources":["../../../src/series/sliced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE7D;;;;;GAKG;AACH,qBAAa,MAAO,SAAQ,MAAM;gBACrB,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE,YAAY,GAAG,IAAI;IAO5D,IAAI,IAAI,IAAI;CAiDZ"}
@@ -0,0 +1,24 @@
1
+ import type { SeriesInput, SeriesLabels } from "../series.js";
2
+ import type { Stroke } from "../core/elements/stroke.js";
3
+ import { ColorGrid } from "./color-series.js";
4
+ /**
5
+ * @constructor
6
+ * @augments ColorGrid
7
+ * @class Draws a two dimensional grid of data as a "grid" (rows and columns of pixels),
8
+ * using the palette property to calculate each pixel (grid cell) color.
9
+ */
10
+ export declare class Surface extends ColorGrid {
11
+ d: number[][];
12
+ _sizeY: number;
13
+ grid: Stroke;
14
+ wireFrame: boolean;
15
+ maxZ: number;
16
+ constructor(o?: SeriesInput | null, o2?: SeriesLabels | null);
17
+ getY(x: number, z: number): number;
18
+ draw(): void;
19
+ minXValue(): number;
20
+ maxXValue(): number;
21
+ minYValue(): number;
22
+ maxYValue(): number;
23
+ }
24
+ //# sourceMappingURL=surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../src/series/surface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7C;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,SAAS;IACrC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAK;IAClB,MAAM,SAAI;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,UAAQ;IACjB,IAAI,SAAI;gBAEI,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE,YAAY,GAAG,IAAI;IAM5D,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAIlC,IAAI,IAAI,IAAI;IAuBZ,SAAS,IAAI,MAAM;IAInB,SAAS,IAAI,MAAM;IAInB,SAAS,IAAI,MAAM;IAInB,SAAS,IAAI,MAAM;CAGnB"}
@@ -0,0 +1,107 @@
1
+ import { Chart } from "../chart.js";
2
+ import type { Point } from "../core/primitives.js";
3
+ import { Series, type TooltipParts } from "../series.js";
4
+ /**
5
+ * A node of a Treemap. A leaf's area is proportional to its `value` (1 when omitted); a branch's area is the sum
6
+ * of its children, so a branch needs no value.
7
+ */
8
+ export interface TreemapNode {
9
+ name?: string;
10
+ value?: number;
11
+ /** Overrides the color of the node, which otherwise follows `Treemap.colorBy`. */
12
+ color?: string;
13
+ children?: TreemapNode[];
14
+ }
15
+ /**
16
+ * How the children of a node are arranged: `squarify` keeps the tiles close to squares, `slice` stacks them
17
+ * vertically, `dice` side by side, and `sliceDice` alternates both on each level.
18
+ */
19
+ export type TreemapTiling = "squarify" | "slice" | "dice" | "sliceDice";
20
+ /**
21
+ * What decides the color of a tile: the top-level branch it belongs to (deeper tiles are lighter), its depth,
22
+ * or the tile itself.
23
+ */
24
+ export type TreemapColorBy = "branch" | "level" | "node";
25
+ /**
26
+ * @constructor
27
+ * @augments Tee.Series
28
+ * @class Plots a Treemap: nested rectangles whose area is proportional to the `value` of each node. See
29
+ * `TreemapNode` for the data and `tiling`, `colorBy` and the padding properties for the look.
30
+ *
31
+ * Points are the nodes in depth-first order, branches before their children: `data.values` holds the node
32
+ * values and `data.labels` the node names. Hover, tooltips and `clicked` return the node index.
33
+ */
34
+ export declare class Treemap extends Series {
35
+ fillStyle: string;
36
+ /** Width of the tile outline in pixels; 0 draws no outline. */
37
+ lineWidth: number;
38
+ /** Color of the tile outline; the chart background when omitted, so tiles look separated. */
39
+ borderColor: string | undefined;
40
+ useAxes: boolean;
41
+ root: TreemapNode | null | undefined;
42
+ /** How the children of a node are arranged. */
43
+ tiling: TreemapTiling;
44
+ /** What decides the color of a tile. */
45
+ colorBy: TreemapColorBy;
46
+ /** Space between sibling tiles and around the children of a branch, in pixels. */
47
+ padding: number;
48
+ /** Height of the title band of branches in pixels; 0 hides the bands and draws only the leaves' labels. */
49
+ headerHeight: number;
50
+ /** Corner radius of the tiles in pixels. */
51
+ cornerRadius: number;
52
+ /** Levels drawn below the focused node, 0 for all of them. Deeper nodes are folded into their ancestor. */
53
+ maxDepth: number;
54
+ /** Draws the node names. */
55
+ labels: boolean;
56
+ /** Draws the values under the names of the tiles that have room for them. */
57
+ showValues: boolean;
58
+ /** Orders siblings from the largest to the smallest. */
59
+ sortByValue: boolean;
60
+ /** Clicking a branch zooms into it; clicking its title band, or `zoomTo(null)`, zooms back out. */
61
+ zoomOnClick: boolean;
62
+ /** Formats the values shown in labels and tooltips. */
63
+ formatValue: ((value: number) => string) | undefined;
64
+ /** Called after the zoom changes, with the new focus or null for the whole tree. */
65
+ onzoom: ((node: TreemapNode | null) => void) | undefined;
66
+ private tiles;
67
+ private tileRoot;
68
+ private focus;
69
+ private lastPoint;
70
+ constructor(chartOrRoot?: Chart | TreemapNode | null, root?: TreemapNode);
71
+ /** Replaces the tree and zooms out. */
72
+ setRoot(root: TreemapNode | null | undefined, redraw?: boolean): this;
73
+ /** Zooms into `node`, which must belong to the tree, or out to the whole tree with null. */
74
+ zoomTo(node: TreemapNode | null, redraw?: boolean): this;
75
+ /** The nodes from the root to the focused node, for a breadcrumb. */
76
+ path(): TreemapNode[];
77
+ private redraw;
78
+ private formatNumber;
79
+ private build;
80
+ private sumOf;
81
+ private find;
82
+ private layout;
83
+ /** Hides the descendants of a tile that is drawn as a single block, so they are not drawn or hit. */
84
+ private collapse;
85
+ private tile;
86
+ /** Bruls, Huizing and van Wijk: grows a row of tiles along the short side while their aspect ratio improves. */
87
+ private squarify;
88
+ private tileColor;
89
+ legendCount(): number;
90
+ legendColor(index: number): string;
91
+ valueText(index: number): string;
92
+ tooltipParts(index: number): TooltipParts | undefined;
93
+ private leafCount;
94
+ /** `text` shortened with an ellipsis to fit `width`; empty when not even one character fits. */
95
+ private fitText;
96
+ private roundRect;
97
+ private drawTile;
98
+ /** True when `tile` is an ancestor or a descendant of the hovered tile, which stay lit with it. */
99
+ private isRelated;
100
+ draw(): void;
101
+ /** The deepest node under `p`, or -1. */
102
+ clicked(p: Point): number;
103
+ mousedown(e: unknown): boolean;
104
+ /** Where tooltips point at: the pointer position, kept inside the tile. */
105
+ calc(index: number, p: Point): void;
106
+ }
107
+ //# sourceMappingURL=treemap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treemap.d.ts","sourceRoot":"","sources":["../../../src/series/treemap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AAExD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC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els } from "../series.js";
4
+ /** One violin: a name and the raw values whose distribution it shows. */
5
+ export interface ViolinGroup {
6
+ name?: string;
7
+ values: number[];
8
+ /** Overrides the palette color of the violin. */
9
+ color?: string;
10
+ }
11
+ /** How the width of the violins compares: each one as wide as the widest, equal areas, or by number of values. */
12
+ export type ViolinScale = "width" | "area" | "count";
13
+ /** What is drawn inside each violin. */
14
+ export type ViolinInner = "median" | "box" | "none";
15
+ /** Summary of the values of a violin. */
16
+ export interface ViolinStats {
17
+ count: number;
18
+ min: number;
19
+ q1: number;
20
+ median: number;
21
+ q3: number;
22
+ max: number;
23
+ mean: number;
24
+ /** The bandwidth of the density estimate, in data units. */
25
+ bandwidth: number;
26
+ }
27
+ interface ViolinShape {
28
+ name: string;
29
+ color: string | undefined;
30
+ stats: ViolinStats;
31
+ /** Positions along the value axis where the density is estimated. */
32
+ grid: number[];
33
+ density: number[];
34
+ }
35
+ /**
36
+ * @constructor
37
+ * @augments Tee.Series
38
+ * @class Draws the distribution of each group of values as a mirrored, smoothed density shape (violin) with the
39
+ * median marked inside. The raw values of every group are given to `setData`; the density is a Gaussian kernel
40
+ * estimate.
41
+ *
42
+ * Points are the groups: `data.values` holds the median of each group and `data.labels` its name.
43
+ * @property {Number} [bandwidth=0] Smoothing of the density, in data units; 0 chooses it for each group (Silverman's rule).
44
+ * @property {Number} [smoothing=1] Multiplies the automatic bandwidth: below 1 follows the values more closely, above 1 smooths more.
45
+ * @property {Number} [cut=0] How far the shapes extend beyond the lowest and highest value, in bandwidths.
46
+ * @property {Number} [resolution=100] Number of positions where the density is estimated for each group.
47
+ * @property {String} [scale="width"] "width" gives every violin the same maximum width, "area" the same area and
48
+ * "count" widths proportional to the number of values.
49
+ * @property {Number} [width=80] Maximum width of a violin, in percent of the space of its category.
50
+ * @property {String} [inner="median"] What is drawn inside: the "median" line and dot, a "box" with the quartiles or "none".
51
+ */
52
+ export declare class Violin extends Series {
53
+ colorEach: string;
54
+ bandwidth: number;
55
+ smoothing: number;
56
+ cut: number;
57
+ resolution: number;
58
+ scale: ViolinScale;
59
+ width: number;
60
+ inner: ViolinInner;
61
+ /** Opacity of the fill, from 0 to 1. */
62
+ fillOpacity: number;
63
+ lineWidth: number;
64
+ medianColor: string;
65
+ /** Outline of the median dot. */
66
+ dotStroke: string;
67
+ formatValue: ((value: number) => string) | undefined;
68
+ /** The raw groups. */
69
+ source: ViolinGroup[];
70
+ violins: ViolinShape[];
71
+ continuous: boolean;
72
+ constructor(o?: SeriesInput | null, o2?: SeriesLabels | null);
73
+ /**
74
+ * Replaces the groups and estimates their densities. Each item is a `ViolinGroup` or a plain array of values;
75
+ * `labels` name the groups that have no name. A flat list of numbers is one group.
76
+ */
77
+ setData(groups: Iterable<number> | Iterable<ViolinGroup | number[]>, labels?: Iterable<string> | null, redraw?: boolean): this;
78
+ /** Estimates the densities again; call it after changing `bandwidth`, `smoothing`, `cut` or `resolution`. */
79
+ rebuild(redraw?: boolean): this;
80
+ /** The summary of the values of the `index`th violin. */
81
+ statsOf(index: number): ViolinStats | undefined;
82
+ private estimate;
83
+ /** The density that corresponds to the full half width of the violins. */
84
+ private reference;
85
+ /** Half the pixel width of a category slot used by a violin at its widest. */
86
+ private halfWidth;
87
+ private outline;
88
+ private trace;
89
+ draw(): void;
90
+ private drawInner;
91
+ /** The violin under `p`, or -1. */
92
+ clicked(p: Point): number;
93
+ private formatNumber;
94
+ valueText(index: number): string;
95
+ tooltipParts(index: number): TooltipParts | undefined;
96
+ legendColor(index: number): string;
97
+ /** Room for the outline at the ends of the value axis. */
98
+ vertMargins(p: Point): void;
99
+ minXValue(): number;
100
+ maxXValue(): number;
101
+ minYValue(): number;
102
+ maxYValue(): number;
103
+ }
104
+ export {};
105
+ //# sourceMappingURL=violin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"violin.d.ts","sourceRoot":"","sources":["../../../src/series/violin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;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MAAM;IAInB,SAAS,IAAI,MAAM;IAInB,SAAS,IAAI,MAAM;IAInB,SAAS,IAAI,MAAM;CAGnB"}
@@ -0,0 +1,11 @@
1
+ import type { SeriesInput, SeriesLabels } from "../series.js";
2
+ import { Bar } from "./bar.js";
3
+ /**
4
+ * @constructor
5
+ * @augments Bar
6
+ * @class Draws financial Volume data as thin Bar lines.
7
+ */
8
+ export declare class Volume extends Bar {
9
+ constructor(o?: SeriesInput | null, o2?: SeriesLabels | null);
10
+ }
11
+ //# sourceMappingURL=volume.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volume.d.ts","sourceRoot":"","sources":["../../../src/series/volume.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,GAAG;gBAClB,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE,YAAY,GAAG,IAAI;CAW5D"}
@@ -0,0 +1,30 @@
1
+ import type { ArcGaugeSeriesOptions, BoxPlotSeriesOptions, BulletSeriesOptions, CandleRow, CandleSeriesOptions, CircularGaugeSeriesOptions, GanttSeriesOptions, GanttTask, HighLowRow, HistogramSeriesOptions, NumericGaugeSeriesOptions, SankeySeriesOptions, TreemapSeriesOptions, ViolinSeriesOptions } from "./chart-options.js";
2
+ import { type SeriesTypeDefinition } from "./series-registry.js";
3
+ import { type BoxPlotGroup } from "./series/box-plot.js";
4
+ import { type SankeyGraph } from "./series/sankey.js";
5
+ import { type TreemapNode } from "./series/treemap.js";
6
+ import { type ViolinGroup } from "./series/violin.js";
7
+ import type { LinearGaugeSeriesOptions, SurfaceSeriesOptions } from "./chart-options.js";
8
+ /** Matrix data is stored as rows by the grid engine. Copy rows to isolate caller-owned options. */
9
+ export declare const colorGridSeriesType: SeriesTypeDefinition<number[][]>;
10
+ export declare const surfaceSeriesType: SeriesTypeDefinition<number[][], SurfaceSeriesOptions>;
11
+ export declare const linearGaugeSeriesType: SeriesTypeDefinition<number, LinearGaugeSeriesOptions>;
12
+ export declare const candleSeriesType: SeriesTypeDefinition<CandleRow[], CandleSeriesOptions>;
13
+ export declare const highLowBarSeriesType: SeriesTypeDefinition<HighLowRow[]>;
14
+ export declare const histogramSeriesType: SeriesTypeDefinition<number[], HistogramSeriesOptions>;
15
+ export declare const ganttSeriesType: SeriesTypeDefinition<GanttTask[], GanttSeriesOptions>;
16
+ export declare const treemapSeriesType: SeriesTypeDefinition<TreemapNode, TreemapSeriesOptions>;
17
+ export declare const violinSeriesType: SeriesTypeDefinition<Array<ViolinGroup | number[]>, ViolinSeriesOptions>;
18
+ export declare const boxPlotSeriesType: SeriesTypeDefinition<Array<BoxPlotGroup | number[]>, BoxPlotSeriesOptions>;
19
+ export declare const sankeySeriesType: SeriesTypeDefinition<SankeyGraph, SankeySeriesOptions>;
20
+ export declare const circularGaugeSeriesType: SeriesTypeDefinition<number, CircularGaugeSeriesOptions>;
21
+ export declare const numericGaugeSeriesType: SeriesTypeDefinition<number, NumericGaugeSeriesOptions>;
22
+ export declare const arcGaugeSeriesType: SeriesTypeDefinition<number, ArcGaugeSeriesOptions>;
23
+ export declare const bulletSeriesType: SeriesTypeDefinition<number[], BulletSeriesOptions>;
24
+ /**
25
+ * Registers every series type that is not available by default in declarative options. Calling it
26
+ * includes all those series in the application bundle; register only the types in use with
27
+ * `registerSeriesType` to keep bundles small.
28
+ */
29
+ export declare function registerAllSeriesTypes(): void;
30
+ //# sourceMappingURL=series-definitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series-definitions.d.ts","sourceRoot":"","sources":["../../src/series-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,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EAAE,CAAC,EAAE,mBAAmB,CAmBrG,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,CAAC,YAAY,GAAG,MAAM,EAAE,CAAC,EAAE,oBAAoB,CAwBxG,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,CAAC,WAAW,EAAE,mBAAmB,CAcnF,CAAA;AAuBD,eAAO,MAAM,uBAAuB,0DAqBnC,CAAA;AACD,eAAO,MAAM,sBAAsB,yDAAuE,CAAA;AAC1G,eAAO,MAAM,kBAAkB,qDAqB9B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,oBAAoB,CAAC,MAAM,EAAE,EAAE,mBAAmB,CAShF,CAAA;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAsB7C"}
@@ -0,0 +1,37 @@
1
+ import type { Series } from "./series.js";
2
+ /**
3
+ * Describes how a declarative series type is created and filled with data.
4
+ *
5
+ * `create` returns an empty series. `setData` receives the raw `data` value of the series options and the chart
6
+ * level labels; when omitted, the data must be an iterable of numbers and is passed to `Series.setData`.
7
+ * `configure` runs afterwards and receives the complete series options, for type specific properties.
8
+ */
9
+ export interface SeriesTypeDefinition<TData = unknown, TOptions extends {
10
+ data: TData;
11
+ } = {
12
+ data: TData;
13
+ }> {
14
+ create(): Series;
15
+ setData?(series: Series, data: TData, labels: readonly string[] | undefined): void;
16
+ configure?(series: Series, options: TOptions): void;
17
+ }
18
+ export type SeriesTypeConstructor = new () => Series;
19
+ /**
20
+ * Registers a series type usable as `type` in declarative chart options.
21
+ * Registering an existing name replaces its definition.
22
+ */
23
+ export declare function registerSeriesType<TData = unknown, TOptions extends {
24
+ data: TData;
25
+ } = {
26
+ data: TData;
27
+ }>(name: string, definition: SeriesTypeDefinition<TData, TOptions> | SeriesTypeConstructor): void;
28
+ /** Registers a series type shipped with the library; it cannot be removed with `unregisterSeriesType`. */
29
+ export declare function registerBuiltInSeriesType<TData = unknown, TOptions extends {
30
+ data: TData;
31
+ } = {
32
+ data: TData;
33
+ }>(name: string, definition: SeriesTypeDefinition<TData, TOptions> | SeriesTypeConstructor): void;
34
+ export declare function unregisterSeriesType(name: string): boolean;
35
+ export declare function getSeriesType(name: string): SeriesTypeDefinition | undefined;
36
+ export declare function hasSeriesType(name: unknown): name is string;
37
+ //# sourceMappingURL=series-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series-registry.d.ts","sourceRoot":"","sources":["../../src/series-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB,CAAC,KAAK,GAAG,OAAO,EAAE,QAAQ,SAAS;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE;IACxG,MAAM,IAAI,MAAM,CAAA;IAChB,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,CAAA;IAClF,SAAS,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAA;CACnD;AAED,MAAM,MAAM,qBAAqB,GAAG,UAAU,MAAM,CAAA;AAepD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,GAAG,OAAO,EAAE,QAAQ,SAAS;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,EACrG,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,oBAAoB,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,qBAAqB,GACvE,IAAI,CAGN;AAED,0GAA0G;AAC1G,wBAAgB,yBAAyB,CAAC,KAAK,GAAG,OAAO,EAAE,QAAQ,SAAS;IAAE,IAAI,EAAE,KAAK,CAAA;CAA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