@stealthscale/component-charts 0.2.2 → 0.2.3

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 (123) hide show
  1. package/dist/cyclonedx/bom.json +1 -1
  2. package/dist/index.js +1 -14710
  3. package/dist/pages/area-chart/area-chart.js +1151 -0
  4. package/dist/pages/area-chart/area-chart.props.js +3 -0
  5. package/dist/pages/bar-chart/bar-chart.js +990 -0
  6. package/dist/pages/bar-chart/bar-chart.props.js +3 -0
  7. package/dist/pages/box-plot/box-plot.js +1585 -0
  8. package/dist/pages/box-plot/box-plot.props.js +3 -0
  9. package/dist/pages/bubble-chart/bubble-chart.js +938 -0
  10. package/dist/pages/bubble-chart/bubble-chart.props.js +3 -0
  11. package/dist/pages/burndown-chart/burndown-chart.js +805 -0
  12. package/dist/pages/burndown-chart/burndown-chart.props.js +3 -0
  13. package/dist/pages/candlestick-chart/candlestick-chart.js +853 -0
  14. package/dist/pages/candlestick-chart/candlestick-chart.props.js +3 -0
  15. package/dist/pages/chart/chart.js +1190 -0
  16. package/dist/pages/chart/chart.props.js +3 -0
  17. package/dist/pages/chord-diagram/chord-diagram.js +891 -0
  18. package/dist/pages/chord-diagram/chord-diagram.props.js +3 -0
  19. package/dist/pages/combo-chart/combo-chart.js +873 -0
  20. package/dist/pages/combo-chart/combo-chart.props.js +3 -0
  21. package/dist/pages/distribution-chart/distribution-chart.js +1066 -0
  22. package/dist/pages/distribution-chart/distribution-chart.props.js +3 -0
  23. package/dist/pages/donut-chart/donut-chart.js +726 -0
  24. package/dist/pages/donut-chart/donut-chart.props.js +3 -0
  25. package/dist/pages/funnel-chart/funnel-chart.js +1094 -0
  26. package/dist/pages/funnel-chart/funnel-chart.props.js +3 -0
  27. package/dist/pages/gauge-chart/gauge-chart.js +767 -0
  28. package/dist/pages/gauge-chart/gauge-chart.props.js +3 -0
  29. package/dist/pages/heatmap/heatmap.js +1967 -0
  30. package/dist/pages/heatmap/heatmap.props.js +3 -0
  31. package/dist/pages/histogram-chart/histogram-chart.js +768 -0
  32. package/dist/pages/histogram-chart/histogram-chart.props.js +3 -0
  33. package/dist/pages/horizontal-bar-chart/horizontal-bar-chart.js +701 -0
  34. package/dist/pages/horizontal-bar-chart/horizontal-bar-chart.props.js +3 -0
  35. package/dist/pages/line-chart/line-chart.js +1882 -0
  36. package/dist/pages/line-chart/line-chart.props.js +3 -0
  37. package/dist/pages/pages.json +393 -0
  38. package/dist/pages/pareto-chart/pareto-chart.js +669 -0
  39. package/dist/pages/pareto-chart/pareto-chart.props.js +3 -0
  40. package/dist/pages/percent-stacked-bar/percent-stacked-bar.js +662 -0
  41. package/dist/pages/percent-stacked-bar/percent-stacked-bar.props.js +3 -0
  42. package/dist/pages/pie-chart/pie-chart.js +1007 -0
  43. package/dist/pages/pie-chart/pie-chart.props.js +3 -0
  44. package/dist/pages/polar-area-chart/polar-area-chart.js +812 -0
  45. package/dist/pages/polar-area-chart/polar-area-chart.props.js +3 -0
  46. package/dist/pages/radar-chart/radar-chart.js +1101 -0
  47. package/dist/pages/radar-chart/radar-chart.props.js +3 -0
  48. package/dist/pages/radial-bar-chart/radial-bar-chart.js +766 -0
  49. package/dist/pages/radial-bar-chart/radial-bar-chart.props.js +3 -0
  50. package/dist/pages/range-chart/range-chart.js +914 -0
  51. package/dist/pages/range-chart/range-chart.props.js +3 -0
  52. package/dist/pages/regression-overlay/regression-overlay.js +494 -0
  53. package/dist/pages/regression-overlay/regression-overlay.props.js +3 -0
  54. package/dist/pages/sankey-chart/sankey-chart.js +700 -0
  55. package/dist/pages/sankey-chart/sankey-chart.props.js +3 -0
  56. package/dist/pages/scatter-plot/scatter-plot.js +1248 -0
  57. package/dist/pages/scatter-plot/scatter-plot.props.js +3 -0
  58. package/dist/pages/sparkbar/sparkbar.js +629 -0
  59. package/dist/pages/sparkbar/sparkbar.props.js +3 -0
  60. package/dist/pages/sparkline/sparkline.js +960 -0
  61. package/dist/pages/sparkline/sparkline.props.js +3 -0
  62. package/dist/pages/spend-5xQ76WSj.js +185 -0
  63. package/dist/pages/stacked-area-chart/stacked-area-chart.js +912 -0
  64. package/dist/pages/stacked-area-chart/stacked-area-chart.props.js +3 -0
  65. package/dist/pages/stacked-bar-chart/stacked-bar-chart.js +722 -0
  66. package/dist/pages/stacked-bar-chart/stacked-bar-chart.props.js +3 -0
  67. package/dist/pages/step-line-chart/step-line-chart.js +573 -0
  68. package/dist/pages/step-line-chart/step-line-chart.props.js +3 -0
  69. package/dist/pages/stream-graph/stream-graph.js +1662 -0
  70. package/dist/pages/stream-graph/stream-graph.props.js +3 -0
  71. package/dist/pages/sunburst-chart/sunburst-chart.js +1051 -0
  72. package/dist/pages/sunburst-chart/sunburst-chart.props.js +3 -0
  73. package/dist/pages/timeline-chart/timeline-chart.js +1124 -0
  74. package/dist/pages/timeline-chart/timeline-chart.props.js +3 -0
  75. package/dist/pages/treemap-chart/treemap-chart.js +904 -0
  76. package/dist/pages/treemap-chart/treemap-chart.props.js +3 -0
  77. package/dist/pages/violin-plot/violin-plot.js +1303 -0
  78. package/dist/pages/violin-plot/violin-plot.props.js +3 -0
  79. package/dist/pages/visitors-oFFVcbIZ.js +248 -0
  80. package/dist/pages/waterfall-chart/waterfall-chart.js +1195 -0
  81. package/dist/pages/waterfall-chart/waterfall-chart.props.js +3 -0
  82. package/dist/shared-DVZJ2nST.js +14711 -0
  83. package/dist/theme.js +1 -1
  84. package/locales/en/specimen/area-chart.json +56 -0
  85. package/locales/en/specimen/bar-chart.json +56 -0
  86. package/locales/en/specimen/box-plot.json +65 -0
  87. package/locales/en/specimen/bubble-chart.json +47 -0
  88. package/locales/en/specimen/burndown-chart.json +46 -0
  89. package/locales/en/specimen/candlestick-chart.json +42 -0
  90. package/locales/en/specimen/chart.json +53 -0
  91. package/locales/en/specimen/chord-diagram.json +69 -0
  92. package/locales/en/specimen/combo-chart.json +41 -0
  93. package/locales/en/specimen/distribution-chart.json +47 -0
  94. package/locales/en/specimen/donut-chart.json +63 -0
  95. package/locales/en/specimen/funnel-chart.json +84 -0
  96. package/locales/en/specimen/gauge-chart.json +68 -0
  97. package/locales/en/specimen/heatmap.json +187 -0
  98. package/locales/en/specimen/histogram-chart.json +48 -0
  99. package/locales/en/specimen/horizontal-bar-chart.json +54 -0
  100. package/locales/en/specimen/line-chart.json +106 -0
  101. package/locales/en/specimen/pareto-chart.json +43 -0
  102. package/locales/en/specimen/percent-stacked-bar.json +37 -0
  103. package/locales/en/specimen/pie-chart.json +80 -0
  104. package/locales/en/specimen/polar-area-chart.json +90 -0
  105. package/locales/en/specimen/radar-chart.json +82 -0
  106. package/locales/en/specimen/radial-bar-chart.json +62 -0
  107. package/locales/en/specimen/range-chart.json +42 -0
  108. package/locales/en/specimen/regression-overlay.json +36 -0
  109. package/locales/en/specimen/sankey-chart.json +89 -0
  110. package/locales/en/specimen/scatter-plot.json +88 -0
  111. package/locales/en/specimen/sparkbar.json +51 -0
  112. package/locales/en/specimen/sparkline.json +70 -0
  113. package/locales/en/specimen/stacked-area-chart.json +44 -0
  114. package/locales/en/specimen/stacked-bar-chart.json +34 -0
  115. package/locales/en/specimen/step-line-chart.json +33 -0
  116. package/locales/en/specimen/stream-graph.json +54 -0
  117. package/locales/en/specimen/sunburst-chart.json +110 -0
  118. package/locales/en/specimen/timeline-chart.json +77 -0
  119. package/locales/en/specimen/treemap-chart.json +107 -0
  120. package/locales/en/specimen/violin-plot.json +54 -0
  121. package/locales/en/specimen/waterfall-chart.json +71 -0
  122. package/package.json +8 -7
  123. /package/dist/{recipe-BbGw00ut.js → recipes-BbGw00ut.js} +0 -0
@@ -0,0 +1,3 @@
1
+ export const dropped = {"RangeChartProps": {"conditions": 284, "foreign": 1039}};
2
+ export const parts = {"RangeChartProps": [{"accepts": "boolean", "fallback": "", "kind": "option", "name": "animate", "refers": [], "required": false, "says": "Whether the marks animate in, which they do only outside reduced motion."}, {"accepts": "readonly Annotation[]", "fallback": "", "kind": "option", "name": "annotations", "refers": ["kit.Annotation", "kit.ChartColor"], "required": false, "says": "Marks pinned to the data, a moment, a period or a point each, which the tooltip lists at their category. None unless stated."}, {"accepts": "RangeBand", "fallback": "", "kind": "option", "name": "band", "refers": ["kit.ChartColor", "kit.RangeBand", "react.ReactElement", "react.ReactPortal"], "required": true, "says": "Band between two fields of each row, such as the low and high ends of a forecast."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "caption", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Finding the chart shows, in words, which names the figure."}, {"accepts": "Extract<keyof Row, string>", "fallback": "", "kind": "option", "name": "categoryKey", "refers": [], "required": true, "says": "Field of each row the category axis reads, such as a day or a plan."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "children", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Recharts elements rendered inside the chart after the marks, such as a `ReferenceLine`."}, {"accepts": "Curve", "fallback": "", "kind": "option", "name": "curve", "refers": ["kit.Curve"], "required": false, "says": "Path of each line and of the band's edges between two points. Smoothed through them unless stated."}, {"accepts": "Row[]", "fallback": "", "kind": "option", "name": "data", "refers": ["kit.Row"], "required": true, "says": "Rows the chart plots, in order. The array passes to recharts as it is."}, {"accepts": "readonly string[]", "fallback": "", "kind": "option", "name": "defaultHiddenKeys", "refers": [], "required": false, "says": "Keys of the series hidden when the chart first renders, for the uncontrolled case."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "defaultIndex", "refers": [], "required": false, "says": "Index in `data` of the row the tooltip shows when the chart first renders, until the pointer or a key moves it. No tooltip shows at first unless stated."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "empty", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Message the chart renders in the plot's place while it has no rows."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "grid", "refers": [], "required": false, "says": "Whether lines cross the plot at the value ticks."}, {"accepts": "readonly string[]", "fallback": "", "kind": "option", "name": "hiddenKeys", "refers": [], "required": false, "says": "Keys of the series the legend hides, where the caller controls them."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": true, "says": "Accessible name of the chart's keyboard layer, such as \"Revenue per day\"."}, {"accepts": "DateTimeFormatOptions", "fallback": "", "kind": "option", "name": "labelOptions", "refers": [], "required": false, "says": "`Intl.DateTimeFormat` options the category ticks and the tooltip's heading are written with, for a time axis. The category as it is unless stated."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "legend", "refers": [], "required": false, "says": "Whether the legend renders below the plot. It renders while two or more series have rows unless stated."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "legendLabel", "refers": [], "required": false, "says": "Accessible name of the legend's group of buttons."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "locale", "refers": [], "required": false, "says": "Locale the values are written in. The locale in scope unless stated."}, {"accepts": "((hidden: readonly string[]) => void)", "fallback": "", "kind": "option", "name": "onHiddenKeysChange", "refers": [], "required": false, "says": "Called with every key hidden after a press in the legend."}, {"accepts": "\"golden\" | \"landscape\" | \"portrait\" | \"rows\" | \"square\" | \"ultrawide\" | \"video\" | \"wide\"", "fallback": "", "kind": "variant", "name": "ratio", "refers": [], "required": false, "says": "Aspect ratio of the plot and of the empty state in its place, one of the theme's ratios, or `rows` for a plot as tall as its rows."}, {"accepts": "readonly CartesianSeries[]", "fallback": "", "kind": "option", "name": "series", "refers": ["kit.CartesianSeries", "kit.ChartColor", "react.ReactElement", "react.ReactPortal"], "required": false, "says": "Series plotted as lines over the band, such as the estimate or the actual value."}, {"accepts": "AxisDomain", "fallback": "", "kind": "option", "name": "valueDomain", "refers": ["recharts.AxisDomain", "recharts.AxisDomainItem", "recharts.NumberDomain"], "required": false, "says": "Domain of the value axis in recharts' terms, such as `[0, 100]`. From zero unless stated."}, {"accepts": "NumberFormatOptions", "fallback": "", "kind": "option", "name": "valueOptions", "refers": [], "required": false, "says": "`Intl.NumberFormat` options the value ticks and the tooltip's values are written with."}]};
3
+ export const shapes = {"kit.RangeBand": [{"accepts": "string", "name": "high", "says": "Field of each row the band's upper edge reads."}, {"accepts": "string", "name": "low", "says": "Field of each row the band's lower edge reads."}, {"accepts": "ChartColor", "name": "color", "says": "Palette the series takes its color from. The theme's series color at its position unless stated."}, {"accepts": "number", "name": "ink", "says": "Share of the ink, `fg`, in percent, the series' color mixes in: 0 keeps the color, 100 is the ink. The mix keeps 3:1 or more against the page. None unless stated."}, {"accepts": "string", "name": "key", "says": "Field of each row the series reads, which a recharts mark takes as its `dataKey`."}, {"accepts": "ReactNode", "name": "label", "says": "Name the tooltip and the legend show. The key unless stated."}], "kit.ChartColor": [{"accepts": "", "name": "\"accent\"", "says": ""}, {"accepts": "", "name": "\"blue\"", "says": ""}, {"accepts": "", "name": "\"cyan\"", "says": ""}, {"accepts": "", "name": "\"error\"", "says": ""}, {"accepts": "", "name": "\"gray\"", "says": ""}, {"accepts": "", "name": "\"green\"", "says": ""}, {"accepts": "", "name": "\"indigo\"", "says": ""}, {"accepts": "", "name": "\"info\"", "says": ""}, {"accepts": "", "name": "\"neutral\"", "says": ""}, {"accepts": "", "name": "\"orange\"", "says": ""}, {"accepts": "", "name": "\"pink\"", "says": ""}, {"accepts": "", "name": "\"primary\"", "says": ""}, {"accepts": "", "name": "\"purple\"", "says": ""}, {"accepts": "", "name": "\"red\"", "says": ""}, {"accepts": "", "name": "\"secondary\"", "says": ""}, {"accepts": "", "name": "\"series.1\"", "says": ""}, {"accepts": "", "name": "\"series.2\"", "says": ""}, {"accepts": "", "name": "\"series.3\"", "says": ""}, {"accepts": "", "name": "\"series.4\"", "says": ""}, {"accepts": "", "name": "\"series.5\"", "says": ""}, {"accepts": "", "name": "\"series.6\"", "says": ""}, {"accepts": "", "name": "\"series.7\"", "says": ""}, {"accepts": "", "name": "\"series.8\"", "says": ""}, {"accepts": "", "name": "\"success\"", "says": ""}, {"accepts": "", "name": "\"teal\"", "says": ""}, {"accepts": "", "name": "\"warning\"", "says": ""}, {"accepts": "", "name": "\"yellow\"", "says": ""}], "react.ReactElement": [{"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "react.ReactPortal": [{"accepts": "ReactNode", "name": "children", "says": ""}, {"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "kit.Curve": [{"accepts": "", "name": "\"linear\"", "says": ""}, {"accepts": "", "name": "\"monotone\"", "says": ""}], "kit.CartesianSeries": [{"accepts": "ChartColor", "name": "color", "says": "Palette the series takes its color from. The theme's series color at its position unless stated."}, {"accepts": "boolean", "name": "dashed", "says": "Whether the series' line renders dashed, as a target or a projection does. A series with `previousOf` renders dashed unless stated."}, {"accepts": "string", "name": "previousOf", "says": "Key of the series this series is the earlier period of, such as last week's revenue for this week's. The series takes the neutral palette unless it states a color, and the tooltip writes the change from it after the other series' value."}, {"accepts": "number", "name": "ink", "says": "Share of the ink, `fg`, in percent, the series' color mixes in: 0 keeps the color, 100 is the ink. The mix keeps 3:1 or more against the page. None unless stated."}, {"accepts": "string", "name": "key", "says": "Field of each row the series reads, which a recharts mark takes as its `dataKey`."}, {"accepts": "ReactNode", "name": "label", "says": "Name the tooltip and the legend show. The key unless stated."}], "kit.Annotation": [{"accepts": "string | number", "name": "at", "says": "Category the mark is at, or the category its period starts at."}, {"accepts": "ChartColor", "name": "color", "says": "Palette of the mark, such as `warning` for a flagged point. The neutral palette unless stated."}, {"accepts": "string", "name": "key", "says": "Identity of the mark, unique among the chart's annotations."}, {"accepts": "string", "name": "label", "says": "Words for the mark, written on the plot and in the tooltip at its category."}, {"accepts": "string | number", "name": "until", "says": "Category the mark's period ends at, which makes the mark a period."}, {"accepts": "number", "name": "value", "says": "Value of the point the mark rings, which makes the mark a point."}], "recharts.AxisDomain": [{"accepts": "", "name": "readonly string[]", "says": ""}, {"accepts": "", "name": "readonly number[]", "says": ""}, {"accepts": "", "name": "([dataMin, dataMax]: NumberDomain, allowDataOverflow: boolean) => NumberDomain", "says": ""}, {"accepts": "", "name": "readonly [AxisDomainItem, AxisDomainItem]", "says": ""}], "recharts.AxisDomainItem": [{"accepts": "", "name": "string", "says": ""}, {"accepts": "", "name": "number", "says": ""}, {"accepts": "", "name": "(d: number) => string | number", "says": ""}]};
@@ -0,0 +1,494 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { S as linearRegression, ft as ScatterPlot, x as RegressionOverlay } from "../../shared-DVZJ2nST.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Room, specimen, useWords } from "@stealthscale/specimen";
6
+ //#region src/regression-overlay/examples/channels.example.tsx
7
+ var channels_example_exports = /* @__PURE__ */ __exportAll({
8
+ Channels: () => Channels,
9
+ source: () => source$2
10
+ });
11
+ const ONLINE = [
12
+ [9, 520],
13
+ [12, 470],
14
+ [15, 430],
15
+ [18, 395],
16
+ [22, 330],
17
+ [26, 300],
18
+ [30, 250],
19
+ [34, 215],
20
+ [38, 180]
21
+ ].map(([price = 0, units = 0]) => ({
22
+ price,
23
+ units
24
+ }));
25
+ const STORE = [
26
+ [10, 260],
27
+ [13, 255],
28
+ [17, 240],
29
+ [20, 236],
30
+ [24, 220],
31
+ [28, 214],
32
+ [32, 200],
33
+ [36, 195],
34
+ [40, 182]
35
+ ].map(([price = 0, units = 0]) => ({
36
+ price,
37
+ units
38
+ }));
39
+ function Channels() {
40
+ const $ = c(33);
41
+ const { i18n, t } = useWords("regression-overlay");
42
+ let t0;
43
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
44
+ t0 = linearRegression(ONLINE, "price", "units");
45
+ $[0] = t0;
46
+ } else t0 = $[0];
47
+ const online = t0;
48
+ let t1;
49
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
50
+ t1 = linearRegression(STORE, "price", "units");
51
+ $[1] = t1;
52
+ } else t1 = $[1];
53
+ const store = t1;
54
+ let T0;
55
+ let t2;
56
+ if ($[2] !== i18n.language || $[3] !== t) {
57
+ const number = new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 0 });
58
+ T0 = ScatterPlot;
59
+ t2 = t("channels.caption", {
60
+ online: number.format(-(online?.slope ?? 0)),
61
+ store: number.format(-(store?.slope ?? 0))
62
+ });
63
+ $[2] = i18n.language;
64
+ $[3] = t;
65
+ $[4] = T0;
66
+ $[5] = t2;
67
+ } else {
68
+ T0 = $[4];
69
+ t2 = $[5];
70
+ }
71
+ let t3;
72
+ if ($[6] !== t) {
73
+ t3 = t("channels.label");
74
+ $[6] = t;
75
+ $[7] = t3;
76
+ } else t3 = $[7];
77
+ let t4;
78
+ if ($[8] !== t) {
79
+ t4 = t("channels.online");
80
+ $[8] = t;
81
+ $[9] = t4;
82
+ } else t4 = $[9];
83
+ let t5;
84
+ if ($[10] !== t4) {
85
+ t5 = {
86
+ key: "online",
87
+ label: t4,
88
+ points: ONLINE
89
+ };
90
+ $[10] = t4;
91
+ $[11] = t5;
92
+ } else t5 = $[11];
93
+ let t6;
94
+ if ($[12] !== t) {
95
+ t6 = t("channels.store");
96
+ $[12] = t;
97
+ $[13] = t6;
98
+ } else t6 = $[13];
99
+ let t7;
100
+ if ($[14] !== t6) {
101
+ t7 = {
102
+ key: "store",
103
+ label: t6,
104
+ points: STORE
105
+ };
106
+ $[14] = t6;
107
+ $[15] = t7;
108
+ } else t7 = $[15];
109
+ let t8;
110
+ if ($[16] !== t5 || $[17] !== t7) {
111
+ t8 = [t5, t7];
112
+ $[16] = t5;
113
+ $[17] = t7;
114
+ $[18] = t8;
115
+ } else t8 = $[18];
116
+ let t9;
117
+ if ($[19] !== t) {
118
+ t9 = t("channels.price");
119
+ $[19] = t;
120
+ $[20] = t9;
121
+ } else t9 = $[20];
122
+ let t10;
123
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
124
+ t10 = {
125
+ currency: "EUR",
126
+ maximumFractionDigits: 0,
127
+ style: "currency"
128
+ };
129
+ $[21] = t10;
130
+ } else t10 = $[21];
131
+ let t11;
132
+ if ($[22] !== t) {
133
+ t11 = t("channels.units");
134
+ $[22] = t;
135
+ $[23] = t11;
136
+ } else t11 = $[23];
137
+ let t12;
138
+ let t13;
139
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
140
+ t12 = /* @__PURE__ */ jsx(RegressionOverlay, {
141
+ data: ONLINE,
142
+ series: "online",
143
+ xKey: "price",
144
+ yKey: "units"
145
+ });
146
+ t13 = /* @__PURE__ */ jsx(RegressionOverlay, {
147
+ data: STORE,
148
+ series: "store",
149
+ xKey: "price",
150
+ yKey: "units"
151
+ });
152
+ $[24] = t12;
153
+ $[25] = t13;
154
+ } else {
155
+ t12 = $[24];
156
+ t13 = $[25];
157
+ }
158
+ let t14;
159
+ if ($[26] !== T0 || $[27] !== t11 || $[28] !== t2 || $[29] !== t3 || $[30] !== t8 || $[31] !== t9) {
160
+ t14 = /* @__PURE__ */ jsxs(T0, {
161
+ caption: t2,
162
+ label: t3,
163
+ series: t8,
164
+ xKey: "price",
165
+ xLabel: t9,
166
+ xOptions: t10,
167
+ yKey: "units",
168
+ yLabel: t11,
169
+ children: [t12, t13]
170
+ });
171
+ $[26] = T0;
172
+ $[27] = t11;
173
+ $[28] = t2;
174
+ $[29] = t3;
175
+ $[30] = t8;
176
+ $[31] = t9;
177
+ $[32] = t14;
178
+ } else t14 = $[32];
179
+ return t14;
180
+ }
181
+ const source$2 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { RegressionOverlay, ScatterPlot, linearRegression } from \"@stealthscale/component-charts\";\n\nconst ONLINE = [\n [9, 520],\n [12, 470],\n [15, 430],\n [18, 395],\n [22, 330],\n [26, 300],\n [30, 250],\n [34, 215],\n [38, 180],\n].map(([price = 0, units = 0]) => ({ price, units }));\n\nconst STORE = [\n [10, 260],\n [13, 255],\n [17, 240],\n [20, 236],\n [24, 220],\n [28, 214],\n [32, 200],\n [36, 195],\n [40, 182],\n].map(([price = 0, units = 0]) => ({ price, units }));\n\nexport function Channels(): ReactElement {\n const { i18n, t } = useWords(\"regression-overlay\");\n const online = linearRegression(ONLINE, \"price\", \"units\");\n const store = linearRegression(STORE, \"price\", \"units\");\n const number = new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 0 });\n\n return (\n <ScatterPlot\n caption={t(\"channels.caption\", {\n online: number.format(-(online?.slope ?? 0)),\n store: number.format(-(store?.slope ?? 0)),\n })}\n label={t(\"channels.label\")}\n series={[\n { key: \"online\", label: t(\"channels.online\"), points: ONLINE },\n { key: \"store\", label: t(\"channels.store\"), points: STORE },\n ]}\n xKey=\"price\"\n xLabel={t(\"channels.price\")}\n xOptions={{ currency: \"EUR\", maximumFractionDigits: 0, style: \"currency\" }}\n yKey=\"units\"\n yLabel={t(\"channels.units\")}\n >\n <RegressionOverlay data={ONLINE} series=\"online\" xKey=\"price\" yKey=\"units\" />\n <RegressionOverlay data={STORE} series=\"store\" xKey=\"price\" yKey=\"units\" />\n </ScatterPlot>\n );\n}\n";
182
+ //#endregion
183
+ //#region src/regression-overlay/examples/fit.example.tsx
184
+ var fit_example_exports = /* @__PURE__ */ __exportAll({
185
+ Fit: () => Fit,
186
+ source: () => source$1
187
+ });
188
+ const PRODUCTS = [
189
+ [9, 410],
190
+ [12, 388],
191
+ [14, 352],
192
+ [15, 371],
193
+ [18, 318],
194
+ [20, 290],
195
+ [22, 301],
196
+ [25, 262],
197
+ [27, 240],
198
+ [30, 228],
199
+ [32, 199],
200
+ [35, 187],
201
+ [38, 170],
202
+ [40, 152]
203
+ ].map(([price = 0, units = 0]) => ({
204
+ price,
205
+ units
206
+ }));
207
+ function Fit() {
208
+ const $ = c(23);
209
+ const { i18n, t } = useWords("regression-overlay");
210
+ let T0;
211
+ let t0;
212
+ if ($[0] !== i18n.language || $[1] !== t) {
213
+ const fit = linearRegression(PRODUCTS, "price", "units");
214
+ const number = new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 2 });
215
+ T0 = ScatterPlot;
216
+ t0 = t("fit.caption", {
217
+ r2: number.format(fit?.r2 ?? 0),
218
+ units: number.format(Math.round(-(fit?.slope ?? 0)))
219
+ });
220
+ $[0] = i18n.language;
221
+ $[1] = t;
222
+ $[2] = T0;
223
+ $[3] = t0;
224
+ } else {
225
+ T0 = $[2];
226
+ t0 = $[3];
227
+ }
228
+ let t1;
229
+ if ($[4] !== t) {
230
+ t1 = t("fit.label");
231
+ $[4] = t;
232
+ $[5] = t1;
233
+ } else t1 = $[5];
234
+ let t2;
235
+ if ($[6] !== t) {
236
+ t2 = t("fit.products");
237
+ $[6] = t;
238
+ $[7] = t2;
239
+ } else t2 = $[7];
240
+ let t3;
241
+ if ($[8] !== t2) {
242
+ t3 = [{
243
+ key: "products",
244
+ label: t2,
245
+ points: PRODUCTS
246
+ }];
247
+ $[8] = t2;
248
+ $[9] = t3;
249
+ } else t3 = $[9];
250
+ let t4;
251
+ if ($[10] !== t) {
252
+ t4 = t("fit.price");
253
+ $[10] = t;
254
+ $[11] = t4;
255
+ } else t4 = $[11];
256
+ let t5;
257
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
258
+ t5 = {
259
+ currency: "EUR",
260
+ maximumFractionDigits: 0,
261
+ style: "currency"
262
+ };
263
+ $[12] = t5;
264
+ } else t5 = $[12];
265
+ let t6;
266
+ if ($[13] !== t) {
267
+ t6 = t("fit.units");
268
+ $[13] = t;
269
+ $[14] = t6;
270
+ } else t6 = $[14];
271
+ let t7;
272
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
273
+ t7 = /* @__PURE__ */ jsx(RegressionOverlay, {
274
+ data: PRODUCTS,
275
+ xKey: "price",
276
+ yKey: "units"
277
+ });
278
+ $[15] = t7;
279
+ } else t7 = $[15];
280
+ let t8;
281
+ if ($[16] !== T0 || $[17] !== t0 || $[18] !== t1 || $[19] !== t3 || $[20] !== t4 || $[21] !== t6) {
282
+ t8 = /* @__PURE__ */ jsx(T0, {
283
+ caption: t0,
284
+ label: t1,
285
+ series: t3,
286
+ xKey: "price",
287
+ xLabel: t4,
288
+ xOptions: t5,
289
+ yKey: "units",
290
+ yLabel: t6,
291
+ children: t7
292
+ });
293
+ $[16] = T0;
294
+ $[17] = t0;
295
+ $[18] = t1;
296
+ $[19] = t3;
297
+ $[20] = t4;
298
+ $[21] = t6;
299
+ $[22] = t8;
300
+ } else t8 = $[22];
301
+ return t8;
302
+ }
303
+ const source$1 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { RegressionOverlay, ScatterPlot, linearRegression } from \"@stealthscale/component-charts\";\n\nconst PRODUCTS = [\n [9, 410],\n [12, 388],\n [14, 352],\n [15, 371],\n [18, 318],\n [20, 290],\n [22, 301],\n [25, 262],\n [27, 240],\n [30, 228],\n [32, 199],\n [35, 187],\n [38, 170],\n [40, 152],\n].map(([price = 0, units = 0]) => ({ price, units }));\n\nexport function Fit(): ReactElement {\n const { i18n, t } = useWords(\"regression-overlay\");\n const fit = linearRegression(PRODUCTS, \"price\", \"units\");\n const number = new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 2 });\n\n return (\n <ScatterPlot\n caption={t(\"fit.caption\", {\n r2: number.format(fit?.r2 ?? 0),\n units: number.format(Math.round(-(fit?.slope ?? 0))),\n })}\n label={t(\"fit.label\")}\n series={[{ key: \"products\", label: t(\"fit.products\"), points: PRODUCTS }]}\n xKey=\"price\"\n xLabel={t(\"fit.price\")}\n xOptions={{ currency: \"EUR\", maximumFractionDigits: 0, style: \"currency\" }}\n yKey=\"units\"\n yLabel={t(\"fit.units\")}\n >\n <RegressionOverlay data={PRODUCTS} xKey=\"price\" yKey=\"units\" />\n </ScatterPlot>\n );\n}\n";
304
+ //#endregion
305
+ //#region src/regression-overlay/examples/weak.example.tsx
306
+ var weak_example_exports = /* @__PURE__ */ __exportAll({
307
+ Weak: () => Weak,
308
+ source: () => source
309
+ });
310
+ const TEAMS = [
311
+ [3, 9],
312
+ [4, 12],
313
+ [5, 8],
314
+ [5, 14],
315
+ [6, 10],
316
+ [7, 15],
317
+ [7, 9],
318
+ [8, 13],
319
+ [9, 16],
320
+ [10, 11],
321
+ [11, 17],
322
+ [12, 10],
323
+ [13, 15],
324
+ [14, 12],
325
+ [15, 18],
326
+ [16, 11]
327
+ ].map(([people = 0, deploys = 0]) => ({
328
+ deploys,
329
+ people
330
+ }));
331
+ function Weak() {
332
+ const $ = c(25);
333
+ const { i18n, t } = useWords("regression-overlay");
334
+ let T0;
335
+ let fit;
336
+ let t0;
337
+ if ($[0] !== i18n.language || $[1] !== t) {
338
+ fit = linearRegression(TEAMS, "people", "deploys");
339
+ const share = new Intl.NumberFormat(i18n.language, { style: "percent" });
340
+ T0 = ScatterPlot;
341
+ t0 = t("weak.caption", { share: share.format(fit?.r2 ?? 0) });
342
+ $[0] = i18n.language;
343
+ $[1] = t;
344
+ $[2] = T0;
345
+ $[3] = fit;
346
+ $[4] = t0;
347
+ } else {
348
+ T0 = $[2];
349
+ fit = $[3];
350
+ t0 = $[4];
351
+ }
352
+ let t1;
353
+ if ($[5] !== t) {
354
+ t1 = t("weak.label");
355
+ $[5] = t;
356
+ $[6] = t1;
357
+ } else t1 = $[6];
358
+ let t2;
359
+ if ($[7] !== t) {
360
+ t2 = t("weak.teams");
361
+ $[7] = t;
362
+ $[8] = t2;
363
+ } else t2 = $[8];
364
+ let t3;
365
+ if ($[9] !== t2) {
366
+ t3 = [{
367
+ key: "teams",
368
+ label: t2,
369
+ points: TEAMS
370
+ }];
371
+ $[9] = t2;
372
+ $[10] = t3;
373
+ } else t3 = $[10];
374
+ let t4;
375
+ if ($[11] !== t) {
376
+ t4 = t("weak.people");
377
+ $[11] = t;
378
+ $[12] = t4;
379
+ } else t4 = $[12];
380
+ let t5;
381
+ if ($[13] !== t) {
382
+ t5 = t("weak.deploys");
383
+ $[13] = t;
384
+ $[14] = t5;
385
+ } else t5 = $[14];
386
+ let t6;
387
+ if ($[15] !== fit) {
388
+ t6 = fit !== void 0 && fit.r2 >= .5 ? /* @__PURE__ */ jsx(RegressionOverlay, {
389
+ data: TEAMS,
390
+ xKey: "people",
391
+ yKey: "deploys"
392
+ }) : null;
393
+ $[15] = fit;
394
+ $[16] = t6;
395
+ } else t6 = $[16];
396
+ let t7;
397
+ if ($[17] !== T0 || $[18] !== t0 || $[19] !== t1 || $[20] !== t3 || $[21] !== t4 || $[22] !== t5 || $[23] !== t6) {
398
+ t7 = /* @__PURE__ */ jsx(T0, {
399
+ caption: t0,
400
+ label: t1,
401
+ series: t3,
402
+ xKey: "people",
403
+ xLabel: t4,
404
+ yKey: "deploys",
405
+ yLabel: t5,
406
+ children: t6
407
+ });
408
+ $[17] = T0;
409
+ $[18] = t0;
410
+ $[19] = t1;
411
+ $[20] = t3;
412
+ $[21] = t4;
413
+ $[22] = t5;
414
+ $[23] = t6;
415
+ $[24] = t7;
416
+ } else t7 = $[24];
417
+ return t7;
418
+ }
419
+ const source = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { RegressionOverlay, ScatterPlot, linearRegression } from \"@stealthscale/component-charts\";\n\nconst TEAMS = [\n [3, 9],\n [4, 12],\n [5, 8],\n [5, 14],\n [6, 10],\n [7, 15],\n [7, 9],\n [8, 13],\n [9, 16],\n [10, 11],\n [11, 17],\n [12, 10],\n [13, 15],\n [14, 12],\n [15, 18],\n [16, 11],\n].map(([people = 0, deploys = 0]) => ({ deploys, people }));\n\nexport function Weak(): ReactElement {\n const { i18n, t } = useWords(\"regression-overlay\");\n const fit = linearRegression(TEAMS, \"people\", \"deploys\");\n const share = new Intl.NumberFormat(i18n.language, { style: \"percent\" });\n\n return (\n <ScatterPlot\n caption={t(\"weak.caption\", { share: share.format(fit?.r2 ?? 0) })}\n label={t(\"weak.label\")}\n series={[{ key: \"teams\", label: t(\"weak.teams\"), points: TEAMS }]}\n xKey=\"people\"\n xLabel={t(\"weak.people\")}\n yKey=\"deploys\"\n yLabel={t(\"weak.deploys\")}\n >\n {fit !== undefined && fit.r2 >= 0.5 ? (\n <RegressionOverlay data={TEAMS} xKey=\"people\" yKey=\"deploys\" />\n ) : null}\n </ScatterPlot>\n );\n}\n";
420
+ //#endregion
421
+ //#region src/regression-overlay/regression-overlay.specimen.tsx
422
+ /**
423
+ * Catalogue page for the trend line across a scatter.
424
+ *
425
+ * @remarks
426
+ * The trend line has no recipe of its own: it is a recharts child the chart's recipe styles, so
427
+ * every scene is hand-written. The scenes render a strong fit with its r² in the caption, a line
428
+ * per series that follows the legend, a weak fit the page leaves without a line, and the strong
429
+ * fit at a phone's width. Every scene renders a component from `examples/` and shows that file as
430
+ * its source. The words are keys under `regression-overlay` in
431
+ * `locales/en/specimen/regression-overlay.json`.
432
+ */
433
+ /**
434
+ * Hand-written scene for a strong fit.
435
+ */
436
+ const strong = {
437
+ about: "regression-overlay.fit.about",
438
+ draw: () => /* @__PURE__ */ jsx(Room, {
439
+ size: "lg",
440
+ children: /* @__PURE__ */ jsx(Fit, {})
441
+ }),
442
+ example: fit_example_exports,
443
+ title: "regression-overlay.fit.title"
444
+ };
445
+ /**
446
+ * Hand-written scene for a trend line per series.
447
+ */
448
+ const perSeries = {
449
+ about: "regression-overlay.channels.about",
450
+ draw: () => /* @__PURE__ */ jsx(Room, {
451
+ size: "lg",
452
+ children: /* @__PURE__ */ jsx(Channels, {})
453
+ }),
454
+ example: channels_example_exports,
455
+ title: "regression-overlay.channels.title"
456
+ };
457
+ /**
458
+ * Hand-written scene for a weak fit without a line.
459
+ */
460
+ const loose = {
461
+ about: "regression-overlay.weak.about",
462
+ draw: () => /* @__PURE__ */ jsx(Room, {
463
+ size: "lg",
464
+ children: /* @__PURE__ */ jsx(Weak, {})
465
+ }),
466
+ example: weak_example_exports,
467
+ title: "regression-overlay.weak.title"
468
+ };
469
+ /**
470
+ * Hand-written scene for the strong fit at a phone's width.
471
+ */
472
+ const narrow = {
473
+ about: "regression-overlay.narrow.about",
474
+ draw: () => /* @__PURE__ */ jsx(Room, {
475
+ size: "xs",
476
+ children: /* @__PURE__ */ jsx(Fit, {})
477
+ }),
478
+ example: fit_example_exports,
479
+ title: "regression-overlay.narrow.title"
480
+ };
481
+ var regression_overlay_specimen_default = specimen({
482
+ about: "regression-overlay.about",
483
+ id: "components/charts/regression-overlay",
484
+ imports: "import { linearRegression, RegressionOverlay } from \"@stealthscale/component-charts\";",
485
+ scenes: [
486
+ strong,
487
+ perSeries,
488
+ loose,
489
+ narrow
490
+ ],
491
+ title: "regression-overlay.title"
492
+ });
493
+ //#endregion
494
+ export { regression_overlay_specimen_default as default, loose, narrow, perSeries, strong };
@@ -0,0 +1,3 @@
1
+ export const dropped = {"RegressionOverlayProps": {"conditions": 0, "foreign": 0}, "ScatterPlotProps": {"conditions": 284, "foreign": 1039}};
2
+ export const parts = {"RegressionOverlayProps": [{"accepts": "readonly Point[]", "fallback": "", "kind": "option", "name": "data", "refers": ["kit.Point"], "required": true, "says": "Points to fit, the same points a scatter's series renders."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "series", "refers": [], "required": false, "says": "Key of the series the line summarises, whose color the line takes and whose legend state it follows. The line takes the neutral palette's chart color and ignores the legend unless stated."}, {"accepts": "Extract<keyof Point, string>", "fallback": "", "kind": "option", "name": "xKey", "refers": [], "required": true, "says": "Field each point's x is read from."}, {"accepts": "Extract<keyof Point, string>", "fallback": "", "kind": "option", "name": "yKey", "refers": [], "required": true, "says": "Field each point's y is read from."}], "ScatterPlotProps": [{"accepts": "boolean", "fallback": "", "kind": "option", "name": "animate", "refers": [], "required": false, "says": "Whether the points animate in, which they do only outside reduced motion."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "caption", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Finding the chart shows, in words, which names the figure."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "children", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Recharts elements rendered inside the chart after the points, such as a `RegressionOverlay`."}, {"accepts": "readonly string[]", "fallback": "", "kind": "option", "name": "defaultHiddenKeys", "refers": [], "required": false, "says": "Keys of the series hidden when the chart first renders, for the uncontrolled case."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "defaultIndex", "refers": [], "required": false, "says": "Index in the first series' points of the point the tooltip shows when the chart first renders. No tooltip shows at first unless stated."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "empty", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Message the chart renders in the plot's place while no series has a point."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "grid", "refers": [], "required": false, "says": "Whether lines cross the plot at the ticks of both axes."}, {"accepts": "readonly string[]", "fallback": "", "kind": "option", "name": "hiddenKeys", "refers": [], "required": false, "says": "Keys of the series the legend hides, where the caller controls them."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": true, "says": "Accessible name of the chart's keyboard layer, such as \"Deal size by sales cycle\"."}, {"accepts": "Extract<keyof Point, string>", "fallback": "", "kind": "option", "name": "labelKey", "refers": [], "required": false, "says": "Field of each point whose words are written beside it and head its tooltip, such as a vendor's name."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "legend", "refers": [], "required": false, "says": "Whether the legend renders below the plot. It renders while two or more series have points unless stated."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "legendLabel", "refers": [], "required": false, "says": "Accessible name of the legend's group of buttons."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "locale", "refers": [], "required": false, "says": "Locale the values are written in. The locale in scope unless stated."}, {"accepts": "((hidden: readonly string[]) => void)", "fallback": "", "kind": "option", "name": "onHiddenKeysChange", "refers": [], "required": false, "says": "Called with every key hidden after a press in the legend."}, {"accepts": "Quadrants", "fallback": "", "kind": "option", "name": "quadrants", "refers": ["kit.Quadrants"], "required": false, "says": "Quadrants the plot divides into: two dashed lines, the name of each quadrant in its corner, and the quadrant of each point after its name in the tooltip."}, {"accepts": "\"golden\" | \"landscape\" | \"portrait\" | \"rows\" | \"square\" | \"ultrawide\" | \"video\" | \"wide\"", "fallback": "", "kind": "variant", "name": "ratio", "refers": [], "required": false, "says": "Aspect ratio of the plot and of the empty state in its place, one of the theme's ratios, or `rows` for a plot as tall as its rows."}, {"accepts": "readonly ScatterSeries<Point>[]", "fallback": "", "kind": "option", "name": "series", "refers": ["kit.ChartColor", "kit.Point", "kit.ScatterSeries", "react.ReactElement", "react.ReactPortal"], "required": true, "says": "Series the chart plots, in the order the legend lists them."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "size", "refers": [], "required": false, "says": "Area of every point in square pixels, while no field sizes the points."}, {"accepts": "Extract<keyof Point, string>", "fallback": "", "kind": "option", "name": "sizeKey", "refers": [], "required": false, "says": "Field of each point its area reads, for a bubble chart."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "sizeLabel", "refers": [], "required": false, "says": "Name of the size's field, which the tooltip writes beside the value."}, {"accepts": "NumberFormatOptions", "fallback": "", "kind": "option", "name": "sizeOptions", "refers": [], "required": false, "says": "`Intl.NumberFormat` options the tooltip writes the size with."}, {"accepts": "readonly [number, number]", "fallback": "", "kind": "option", "name": "sizeRange", "refers": [], "required": false, "says": "Smallest and largest area of a sized point, in square pixels."}, {"accepts": "AxisDomain", "fallback": "", "kind": "option", "name": "xDomain", "refers": ["recharts.AxisDomain", "recharts.AxisDomainItem", "recharts.NumberDomain"], "required": false, "says": "Domain of the x axis in recharts' terms. Recharts' rounded domain unless stated."}, {"accepts": "readonly [string, string]", "fallback": "", "kind": "option", "name": "xEnds", "refers": [], "required": false, "says": "Words for the x axis' two ends, the low end's first, such as \"Rare\" and \"Certain\", written in place of its ticks. The axis then spans `xDomain`, 0 to 1 unless it states two numbers."}, {"accepts": "Extract<keyof Point, string>", "fallback": "", "kind": "option", "name": "xKey", "refers": [], "required": true, "says": "Field of each point the x axis reads."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "xLabel", "refers": [], "required": true, "says": "Title of the x axis, which the tooltip repeats beside the x value."}, {"accepts": "NumberFormatOptions", "fallback": "", "kind": "option", "name": "xOptions", "refers": [], "required": false, "says": "`Intl.NumberFormat` options the x ticks and the tooltip's x value are written with."}, {"accepts": "AxisDomain", "fallback": "", "kind": "option", "name": "yDomain", "refers": ["recharts.AxisDomain", "recharts.AxisDomainItem", "recharts.NumberDomain"], "required": false, "says": "Domain of the y axis in recharts' terms. Recharts' rounded domain unless stated."}, {"accepts": "readonly [string, string]", "fallback": "", "kind": "option", "name": "yEnds", "refers": [], "required": false, "says": "Words for the y axis' two ends, the low end's first, written in place of its ticks. The axis then spans `yDomain`, 0 to 1 unless it states two numbers."}, {"accepts": "Extract<keyof Point, string>", "fallback": "", "kind": "option", "name": "yKey", "refers": [], "required": true, "says": "Field of each point the y axis reads."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "yLabel", "refers": [], "required": true, "says": "Title of the y axis, which the tooltip repeats beside the y value."}, {"accepts": "NumberFormatOptions", "fallback": "", "kind": "option", "name": "yOptions", "refers": [], "required": false, "says": "`Intl.NumberFormat` options the y ticks and the tooltip's y value are written with."}]};
3
+ export const shapes = {"react.ReactElement": [{"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "react.ReactPortal": [{"accepts": "ReactNode", "name": "children", "says": ""}, {"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "kit.Quadrants": [{"accepts": "Readonly<Record<QuadrantId, string>>", "name": "names", "says": "Name of each quadrant, keyed by the reading direction."}, {"accepts": "number", "name": "x", "says": "Value on the x axis the quadrants divide at. The middle of the x axis' span unless stated: its domain's two numbers, 0 to 1 for an axis with named ends, else the points' x values."}, {"accepts": "number", "name": "y", "says": "Value on the y axis the quadrants divide at. The middle of the y axis' span unless stated."}], "kit.ScatterSeries": [{"accepts": "readonly Point[]", "name": "points", "says": "Points of the series, each with its own x and y."}, {"accepts": "ChartColor", "name": "color", "says": "Palette the series takes its color from. The theme's series color at its position unless stated."}, {"accepts": "number", "name": "ink", "says": "Share of the ink, `fg`, in percent, the series' color mixes in: 0 keeps the color, 100 is the ink. The mix keeps 3:1 or more against the page. None unless stated."}, {"accepts": "string", "name": "key", "says": "Field of each row the series reads, which a recharts mark takes as its `dataKey`."}, {"accepts": "ReactNode", "name": "label", "says": "Name the tooltip and the legend show. The key unless stated."}], "kit.ChartColor": [{"accepts": "", "name": "\"accent\"", "says": ""}, {"accepts": "", "name": "\"blue\"", "says": ""}, {"accepts": "", "name": "\"cyan\"", "says": ""}, {"accepts": "", "name": "\"error\"", "says": ""}, {"accepts": "", "name": "\"gray\"", "says": ""}, {"accepts": "", "name": "\"green\"", "says": ""}, {"accepts": "", "name": "\"indigo\"", "says": ""}, {"accepts": "", "name": "\"info\"", "says": ""}, {"accepts": "", "name": "\"neutral\"", "says": ""}, {"accepts": "", "name": "\"orange\"", "says": ""}, {"accepts": "", "name": "\"pink\"", "says": ""}, {"accepts": "", "name": "\"primary\"", "says": ""}, {"accepts": "", "name": "\"purple\"", "says": ""}, {"accepts": "", "name": "\"red\"", "says": ""}, {"accepts": "", "name": "\"secondary\"", "says": ""}, {"accepts": "", "name": "\"series.1\"", "says": ""}, {"accepts": "", "name": "\"series.2\"", "says": ""}, {"accepts": "", "name": "\"series.3\"", "says": ""}, {"accepts": "", "name": "\"series.4\"", "says": ""}, {"accepts": "", "name": "\"series.5\"", "says": ""}, {"accepts": "", "name": "\"series.6\"", "says": ""}, {"accepts": "", "name": "\"series.7\"", "says": ""}, {"accepts": "", "name": "\"series.8\"", "says": ""}, {"accepts": "", "name": "\"success\"", "says": ""}, {"accepts": "", "name": "\"teal\"", "says": ""}, {"accepts": "", "name": "\"warning\"", "says": ""}, {"accepts": "", "name": "\"yellow\"", "says": ""}], "recharts.AxisDomain": [{"accepts": "", "name": "readonly string[]", "says": ""}, {"accepts": "", "name": "readonly number[]", "says": ""}, {"accepts": "", "name": "([dataMin, dataMax]: NumberDomain, allowDataOverflow: boolean) => NumberDomain", "says": ""}, {"accepts": "", "name": "readonly [AxisDomainItem, AxisDomainItem]", "says": ""}], "recharts.AxisDomainItem": [{"accepts": "", "name": "string", "says": ""}, {"accepts": "", "name": "number", "says": ""}, {"accepts": "", "name": "(d: number) => string | number", "says": ""}]};