@dou-ui/chart 0.0.0-stage → 0.1.0-alpha.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 (237) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -2
  3. package/dist/chart.js +6 -0
  4. package/dist/chart.js.map +1 -0
  5. package/dist/chart.vue_vue_type_script_setup_true_lang.js +4245 -0
  6. package/dist/chart.vue_vue_type_script_setup_true_lang.js.map +1 -0
  7. package/dist/components/area.js +6 -0
  8. package/dist/components/area.js.map +1 -0
  9. package/dist/components/area.vue_vue_type_script_setup_true_lang.js +55 -0
  10. package/dist/components/area.vue_vue_type_script_setup_true_lang.js.map +1 -0
  11. package/dist/components/axis.js +6 -0
  12. package/dist/components/axis.js.map +1 -0
  13. package/dist/components/axis.vue_vue_type_script_setup_true_lang.js +46 -0
  14. package/dist/components/axis.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/dist/components/bar.js +6 -0
  16. package/dist/components/bar.js.map +1 -0
  17. package/dist/components/bar.vue_vue_type_script_setup_true_lang.js +46 -0
  18. package/dist/components/bar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  19. package/dist/components/boxplot.js +6 -0
  20. package/dist/components/boxplot.js.map +1 -0
  21. package/dist/components/boxplot.vue_vue_type_script_setup_true_lang.js +42 -0
  22. package/dist/components/boxplot.vue_vue_type_script_setup_true_lang.js.map +1 -0
  23. package/dist/components/brush.js +6 -0
  24. package/dist/components/brush.js.map +1 -0
  25. package/dist/components/brush.vue_vue_type_script_setup_true_lang.js +42 -0
  26. package/dist/components/brush.vue_vue_type_script_setup_true_lang.js.map +1 -0
  27. package/dist/components/funnel.js +6 -0
  28. package/dist/components/funnel.js.map +1 -0
  29. package/dist/components/funnel.vue_vue_type_script_setup_true_lang.js +41 -0
  30. package/dist/components/funnel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  31. package/dist/components/gauge.js +6 -0
  32. package/dist/components/gauge.js.map +1 -0
  33. package/dist/components/gauge.vue_vue_type_script_setup_true_lang.js +91 -0
  34. package/dist/components/gauge.vue_vue_type_script_setup_true_lang.js.map +1 -0
  35. package/dist/components/heatmap.js +6 -0
  36. package/dist/components/heatmap.js.map +1 -0
  37. package/dist/components/heatmap.vue_vue_type_script_setup_true_lang.js +45 -0
  38. package/dist/components/heatmap.vue_vue_type_script_setup_true_lang.js.map +1 -0
  39. package/dist/components/histogram.js +6 -0
  40. package/dist/components/histogram.js.map +1 -0
  41. package/dist/components/histogram.vue_vue_type_script_setup_true_lang.js +61 -0
  42. package/dist/components/histogram.vue_vue_type_script_setup_true_lang.js.map +1 -0
  43. package/dist/components/line.js +6 -0
  44. package/dist/components/line.js.map +1 -0
  45. package/dist/components/line.vue_vue_type_script_setup_true_lang.js +52 -0
  46. package/dist/components/line.vue_vue_type_script_setup_true_lang.js.map +1 -0
  47. package/dist/components/marker.js +6 -0
  48. package/dist/components/marker.js.map +1 -0
  49. package/dist/components/marker.vue_vue_type_script_setup_true_lang.js +31 -0
  50. package/dist/components/marker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  51. package/dist/components/pie.js +6 -0
  52. package/dist/components/pie.js.map +1 -0
  53. package/dist/components/pie.vue_vue_type_script_setup_true_lang.js +42 -0
  54. package/dist/components/pie.vue_vue_type_script_setup_true_lang.js.map +1 -0
  55. package/dist/components/radar.js +6 -0
  56. package/dist/components/radar.js.map +1 -0
  57. package/dist/components/radar.vue_vue_type_script_setup_true_lang.js +45 -0
  58. package/dist/components/radar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  59. package/dist/components/range.js +6 -0
  60. package/dist/components/range.js.map +1 -0
  61. package/dist/components/range.vue_vue_type_script_setup_true_lang.js +27 -0
  62. package/dist/components/range.vue_vue_type_script_setup_true_lang.js.map +1 -0
  63. package/dist/components/scatter.js +6 -0
  64. package/dist/components/scatter.js.map +1 -0
  65. package/dist/components/scatter.vue_vue_type_script_setup_true_lang.js +45 -0
  66. package/dist/components/scatter.vue_vue_type_script_setup_true_lang.js.map +1 -0
  67. package/dist/components/sunburst.js +6 -0
  68. package/dist/components/sunburst.js.map +1 -0
  69. package/dist/components/sunburst.vue_vue_type_script_setup_true_lang.js +36 -0
  70. package/dist/components/sunburst.vue_vue_type_script_setup_true_lang.js.map +1 -0
  71. package/dist/components/tooltip.js +6 -0
  72. package/dist/components/tooltip.js.map +1 -0
  73. package/dist/components/tooltip.vue_vue_type_script_setup_true_lang.js +31 -0
  74. package/dist/components/tooltip.vue_vue_type_script_setup_true_lang.js.map +1 -0
  75. package/dist/components/treemap.js +6 -0
  76. package/dist/components/treemap.js.map +1 -0
  77. package/dist/components/treemap.vue_vue_type_script_setup_true_lang.js +33 -0
  78. package/dist/components/treemap.vue_vue_type_script_setup_true_lang.js.map +1 -0
  79. package/dist/components/waterfall.js +6 -0
  80. package/dist/components/waterfall.js.map +1 -0
  81. package/dist/components/waterfall.vue_vue_type_script_setup_true_lang.js +49 -0
  82. package/dist/components/waterfall.vue_vue_type_script_setup_true_lang.js.map +1 -0
  83. package/dist/components/zoom.js +6 -0
  84. package/dist/components/zoom.js.map +1 -0
  85. package/dist/components/zoom.vue_vue_type_script_setup_true_lang.js +37 -0
  86. package/dist/components/zoom.vue_vue_type_script_setup_true_lang.js.map +1 -0
  87. package/dist/context.js +30 -0
  88. package/dist/context.js.map +1 -0
  89. package/dist/core/bar.js +223 -0
  90. package/dist/core/bar.js.map +1 -0
  91. package/dist/core/box.js +150 -0
  92. package/dist/core/box.js.map +1 -0
  93. package/dist/core/colors.js +58 -0
  94. package/dist/core/colors.js.map +1 -0
  95. package/dist/core/data.js +257 -0
  96. package/dist/core/data.js.map +1 -0
  97. package/dist/core/decimate.js +211 -0
  98. package/dist/core/decimate.js.map +1 -0
  99. package/dist/core/format.js +151 -0
  100. package/dist/core/format.js.map +1 -0
  101. package/dist/core/funnel.js +68 -0
  102. package/dist/core/funnel.js.map +1 -0
  103. package/dist/core/grid.js +87 -0
  104. package/dist/core/grid.js.map +1 -0
  105. package/dist/core/heatmap.js +187 -0
  106. package/dist/core/heatmap.js.map +1 -0
  107. package/dist/core/histogram.js +81 -0
  108. package/dist/core/histogram.js.map +1 -0
  109. package/dist/core/hit.js +115 -0
  110. package/dist/core/hit.js.map +1 -0
  111. package/dist/core/labels.js +141 -0
  112. package/dist/core/labels.js.map +1 -0
  113. package/dist/core/layout.js +1002 -0
  114. package/dist/core/layout.js.map +1 -0
  115. package/dist/core/line.js +230 -0
  116. package/dist/core/line.js.map +1 -0
  117. package/dist/core/marker.js +205 -0
  118. package/dist/core/marker.js.map +1 -0
  119. package/dist/core/model.js +391 -0
  120. package/dist/core/model.js.map +1 -0
  121. package/dist/core/painter.js +79 -0
  122. package/dist/core/painter.js.map +1 -0
  123. package/dist/core/pattern.js +102 -0
  124. package/dist/core/pattern.js.map +1 -0
  125. package/dist/core/pie.js +119 -0
  126. package/dist/core/pie.js.map +1 -0
  127. package/dist/core/radar.js +83 -0
  128. package/dist/core/radar.js.map +1 -0
  129. package/dist/core/scale.js +149 -0
  130. package/dist/core/scale.js.map +1 -0
  131. package/dist/core/scatter.js +263 -0
  132. package/dist/core/scatter.js.map +1 -0
  133. package/dist/core/svg.js +209 -0
  134. package/dist/core/svg.js.map +1 -0
  135. package/dist/core/sync.js +21 -0
  136. package/dist/core/sync.js.map +1 -0
  137. package/dist/core/time.js +217 -0
  138. package/dist/core/time.js.map +1 -0
  139. package/dist/core/tree.js +348 -0
  140. package/dist/core/tree.js.map +1 -0
  141. package/dist/core/warn.js +11 -0
  142. package/dist/core/warn.js.map +1 -0
  143. package/dist/core/waterfall.js +134 -0
  144. package/dist/core/waterfall.js.map +1 -0
  145. package/dist/core/window.js +94 -0
  146. package/dist/core/window.js.map +1 -0
  147. package/dist/define.js +62 -0
  148. package/dist/define.js.map +1 -0
  149. package/dist/index.js +49 -0
  150. package/dist/index.js.map +1 -0
  151. package/dist/locale.js +170 -0
  152. package/dist/locale.js.map +1 -0
  153. package/dist/overlay.js +6 -0
  154. package/dist/overlay.js.map +1 -0
  155. package/dist/overlay.vue_vue_type_script_setup_true_lang.js +207 -0
  156. package/dist/overlay.vue_vue_type_script_setup_true_lang.js.map +1 -0
  157. package/dist/pointer.js +6 -0
  158. package/dist/pointer.js.map +1 -0
  159. package/dist/pointer.vue_vue_type_script_setup_true_lang.js +136 -0
  160. package/dist/pointer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  161. package/dist/static.js +6 -0
  162. package/dist/static.js.map +1 -0
  163. package/dist/static.vue_vue_type_script_setup_true_lang.js +34 -0
  164. package/dist/static.vue_vue_type_script_setup_true_lang.js.map +1 -0
  165. package/dist/style.css +1 -0
  166. package/dist/style.d.ts +1 -0
  167. package/dist/style.js +3 -0
  168. package/dist/table.js +6 -0
  169. package/dist/table.js.map +1 -0
  170. package/dist/table.vue_vue_type_script_setup_true_lang.js +52 -0
  171. package/dist/table.vue_vue_type_script_setup_true_lang.js.map +1 -0
  172. package/dist/types/chart.vue.d.ts +24 -0
  173. package/dist/types/components/area.vue.d.ts +16 -0
  174. package/dist/types/components/axis.vue.d.ts +8 -0
  175. package/dist/types/components/bar.vue.d.ts +14 -0
  176. package/dist/types/components/boxplot.vue.d.ts +14 -0
  177. package/dist/types/components/brush.vue.d.ts +22 -0
  178. package/dist/types/components/funnel.vue.d.ts +14 -0
  179. package/dist/types/components/gauge.vue.d.ts +17 -0
  180. package/dist/types/components/heatmap.vue.d.ts +14 -0
  181. package/dist/types/components/histogram.vue.d.ts +14 -0
  182. package/dist/types/components/line.vue.d.ts +16 -0
  183. package/dist/types/components/marker.vue.d.ts +6 -0
  184. package/dist/types/components/pie.vue.d.ts +23 -0
  185. package/dist/types/components/radar.vue.d.ts +16 -0
  186. package/dist/types/components/range.vue.d.ts +12 -0
  187. package/dist/types/components/scatter.vue.d.ts +14 -0
  188. package/dist/types/components/sunburst.vue.d.ts +17 -0
  189. package/dist/types/components/tooltip.vue.d.ts +13 -0
  190. package/dist/types/components/treemap.vue.d.ts +8 -0
  191. package/dist/types/components/waterfall.vue.d.ts +16 -0
  192. package/dist/types/components/zoom.vue.d.ts +18 -0
  193. package/dist/types/context.d.ts +87 -0
  194. package/dist/types/core/bar.d.ts +38 -0
  195. package/dist/types/core/box.d.ts +25 -0
  196. package/dist/types/core/colors.d.ts +16 -0
  197. package/dist/types/core/data.d.ts +72 -0
  198. package/dist/types/core/decimate.d.ts +39 -0
  199. package/dist/types/core/format.d.ts +33 -0
  200. package/dist/types/core/funnel.d.ts +15 -0
  201. package/dist/types/core/grid.d.ts +18 -0
  202. package/dist/types/core/heatmap.d.ts +17 -0
  203. package/dist/types/core/histogram.d.ts +23 -0
  204. package/dist/types/core/hit.d.ts +31 -0
  205. package/dist/types/core/labels.d.ts +45 -0
  206. package/dist/types/core/layout.d.ts +259 -0
  207. package/dist/types/core/line.d.ts +36 -0
  208. package/dist/types/core/marker.d.ts +67 -0
  209. package/dist/types/core/model.d.ts +86 -0
  210. package/dist/types/core/painter.d.ts +34 -0
  211. package/dist/types/core/pattern.d.ts +14 -0
  212. package/dist/types/core/pie.d.ts +66 -0
  213. package/dist/types/core/radar.d.ts +12 -0
  214. package/dist/types/core/scale.d.ts +60 -0
  215. package/dist/types/core/scatter.d.ts +16 -0
  216. package/dist/types/core/series.d.ts +228 -0
  217. package/dist/types/core/svg.d.ts +63 -0
  218. package/dist/types/core/sync.d.ts +8 -0
  219. package/dist/types/core/time.d.ts +20 -0
  220. package/dist/types/core/tree.d.ts +84 -0
  221. package/dist/types/core/warn.d.ts +4 -0
  222. package/dist/types/core/waterfall.d.ts +24 -0
  223. package/dist/types/core/window.d.ts +36 -0
  224. package/dist/types/define.d.ts +115 -0
  225. package/dist/types/index.d.ts +363 -0
  226. package/dist/types/locale.d.ts +100 -0
  227. package/dist/types/overlay.vue.d.ts +95 -0
  228. package/dist/types/pointer.vue.d.ts +53 -0
  229. package/dist/types/static.vue.d.ts +24 -0
  230. package/dist/types/table.vue.d.ts +19 -0
  231. package/dist/types/types.d.ts +555 -0
  232. package/dist/types/zoom-layer.vue.d.ts +41 -0
  233. package/dist/zoom-layer.js +6 -0
  234. package/dist/zoom-layer.js.map +1 -0
  235. package/dist/zoom-layer.vue_vue_type_script_setup_true_lang.js +210 -0
  236. package/dist/zoom-layer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  237. package/package.json +53 -4
@@ -0,0 +1,24 @@
1
+ import type { ChartExpose, ChartProps, ChartPointEvent, ChartSlots } from './types';
2
+ type __VLS_Slots = ChartSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<ChartProps, ChartExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ select: (event: ChartPointEvent) => any;
5
+ hover: (event: ChartPointEvent | null) => any;
6
+ "update:table": (value: boolean) => any;
7
+ }, string, import("vue").PublicProps, Readonly<ChartProps> & Readonly<{
8
+ onSelect?: ((event: ChartPointEvent) => any) | undefined;
9
+ onHover?: ((event: ChartPointEvent | null) => any) | undefined;
10
+ "onUpdate:table"?: ((value: boolean) => any) | undefined;
11
+ }>, {
12
+ data: import(".").ChartData;
13
+ legend: boolean;
14
+ height: string | number;
15
+ ssrWidth: number;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,16 @@
1
+ import type { ChartAreaProps } from '../types';
2
+ type __VLS_Props = ChartAreaProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {
13
+ dots: boolean | "auto";
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import type { ChartAxisProps } from '../types';
2
+ declare const __VLS_export: import("vue").DefineComponent<ChartAxisProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChartAxisProps> & Readonly<{}>, {
3
+ nice: boolean;
4
+ grid: boolean;
5
+ zero: boolean;
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { ChartBarProps } from '../types';
2
+ type __VLS_Props = ChartBarProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { ChartBoxplotProps } from '../types';
2
+ type __VLS_Props = ChartBoxplotProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import type { ChartBrushEvent, ChartBrushProps, ChartInterval } from '../types';
2
+ type __VLS_Props = ChartBrushProps;
3
+ type __VLS_ModelProps = {
4
+ /** The stretch of x selected; `null` for none. */
5
+ 'x'?: ChartInterval | null;
6
+ /** The stretch of values selected; `null` for none. */
7
+ 'y'?: ChartInterval | null;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ select: (event: ChartBrushEvent) => any;
12
+ "update:x": (value: ChartInterval | null) => any;
13
+ "update:y": (value: ChartInterval | null) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
+ onSelect?: ((event: ChartBrushEvent) => any) | undefined;
16
+ "onUpdate:x"?: ((value: ChartInterval | null) => any) | undefined;
17
+ "onUpdate:y"?: ((value: ChartInterval | null) => any) | undefined;
18
+ }>, {
19
+ dim: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { ChartFunnelProps } from '../types';
2
+ type __VLS_Props = ChartFunnelProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type { ChartGaugeProps, ChartGaugeSlots } from '../types';
2
+ type __VLS_Slots = ChartGaugeSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<ChartGaugeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChartGaugeProps> & Readonly<{}>, {
4
+ max: number;
5
+ min: number;
6
+ innerRadius: number;
7
+ endAngle: number;
8
+ startAngle: number;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,14 @@
1
+ import type { ChartHeatmapProps } from '../types';
2
+ type __VLS_Props = ChartHeatmapProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { ChartHistogramProps } from '../types';
2
+ type __VLS_Props = ChartHistogramProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import type { ChartLineProps } from '../types';
2
+ type __VLS_Props = ChartLineProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {
13
+ dots: boolean | "auto";
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { ChartMarkerProps } from '../types';
2
+ declare const __VLS_export: import("vue").DefineComponent<ChartMarkerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChartMarkerProps> & Readonly<{}>, {
3
+ dashed: boolean;
4
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import type { ChartPieProps, ChartPieSlots } from '../types';
2
+ type __VLS_Props = ChartPieProps;
3
+ type __VLS_Slots = ChartPieSlots;
4
+ type __VLS_ModelProps = {
5
+ /** The labels of the slices turned off in the legend. */
6
+ 'hidden'?: string[];
7
+ };
8
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:hidden": (value: string[]) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:hidden"?: ((value: string[]) => any) | undefined;
13
+ }>, {
14
+ innerRadius: number;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,16 @@
1
+ import type { ChartRadarProps } from '../types';
2
+ type __VLS_Props = ChartRadarProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {
13
+ dots: boolean;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { ChartInterval } from '../types';
2
+ type __VLS_ModelProps = {
3
+ /** The stretch of x shown; `null` for all of it. The same as `DouChartZoom`'s `v-model:x`. */
4
+ modelValue?: ChartInterval | null;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (value: ChartInterval | null) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
9
+ "onUpdate:modelValue"?: ((value: ChartInterval | null) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { ChartScatterProps } from '../types';
2
+ type __VLS_Props = ChartScatterProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type { ChartSunburstProps, ChartSunburstSlots } from '../types';
2
+ type __VLS_Slots = ChartSunburstSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<ChartSunburstProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChartSunburstProps> & Readonly<{}>, {
4
+ label: import("..").ChartAccessor;
5
+ labels: boolean | import("..").ChartLabelFormat;
6
+ value: import("..").ChartAccessor;
7
+ children: import("..").ChartAccessor;
8
+ innerRadius: number;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,13 @@
1
+ import type { ChartTooltipProps, ChartTooltipSlots } from '../types';
2
+ type __VLS_Slots = ChartTooltipSlots;
3
+ declare const __VLS_base: import("vue").DefineComponent<ChartTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChartTooltipProps> & Readonly<{}>, {
4
+ crosshair: boolean;
5
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,8 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("..").ChartTreeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("..").ChartTreeProps> & Readonly<{}>, {
2
+ label: import("..").ChartAccessor;
3
+ labels: boolean | import("..").ChartLabelFormat;
4
+ value: import("..").ChartAccessor;
5
+ children: import("..").ChartAccessor;
6
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import type { ChartWaterfallProps } from '../types';
2
+ type __VLS_Props = ChartWaterfallProps;
3
+ type __VLS_ModelProps = {
4
+ /** Turned off in the legend. */
5
+ 'hidden'?: boolean;
6
+ };
7
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:hidden": (value: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
+ "onUpdate:hidden"?: ((value: boolean) => any) | undefined;
12
+ }>, {
13
+ connectors: boolean;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import type { ChartInterval, ChartZoomProps } from '../types';
2
+ type __VLS_Props = ChartZoomProps;
3
+ type __VLS_ModelProps = {
4
+ /** The stretch of x shown; `null` for all of it. */
5
+ 'x'?: ChartInterval | null;
6
+ /** The stretch of values shown; `null` for all of them. */
7
+ 'y'?: ChartInterval | null;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:x": (value: ChartInterval | null) => any;
12
+ "update:y": (value: ChartInterval | null) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:x"?: ((value: ChartInterval | null) => any) | undefined;
15
+ "onUpdate:y"?: ((value: ChartInterval | null) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,87 @@
1
+ import { type InjectionKey, type Ref, type VNodeChild } from 'vue';
2
+ import type { ChartData } from './core/data';
3
+ import type { ChartMessages } from './locale';
4
+ import type { ChartSeriesKind, ChartSeriesProps } from './core/series';
5
+ import type { ChartAxisProps, ChartBrushEvent, ChartBrushProps, ChartInterval, ChartMarkerProps, ChartPieProps, ChartSunburstProps, ChartTooltipProps, ChartTooltipSlots, ChartZoomProps } from './types';
6
+ /** A child component as the chart keeps it. */
7
+ export interface ChartPart<P> {
8
+ props: P;
9
+ /** The child's place in the page, which orders the children as written. */
10
+ el: () => Node | null;
11
+ }
12
+ export interface SeriesPart extends ChartPart<ChartSeriesProps & Record<string, unknown>> {
13
+ kind: ChartSeriesKind<any>;
14
+ /** Turned off in the legend (`v-model:hidden`). */
15
+ hidden: Ref<boolean>;
16
+ }
17
+ export interface PiePart extends ChartPart<ChartPieProps> {
18
+ /** What goes in the hole of a donut. */
19
+ center: () => VNodeChild;
20
+ /** The labels of the slices turned off in the legend (`v-model:hidden`). */
21
+ hidden: Ref<string[]>;
22
+ /**
23
+ * For a gauge, drawn as a pie of its value and the rest of its track:
24
+ * the value, its range and its text. It has no legend nor tooltip.
25
+ */
26
+ gauge?: () => {
27
+ value: number;
28
+ min: number;
29
+ max: number;
30
+ text: string;
31
+ };
32
+ }
33
+ export interface TreePart extends ChartPart<ChartSunburstProps> {
34
+ /** A treemap fills a rectangle; a sunburst draws rings round a center. */
35
+ shape: 'treemap' | 'sunburst';
36
+ /** What goes in a sunburst's hole. */
37
+ center?: () => VNodeChild;
38
+ }
39
+ export interface TooltipPart extends ChartPart<ChartTooltipProps> {
40
+ /** The tooltip's slot, if one is given. */
41
+ content: () => ChartTooltipSlots['default'];
42
+ }
43
+ export type AxisPart = ChartPart<ChartAxisProps>;
44
+ /** A stretch of x and of the values; `null` (or left out) for none. */
45
+ export interface IntervalModels {
46
+ x: Ref<ChartInterval | null | undefined>;
47
+ y: Ref<ChartInterval | null | undefined>;
48
+ }
49
+ export interface ZoomPart extends ChartPart<ChartZoomProps>, IntervalModels {
50
+ }
51
+ export interface BrushPart extends ChartPart<ChartBrushProps>, IntervalModels {
52
+ /** A stretch was selected: tells the page. */
53
+ select: (event: ChartBrushEvent) => void;
54
+ }
55
+ export interface RangePart extends ChartPart<Record<string, never>> {
56
+ x: Ref<ChartInterval | null | undefined>;
57
+ }
58
+ export type MarkerPart = ChartPart<ChartMarkerProps>;
59
+ export interface ChartRegistry {
60
+ addSeries(part: SeriesPart): () => void;
61
+ addAxis(part: AxisPart): () => void;
62
+ addPie(part: PiePart): () => void;
63
+ addTooltip(part: TooltipPart): () => void;
64
+ addZoom(part: ZoomPart): () => void;
65
+ addBrush(part: BrushPart): () => void;
66
+ addRange(part: RangePart): () => void;
67
+ addMarker(part: MarkerPart): () => void;
68
+ addTree(part: TreePart): () => void;
69
+ /** The chart's `data`, for a part that works its rows out from it (a histogram's bins). */
70
+ data(): ChartData | undefined;
71
+ /** The chart's locale, for numbers a part writes itself (a gauge's value). */
72
+ locale(): string;
73
+ /** The chart's messages, for a part that names something itself (a histogram's count). */
74
+ messages(): ChartMessages;
75
+ }
76
+ export declare const chartKey: InjectionKey<ChartRegistry>;
77
+ /**
78
+ * The render of a part: it draws nothing itself. A comment in the page on
79
+ * the server and in the browser alike, so taking over a server-rendered
80
+ * page finds each part where it expects it (an empty template renders
81
+ * nothing at all on the server).
82
+ */
83
+ export declare const renderNothing: () => null;
84
+ /** Registers a child (a series, an axis) with the surrounding chart while it is mounted. */
85
+ export declare function useChartPart(name: string, add: (registry: ChartRegistry) => () => void): void;
86
+ /** The node a renderless child leaves in the page. */
87
+ export declare function useOwnNode(): () => Node | null;
@@ -0,0 +1,38 @@
1
+ import type { Painter } from './painter';
2
+ import type { ChartLabelAnchor, ChartSeries, ChartSeriesKind, ChartView } from './series';
3
+ export interface BarStyle {
4
+ /** Corner radius of the bar's end, in px. */
5
+ radius?: number;
6
+ labelPosition?: 'outside' | 'inside';
7
+ }
8
+ /**
9
+ * Where a series' bars go in each x band: the offset of their near edge
10
+ * from the band's center, and their width, in px.
11
+ */
12
+ export declare function barPlacement(band: number, slot: {
13
+ index: number;
14
+ count: number;
15
+ } | null): {
16
+ offset: number;
17
+ width: number;
18
+ };
19
+ /**
20
+ * Draws bars from 0 (or from the slice of the stack below) to each value.
21
+ * The end away from 0 is rounded; in a stack, only the outermost slice's.
22
+ * Bars narrower than a pixel and a half are merged per pixel column into
23
+ * one bar from the lowest to the highest value there, which looks the
24
+ * same and keeps a million bars as cheap as a few hundred.
25
+ */
26
+ export declare function drawBars(painter: Painter, series: ChartSeries<BarStyle>, view: ChartView, placement?: {
27
+ offset: number;
28
+ width: number;
29
+ }): void;
30
+ /**
31
+ * Where bars' labels go: past each bar's end, or in its middle (stacked
32
+ * bars, by default), with the bar to fit in.
33
+ */
34
+ export declare function barLabels(series: ChartSeries<BarStyle>, view: ChartView, placement?: {
35
+ offset: number;
36
+ width: number;
37
+ }): ChartLabelAnchor[];
38
+ export declare const barKind: ChartSeriesKind<BarStyle>;
@@ -0,0 +1,25 @@
1
+ import { type ChartAccessor, type ChartData } from './data';
2
+ import type { ChartSeries, ChartSeriesKind } from './series';
3
+ export interface BoxStyle {
4
+ /** How far whiskers reach, in box lengths past the box: `1.5` by default, `Infinity` for all the values. */
5
+ whisker?: number;
6
+ }
7
+ export interface BoxStats {
8
+ /** The ends of the whiskers. */
9
+ low: number;
10
+ high: number;
11
+ q1: number;
12
+ median: number;
13
+ q3: number;
14
+ /** The values past the whiskers. */
15
+ outliers: number[];
16
+ /** How many values there are. */
17
+ count: number;
18
+ }
19
+ /** Sums up a group of values; `null` when none is a number. */
20
+ export declare function boxStats(values: unknown, whisker?: number): BoxStats | null;
21
+ /** Each row's numbers, worked out once for the same rows, accessor and whisker. */
22
+ export declare function boxesOf(rows: ChartData, values: ChartAccessor, whisker?: number): Array<BoxStats | null>;
23
+ /** A box plot series' numbers by row. */
24
+ export declare const boxes: (series: Pick<ChartSeries<BoxStyle>, "rows" | "props">) => (BoxStats | null)[];
25
+ export declare const boxKind: ChartSeriesKind<BoxStyle>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Canvas drawing needs real colors, while the theme speaks in CSS
3
+ * variables (`var(--dou-color-chart-2)`, `color-mix(…)`). A hidden probe
4
+ * inside the chart lets the browser work them out, as they apply there.
5
+ */
6
+ export interface ColorResolver {
7
+ (css: string): string;
8
+ /** Forget what was worked out (the theme changed). */
9
+ clear(): void;
10
+ }
11
+ export declare function createColorResolver(host: () => HTMLElement | null | undefined): ColorResolver;
12
+ /**
13
+ * Calls `onChange` when the page's theme may have changed: the theme
14
+ * attribute or class on `<html>` / `<body>`, or the system color scheme.
15
+ */
16
+ export declare function observeTheme(onChange: () => void): () => void;
@@ -0,0 +1,72 @@
1
+ /** A row of chart data: usually an object, read through accessors. */
2
+ export type ChartRow = any;
3
+ /**
4
+ * Data given by column instead of by row: a list of values for each key,
5
+ * all as long as each other. Typed arrays (`Float64Array`) are read
6
+ * fastest; a key reads its column, a function gets a row put together
7
+ * from all the columns.
8
+ */
9
+ export type ChartColumns = Readonly<Record<string, ArrayLike<unknown>>>;
10
+ /** Data as rows (objects), or as columns. */
11
+ export type ChartData = readonly ChartRow[] | ChartColumns;
12
+ /** Whether `data` is given by column. */
13
+ export declare const byColumn: (data: ChartData) => data is ChartColumns;
14
+ /** How many rows `data` has: the length of its first column, when by column. */
15
+ export declare function rowCount(data: ChartData): number;
16
+ /**
17
+ * Row `i` of `data`. A row of columns is put together when first asked
18
+ * for, and is then the same object each time.
19
+ */
20
+ export declare function rowOf(data: ChartData, i: number): ChartRow;
21
+ /**
22
+ * Picks a value from a row: a key of the row, or a function of the row and
23
+ * its index. Prefer keys for large data: a function written inline in the
24
+ * template is new on every render, so its column can't be cached.
25
+ */
26
+ export type ChartAccessor<V = unknown> = string | ((row: ChartRow, index: number) => V);
27
+ /** How x values are read: numbers, points in time (ms), or categories. */
28
+ export type XKind = 'linear' | 'time' | 'category';
29
+ export interface XColumn {
30
+ kind: XKind;
31
+ /** Numbers, times in ms, or the index of each row's category in `categories`. */
32
+ values: Float64Array;
33
+ /** For `category`: the categories in the order they first appear. */
34
+ categories: string[];
35
+ /** Whether `values` never go down, so the visible part can be found by bisection. */
36
+ sorted: boolean;
37
+ }
38
+ /**
39
+ * A point in time in ms, or `NaN`. Dates without a zone (`'2026-10-31'`,
40
+ * `'2026-10-31 09:30'`) are read in local time, the way people write them.
41
+ */
42
+ export declare function toTime(value: unknown): number;
43
+ /** Reads `accessor` from `row`. */
44
+ export declare function read(row: ChartRow, accessor: ChartAccessor, index: number): unknown;
45
+ /** Places rows by their index when there is no x. */
46
+ export declare const byIndex: ChartAccessor;
47
+ /** Guesses how x values are meant from the first one that is there. */
48
+ export declare function inferXKind(rows: ChartData, accessor: ChartAccessor): XKind;
49
+ /**
50
+ * How `rows` carries on from `before`: how many rows of `before` are gone
51
+ * from its start (`dropped`) and how many are kept (`kept`, the start of
52
+ * `rows`). `null` when it doesn't carry on from it.
53
+ */
54
+ export declare function carriesOn(rows: readonly ChartRow[], before: readonly ChartRow[]): {
55
+ dropped: number;
56
+ kept: number;
57
+ } | null;
58
+ /**
59
+ * The x values of `rows` as one typed array. Built once per data array,
60
+ * accessor and kind: replace the array (don't change it in place) for the
61
+ * chart to see new data.
62
+ */
63
+ export declare function xColumn(rows: ChartData, accessor: ChartAccessor, kind: XKind): XColumn;
64
+ /**
65
+ * The y values of `rows` as one typed array; anything that isn't a finite
66
+ * number (`null`, a gap) is `NaN`.
67
+ */
68
+ export declare function yColumn(rows: ChartData, accessor: ChartAccessor): Float64Array;
69
+ /** The smallest and largest number in `values` (skipping `NaN`), or `null`. */
70
+ export declare function extent(values: ArrayLike<number>, from?: number, to?: number): [number, number] | null;
71
+ /** The first index whose value is `>= target`, in a sorted array (`NaN`s aside). */
72
+ export declare function bisect(values: ArrayLike<number>, target: number, lo?: number, hi?: number): number;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Picks the points worth drawing. A pixel column can't show more than its
3
+ * first, lowest, highest and last point, so a line of a million points is
4
+ * drawn from at most four per column and looks exactly the same.
5
+ */
6
+ /** Marks a break in the line: a gap in the data. */
7
+ export declare const BREAK = -1;
8
+ interface Level {
9
+ /** Points per block. */
10
+ size: number;
11
+ /** The row of the lowest and the highest y in each block. */
12
+ low: Int32Array;
13
+ high: Int32Array;
14
+ /** Whether a block has a gap (a `NaN` x or y). */
15
+ gap: Uint8Array;
16
+ }
17
+ /** Makes the summaries of a sorted line long enough to need them, finest first. */
18
+ export declare function summarize(xs: Float64Array, ys: Float64Array): Level[] | null;
19
+ /**
20
+ * The indices from `from` to `to` (exclusive) to draw, in order, with
21
+ * `BREAK` between runs that a gap (a `NaN` y) splits. With `connect`, gaps
22
+ * are skipped instead. Columns are whole pixels of the x scale `x * k + b`.
23
+ *
24
+ * The returned array is reused by the next call: use it before calling again.
25
+ */
26
+ export declare function decimate(xs: Float64Array, ys: Float64Array, from: number, to: number,
27
+ /** Pixel of x is `x * k + b`. */
28
+ k: number, b: number, connect?: boolean,
29
+ /** Whether `xs` goes up from start to end: long lines can then skip whole blocks. */
30
+ sorted?: boolean): {
31
+ indices: Int32Array;
32
+ length: number;
33
+ };
34
+ /**
35
+ * The part of a sorted x column that is on screen, widened by one point on
36
+ * each side so lines run to the edge.
37
+ */
38
+ export declare function visibleRange(xs: ArrayLike<number>, sorted: boolean, lo: number, hi: number): [number, number];
39
+ export {};