basalt-ui 2.10.0 → 2.11.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.
- package/CHANGELOG.md +25 -0
- package/MIGRATING.md +36 -13
- package/agent/rules/basalt-charts.md +2 -2
- package/agent/skills/basalt-charts/SKILL.md +16 -17
- package/dist/charts/BandStrip.d.ts +3 -2
- package/dist/charts/BandStrip.d.ts.map +1 -1
- package/dist/charts/CartesianChart.d.ts +3 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -1
- package/dist/charts/CartesianChart.js +9 -3
- package/dist/charts/DualPanel.d.ts.map +1 -1
- package/dist/charts/DualPanel.js +21 -15
- package/dist/charts/Heatmap.d.ts +33 -3
- package/dist/charts/Heatmap.d.ts.map +1 -1
- package/dist/charts/Heatmap.js +111 -68
- package/dist/charts/Lines.d.ts.map +1 -1
- package/dist/charts/Lines.js +7 -45
- package/dist/charts/MirroredBars.js +2 -2
- package/dist/charts/Sparkline.d.ts +12 -0
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +68 -5
- package/dist/charts/band-fold.d.ts +7 -0
- package/dist/charts/band-fold.d.ts.map +1 -1
- package/dist/charts/compile.d.ts +4 -1
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +43 -19
- package/dist/charts/heatmap-fill.d.ts +15 -0
- package/dist/charts/heatmap-fill.d.ts.map +1 -0
- package/dist/charts/heatmap-fill.js +13 -0
- package/dist/charts/host.d.ts +5 -1
- package/dist/charts/host.d.ts.map +1 -1
- package/dist/charts/host.js +37 -1
- package/dist/charts/index.d.ts +1 -1
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/labels.d.ts +34 -0
- package/dist/charts/labels.d.ts.map +1 -0
- package/dist/charts/labels.js +63 -0
- package/dist/charts/marks.d.ts +8 -1
- package/dist/charts/marks.d.ts.map +1 -1
- package/dist/charts/marks.js +50 -13
- package/dist/charts/panel.d.ts +7 -1
- package/dist/charts/panel.d.ts.map +1 -1
- package/dist/charts/panel.js +9 -4
- package/dist/charts/plot-context.d.ts +42 -0
- package/dist/charts/plot-context.d.ts.map +1 -0
- package/dist/charts/plot-context.js +64 -0
- package/dist/charts/scales.d.ts +6 -1
- package/dist/charts/scales.d.ts.map +1 -1
- package/dist/charts/scales.js +28 -8
- package/dist/charts/ticks.d.ts +12 -0
- package/dist/charts/ticks.d.ts.map +1 -0
- package/dist/charts/ticks.js +42 -0
- package/dist/charts/types.d.ts +39 -5
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/tokens/core.d.ts +6 -0
- package/dist/tokens/core.d.ts.map +1 -1
- package/dist/tokens/core.js +5 -3
- package/llms.txt +12 -4
- package/package.json +1 -1
- package/src/charts/BandStrip.tsx +2 -5
- package/src/charts/CartesianChart.tsx +13 -2
- package/src/charts/DualPanel.tsx +22 -16
- package/src/charts/Heatmap.tsx +181 -76
- package/src/charts/Lines.tsx +11 -57
- package/src/charts/MirroredBars.tsx +2 -2
- package/src/charts/Sparkline.tsx +106 -5
- package/src/charts/band-fold.ts +11 -0
- package/src/charts/compile.ts +60 -20
- package/src/charts/heatmap-fill.ts +19 -0
- package/src/charts/host.tsx +59 -0
- package/src/charts/index.ts +1 -1
- package/src/charts/labels.ts +118 -0
- package/src/charts/marks.ts +72 -14
- package/src/charts/panel.tsx +18 -5
- package/src/charts/plot-context.ts +109 -0
- package/src/charts/scales.ts +41 -11
- package/src/charts/ticks.ts +61 -0
- package/src/charts/types.ts +39 -5
- package/src/tokens/core.ts +10 -3
package/dist/charts/Heatmap.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { colorGradientLegend } from "@tanstack/charts/legend";
|
|
3
|
-
import { decorative } from "@tanstack/charts/mark/decorative";
|
|
4
3
|
import { cell } from "@tanstack/charts/rect";
|
|
5
4
|
import { scaleBand } from "@tanstack/charts/scales/band";
|
|
6
5
|
import { tooltip as tooltipHost } from "@tanstack/charts/tooltip";
|
|
@@ -10,22 +9,29 @@ import { useId, useMemo } from "react";
|
|
|
10
9
|
import { alpha, VX } from "../tokens/index.js";
|
|
11
10
|
import { resolveContainerClass } from "../tokens/size-classes.js";
|
|
12
11
|
import { engineRow, strideTicks } from "./compile.js";
|
|
12
|
+
import { resolveNamedState } from "./band-fold.js";
|
|
13
|
+
import { ABSENT_OPACITY, RAMP_LEVELS, RAMP_OPACITIES } from "./heatmap-fill.js";
|
|
13
14
|
import { ChartEngine, idPrefixOf } from "./host.js";
|
|
15
|
+
import { ChartLegend } from "./legend.js";
|
|
14
16
|
import { useCoarsePointer } from "../common/use-media-query.js";
|
|
15
17
|
import { HEIGHT_MAX, HEIGHT_MIN } from "./box.js";
|
|
16
18
|
import { ChartPlaceholder, resolveChartState } from "./state.js";
|
|
17
19
|
import { AXIS_LINE, CHART_THEME } from "./theme.js";
|
|
18
|
-
const LEVELS = 8;
|
|
19
|
-
const MIN_LEVEL = 0.14;
|
|
20
20
|
const ROW_PITCH = 26;
|
|
21
21
|
const CHROME = 64;
|
|
22
22
|
const CELL_INSET = 1;
|
|
23
23
|
const identityLabel = (band) => band;
|
|
24
24
|
const firstSeen = (keys) => [...new Set(keys)];
|
|
25
|
-
const ramp = (color) =>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const ramp = (color) => RAMP_OPACITIES.map((a) => alpha(color, a));
|
|
26
|
+
const noneHidden = /* @__PURE__ */ new Set();
|
|
27
|
+
const noop = () => {
|
|
28
|
+
};
|
|
29
|
+
const noStates = [];
|
|
30
|
+
function valueRows(c, named, label, formatValue, pointColor) {
|
|
31
|
+
if (named) return [{ label, value: named.label, color: named.color }];
|
|
32
|
+
if (c.value === null) return [{ label, value: "No data" }];
|
|
33
|
+
return [{ label, value: formatValue(c.value), ...pointColor && { color: pointColor } }];
|
|
34
|
+
}
|
|
29
35
|
const fillStyle = { position: "relative", height: "100%", minHeight: HEIGHT_MIN };
|
|
30
36
|
function Heatmap(props) {
|
|
31
37
|
const {
|
|
@@ -37,6 +43,9 @@ function Heatmap(props) {
|
|
|
37
43
|
color = VX.line,
|
|
38
44
|
domain,
|
|
39
45
|
formatValue = String,
|
|
46
|
+
formatLegend = formatValue,
|
|
47
|
+
getState,
|
|
48
|
+
states = noStates,
|
|
40
49
|
formatRow = identityLabel,
|
|
41
50
|
formatCol = identityLabel,
|
|
42
51
|
legend,
|
|
@@ -51,12 +60,16 @@ function Heatmap(props) {
|
|
|
51
60
|
const showLegend = legend !== false;
|
|
52
61
|
const legendLabel = legend === false ? void 0 : legend?.label;
|
|
53
62
|
const showTooltip = tooltip !== false;
|
|
54
|
-
const
|
|
63
|
+
const tooltipConfig = tooltip === false ? void 0 : tooltip;
|
|
64
|
+
const tooltipRows = tooltipConfig?.rows;
|
|
65
|
+
const valueLabel = tooltipConfig?.valueLabel ?? "Value";
|
|
55
66
|
const rows = useMemo(() => props.rows ?? firstSeen(data.map(getRow)), [props.rows, data, getRow]);
|
|
56
67
|
const cols = useMemo(() => props.cols ?? firstSeen(data.map(getCol)), [props.cols, data, getCol]);
|
|
57
68
|
const statedHeight = height ?? Math.min(Math.max(rows.length * ROW_PITCH + CHROME, HEIGHT_MIN), HEIGHT_MAX);
|
|
58
69
|
const coarse = useCoarsePointer();
|
|
59
70
|
const boxHeight = matchHeight ? "fill" : statedHeight;
|
|
71
|
+
const stateKeys = useMemo(() => states.map((s) => s.key), [states]);
|
|
72
|
+
const stateByKey = useMemo(() => new Map(states.map((s) => [s.key, s])), [states]);
|
|
60
73
|
const definition = useMemo(() => {
|
|
61
74
|
const byBand = /* @__PURE__ */ new Map();
|
|
62
75
|
for (const d of data) {
|
|
@@ -66,6 +79,7 @@ function Heatmap(props) {
|
|
|
66
79
|
byBand.set(row, inRow);
|
|
67
80
|
}
|
|
68
81
|
const present = [];
|
|
82
|
+
const stated = /* @__PURE__ */ new Map();
|
|
69
83
|
const absentWithDatum = [];
|
|
70
84
|
const absentEmpty = [];
|
|
71
85
|
let max = 0;
|
|
@@ -74,8 +88,20 @@ function Heatmap(props) {
|
|
|
74
88
|
const datum = byBand.get(row)?.get(col);
|
|
75
89
|
const raw = datum === void 0 ? null : getValue(datum);
|
|
76
90
|
const value = raw !== null && Number.isFinite(raw) ? raw : null;
|
|
77
|
-
const
|
|
78
|
-
|
|
91
|
+
const stateKey = datum === void 0 || getState === void 0 ? void 0 : resolveNamedState("Heatmap", "Heatmap.getState", getState(datum), stateKeys);
|
|
92
|
+
const cellAt = {
|
|
93
|
+
id: r * cols.length + c,
|
|
94
|
+
row,
|
|
95
|
+
col,
|
|
96
|
+
datum,
|
|
97
|
+
value,
|
|
98
|
+
state: stateKey
|
|
99
|
+
};
|
|
100
|
+
if (stateKey !== void 0) {
|
|
101
|
+
const bucket = stated.get(stateKey) ?? [];
|
|
102
|
+
bucket.push(cellAt);
|
|
103
|
+
stated.set(stateKey, bucket);
|
|
104
|
+
} else if (value !== null) {
|
|
79
105
|
present.push(cellAt);
|
|
80
106
|
max = Math.max(max, value);
|
|
81
107
|
} else if (datum === void 0) absentEmpty.push(cellAt);
|
|
@@ -85,6 +111,22 @@ function Heatmap(props) {
|
|
|
85
111
|
const [lo, hi] = domain ?? [0, max];
|
|
86
112
|
const scale = scaleQuantize().domain([lo, hi > lo ? hi : lo + 1]).range(ramp(color));
|
|
87
113
|
const header = (c) => `${formatRow(c.row)} \xB7 ${formatCol(c.col)}`;
|
|
114
|
+
const cellMark = (id, group, paint) => cell(group, { id, x: "col", y: "row", inset: CELL_INSET, key: "id", ...paint });
|
|
115
|
+
const tooltipOptions = showTooltip ? {
|
|
116
|
+
use: tooltipHost,
|
|
117
|
+
portal,
|
|
118
|
+
content: (points) => {
|
|
119
|
+
const point = points[0];
|
|
120
|
+
const c = point?.datum;
|
|
121
|
+
if (!point || !c || c.datum === void 0) return { rows: [] };
|
|
122
|
+
const named = c.state === void 0 ? void 0 : stateByKey.get(c.state);
|
|
123
|
+
const rows2 = [
|
|
124
|
+
...valueRows(c, named, valueLabel, formatValue, point.color),
|
|
125
|
+
...tooltipRows?.(c.datum) ?? []
|
|
126
|
+
];
|
|
127
|
+
return { title: header(c), rows: rows2.map(engineRow) };
|
|
128
|
+
}
|
|
129
|
+
} : false;
|
|
88
130
|
return {
|
|
89
131
|
chart: ({ width }) => {
|
|
90
132
|
const ticks = { line: false, size: 0 };
|
|
@@ -95,33 +137,18 @@ function Heatmap(props) {
|
|
|
95
137
|
thin: true
|
|
96
138
|
};
|
|
97
139
|
const marks = [
|
|
98
|
-
decorative
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
cell(absentWithDatum, {
|
|
109
|
-
id: "absent",
|
|
110
|
-
x: "col",
|
|
111
|
-
y: "row",
|
|
112
|
-
fill: VX.neutral,
|
|
113
|
-
fillOpacity: 0.12,
|
|
114
|
-
inset: CELL_INSET,
|
|
115
|
-
key: "id"
|
|
140
|
+
// Inert, not decorative: it must still win the hit test, so a pointer over an empty
|
|
141
|
+
// position lands on THIS cell (whose tooltip is empty) instead of snapping to a neighbour.
|
|
142
|
+
cellMark("absent-empty", absentEmpty, { fill: VX.neutral, fillOpacity: ABSENT_OPACITY }),
|
|
143
|
+
cellMark("absent", absentWithDatum, { fill: VX.neutral, fillOpacity: ABSENT_OPACITY }),
|
|
144
|
+
...[...stated].map(([key, group]) => {
|
|
145
|
+
const named = stateByKey.get(key);
|
|
146
|
+
return cellMark(`state:${key}`, group, {
|
|
147
|
+
fill: named?.color ?? VX.neutral,
|
|
148
|
+
...named?.fillOpacity !== void 0 && { fillOpacity: named.fillOpacity }
|
|
149
|
+
});
|
|
116
150
|
}),
|
|
117
|
-
|
|
118
|
-
id: "cells",
|
|
119
|
-
x: "col",
|
|
120
|
-
y: "row",
|
|
121
|
-
color: "value",
|
|
122
|
-
inset: CELL_INSET,
|
|
123
|
-
key: "id"
|
|
124
|
-
})
|
|
151
|
+
cellMark("cells", present, { color: "value" })
|
|
125
152
|
];
|
|
126
153
|
return {
|
|
127
154
|
marks,
|
|
@@ -151,8 +178,8 @@ function Heatmap(props) {
|
|
|
151
178
|
scale,
|
|
152
179
|
...showLegend && {
|
|
153
180
|
legend: colorGradientLegend({
|
|
154
|
-
steps:
|
|
155
|
-
format:
|
|
181
|
+
steps: RAMP_LEVELS,
|
|
182
|
+
format: formatLegend,
|
|
156
183
|
placement: "bottom",
|
|
157
184
|
...legendLabel !== void 0 && { label: legendLabel }
|
|
158
185
|
})
|
|
@@ -161,24 +188,7 @@ function Heatmap(props) {
|
|
|
161
188
|
theme: CHART_THEME
|
|
162
189
|
};
|
|
163
190
|
},
|
|
164
|
-
tooltip:
|
|
165
|
-
use: tooltipHost,
|
|
166
|
-
portal,
|
|
167
|
-
content: (points) => {
|
|
168
|
-
const point = points[0];
|
|
169
|
-
const c = point?.datum;
|
|
170
|
-
if (!point || !c) return { rows: [] };
|
|
171
|
-
const extra = c.datum === void 0 ? [] : tooltipRows?.(c.datum) ?? [];
|
|
172
|
-
const value = c.value === null ? [{ label: "Value", value: "No data" }] : [
|
|
173
|
-
{
|
|
174
|
-
label: "Value",
|
|
175
|
-
value: formatValue(c.value),
|
|
176
|
-
...point.color && { color: point.color }
|
|
177
|
-
}
|
|
178
|
-
];
|
|
179
|
-
return { title: header(c), rows: [...value, ...extra].map(engineRow) };
|
|
180
|
-
}
|
|
181
|
-
} : false
|
|
191
|
+
tooltip: tooltipOptions
|
|
182
192
|
};
|
|
183
193
|
}, [
|
|
184
194
|
data,
|
|
@@ -190,6 +200,11 @@ function Heatmap(props) {
|
|
|
190
200
|
color,
|
|
191
201
|
domain,
|
|
192
202
|
formatValue,
|
|
203
|
+
formatLegend,
|
|
204
|
+
getState,
|
|
205
|
+
stateKeys,
|
|
206
|
+
stateByKey,
|
|
207
|
+
valueLabel,
|
|
193
208
|
formatRow,
|
|
194
209
|
formatCol,
|
|
195
210
|
legendLabel,
|
|
@@ -197,23 +212,51 @@ function Heatmap(props) {
|
|
|
197
212
|
showTooltip,
|
|
198
213
|
tooltipRows
|
|
199
214
|
]);
|
|
215
|
+
const legendSeries = useMemo(
|
|
216
|
+
() => getState === void 0 ? [] : states.map((s) => ({
|
|
217
|
+
key: s.key,
|
|
218
|
+
label: s.label,
|
|
219
|
+
color: s.color,
|
|
220
|
+
mark: "bar",
|
|
221
|
+
...s.fillOpacity !== void 0 && { fillOpacity: s.fillOpacity },
|
|
222
|
+
...s.legend !== void 0 && { legend: s.legend },
|
|
223
|
+
...s.note !== void 0 && { note: s.note },
|
|
224
|
+
getValue: () => null
|
|
225
|
+
})),
|
|
226
|
+
[states, getState]
|
|
227
|
+
);
|
|
200
228
|
const resolved = resolveChartState(state);
|
|
201
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ jsxs(
|
|
202
230
|
"div",
|
|
203
231
|
{
|
|
204
232
|
"data-basalt-chart": "",
|
|
205
233
|
...className !== void 0 && { className },
|
|
206
234
|
style: matchHeight ? { ...fillStyle, ...style } : style,
|
|
207
|
-
children:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
235
|
+
children: [
|
|
236
|
+
resolved === null ? /* @__PURE__ */ jsx(
|
|
237
|
+
ChartEngine,
|
|
238
|
+
{
|
|
239
|
+
definition,
|
|
240
|
+
ariaLabel,
|
|
241
|
+
height: boxHeight,
|
|
242
|
+
idPrefix: idPrefixOf(chartId),
|
|
243
|
+
coarse
|
|
244
|
+
}
|
|
245
|
+
) : /* @__PURE__ */ jsx(ChartPlaceholder, { state, height: boxHeight }),
|
|
246
|
+
showLegend && legendSeries.length > 0 && /* @__PURE__ */ jsx(
|
|
247
|
+
ChartLegend,
|
|
248
|
+
{
|
|
249
|
+
series: legendSeries,
|
|
250
|
+
hidden: noneHidden,
|
|
251
|
+
mode: "chips",
|
|
252
|
+
groups: false,
|
|
253
|
+
toggle: false,
|
|
254
|
+
onToggle: noop,
|
|
255
|
+
onHighlight: noop,
|
|
256
|
+
concealed: resolved !== null
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
]
|
|
217
260
|
}
|
|
218
261
|
);
|
|
219
262
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../src/charts/Lines.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../src/charts/Lines.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAOzC,OAAO,KAAK,EACV,mBAAmB,EAEnB,MAAM,EAGN,SAAS,EACV,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAChG;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,SAAS,SAAS,EAAE,CAAA;CACjE,CAAA;AAID,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CA8DzF"}
|
package/dist/charts/Lines.js
CHANGED
|
@@ -2,50 +2,14 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { areaY } from "@tanstack/charts/area";
|
|
3
3
|
import { differenceY } from "@tanstack/charts/difference";
|
|
4
4
|
import { decorative } from "@tanstack/charts/mark/decorative";
|
|
5
|
-
import { text } from "@tanstack/charts/text";
|
|
6
5
|
import { useCallback } from "react";
|
|
7
|
-
import { VX } from "../tokens/index.js";
|
|
8
6
|
import { CartesianRung } from "./CartesianChart.js";
|
|
9
7
|
import { areaGradientId } from "./compile.js";
|
|
10
8
|
import { chartCurve } from "./curves.js";
|
|
11
|
-
import {
|
|
9
|
+
import { endLabelMarks, endLabelPlan } from "./labels.js";
|
|
10
|
+
import { drawnRows, lineMark, loneDots, markersOf, yScaleOf } from "./marks.js";
|
|
12
11
|
import { rowX } from "./types.js";
|
|
13
|
-
const MAX_END_LABELS = 3;
|
|
14
|
-
const END_LABEL_MIN_GAP = 13;
|
|
15
|
-
const END_LABEL_DX = 6;
|
|
16
12
|
const hasValue = (r) => r.y !== null;
|
|
17
|
-
function endLabels(plot, lines) {
|
|
18
|
-
if (plot.containerClass !== "wide" || plot.y2 !== void 0) return [];
|
|
19
|
-
if (lines.length === 0 || lines.length > MAX_END_LABELS) return [];
|
|
20
|
-
const last = lines.flatMap((s) => {
|
|
21
|
-
const row = plot.rows(s.key).findLast(hasValue);
|
|
22
|
-
return row ? [{ s, row }] : [];
|
|
23
|
-
});
|
|
24
|
-
const domain = plot.yDomain;
|
|
25
|
-
const ys = last.map(({ row }) => {
|
|
26
|
-
if (row.y === null) return Number.NaN;
|
|
27
|
-
return (row.y - domain[0]) / (domain[1] - domain[0] || 1) * plot.height;
|
|
28
|
-
});
|
|
29
|
-
const sorted = ys.toSorted((a, b) => a - b);
|
|
30
|
-
if (sorted.some(
|
|
31
|
-
(y, i) => Number.isNaN(y) || i > 0 && y - sorted[i - 1] < END_LABEL_MIN_GAP
|
|
32
|
-
))
|
|
33
|
-
return [];
|
|
34
|
-
return last.map(
|
|
35
|
-
({ s, row }) => decorative(
|
|
36
|
-
text([row], {
|
|
37
|
-
id: `${s.key}-end-label`,
|
|
38
|
-
x: rowX,
|
|
39
|
-
y: "y",
|
|
40
|
-
text: () => s.label,
|
|
41
|
-
fill: s.color,
|
|
42
|
-
fontSize: VX.text.micro,
|
|
43
|
-
anchor: "start",
|
|
44
|
-
dx: END_LABEL_DX
|
|
45
|
-
})
|
|
46
|
-
)
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
13
|
function Lines(props) {
|
|
50
14
|
const { thresholds, ...rest } = props;
|
|
51
15
|
const { series } = props;
|
|
@@ -94,15 +58,13 @@ function Lines(props) {
|
|
|
94
58
|
);
|
|
95
59
|
}
|
|
96
60
|
for (const s of plot.visible) {
|
|
61
|
+
const yScale = yScaleOf(plot, s);
|
|
97
62
|
out.push(lineMark(plot, s));
|
|
98
|
-
out.push(...
|
|
63
|
+
out.push(...loneDots(s, drawnRows(plot, s), yScale, plot.highlighted));
|
|
64
|
+
out.push(...markersOf(s, plot.rows(s.key), yScale));
|
|
99
65
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
plot,
|
|
103
|
-
plotted.filter((s) => s.role !== "reference")
|
|
104
|
-
)
|
|
105
|
-
);
|
|
66
|
+
const labelled = plotted.filter((s) => s.role !== "reference");
|
|
67
|
+
out.push(...endLabelMarks(endLabelPlan(plot, labelled)));
|
|
106
68
|
return out;
|
|
107
69
|
},
|
|
108
70
|
[series, thresholds]
|
|
@@ -76,7 +76,7 @@ function MirroredBars(props) {
|
|
|
76
76
|
Math.floor(width / (foldConfig.minBandPx ?? DEFAULT_MIN_BAND_PX)),
|
|
77
77
|
foldConfig.merge
|
|
78
78
|
) : data;
|
|
79
|
-
const model = xScaleFor(drawn.map(x),
|
|
79
|
+
const model = xScaleFor(drawn.map(x), "flush");
|
|
80
80
|
const visible = visibleSeries(bars, hidden);
|
|
81
81
|
const absentOn = !absentEntry || visible.includes(absentEntry);
|
|
82
82
|
const absentFill = absentEntry ? alpha(absentEntry.color, absentEntry.fillOpacity ?? 1) : VX.neutral;
|
|
@@ -86,7 +86,7 @@ function MirroredBars(props) {
|
|
|
86
86
|
const upMax = paneMax(up, upSeries, drawn, upOn);
|
|
87
87
|
const downMax = paneMax(down, downSeries, drawn, downOn);
|
|
88
88
|
const bandWidth = 2 * model.halfStep * BAND_FILL;
|
|
89
|
-
const bandScale = () => xScaleFor(drawn.map(x),
|
|
89
|
+
const bandScale = () => xScaleFor(drawn.map(x), "flush").scale;
|
|
90
90
|
const pane = (side, cfg, s, on, max) => ({ width: w, height: h }) => {
|
|
91
91
|
const cls = resolveContainerClass(w);
|
|
92
92
|
const whole = chartHeightOf(h, side === "up" ? upFraction : 1 - upFraction, 0);
|
|
@@ -21,6 +21,18 @@ export type SparklineProps = BasaltProps & {
|
|
|
21
21
|
* sparkline's own `width` × `height`, so a loading tile does not shift when the trend lands. */
|
|
22
22
|
state?: ChartState | undefined;
|
|
23
23
|
};
|
|
24
|
+
type Point = {
|
|
25
|
+
i: number;
|
|
26
|
+
v: number | null;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Pools a series to what `width` px can show, so the caller never sizes it: at most one point
|
|
30
|
+
* per `LINE_PX_PER_POINT` (min/max-preserving) or one bar per `BAR_PX_PER_BAR`. A series at or
|
|
31
|
+
* under its cap is returned as is, so a short series draws exactly as before; `width <= 0`
|
|
32
|
+
* (unmeasured) pools nothing. A line is never pooled below its two endpoints.
|
|
33
|
+
*/
|
|
34
|
+
export declare function poolSparkline(rows: readonly Point[], width: number, mark: 'line' | 'bar'): readonly Point[];
|
|
24
35
|
/** `useId` output (`«r1»`, `:r1:`) is not a safe SVG id fragment. */
|
|
25
36
|
export declare function Sparkline(props: SparklineProps): ReactElement;
|
|
37
|
+
export {};
|
|
26
38
|
//# sourceMappingURL=Sparkline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sparkline.d.ts","sourceRoot":"","sources":["../../src/charts/Sparkline.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAQlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,MAAM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EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,2BAA2B;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC;oGACgG;IAChG,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;CAC/B,CAAA;AAED,KAAK,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAwG5C;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,KAAK,EAAE,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GAAG,KAAK,GACnB,SAAS,KAAK,EAAE,CAIlB;AA8ED,qEAAqE;AAErE,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CAyC7D"}
|
package/dist/charts/Sparkline.js
CHANGED
|
@@ -14,6 +14,9 @@ import { CHART_THEME } from "./theme.js";
|
|
|
14
14
|
const LINE_WIDTH = 1.6;
|
|
15
15
|
const DOT_R = 2.5;
|
|
16
16
|
const BAR_GAP = 0.15;
|
|
17
|
+
const LINE_PX_PER_POINT = 1;
|
|
18
|
+
const BAR_PX_PER_BAR = 2;
|
|
19
|
+
const LINE_POOL_MIN = 4;
|
|
17
20
|
const finite = (v) => Number.isFinite(v) ? v : null;
|
|
18
21
|
function extent(rows) {
|
|
19
22
|
let lo = Number.POSITIVE_INFINITY;
|
|
@@ -25,10 +28,69 @@ function extent(rows) {
|
|
|
25
28
|
}
|
|
26
29
|
return lo <= hi ? [lo, hi] : null;
|
|
27
30
|
}
|
|
28
|
-
|
|
31
|
+
const sampleOf = (row) => row.v === null ? null : { row, v: row.v };
|
|
32
|
+
function buckets(rows, count) {
|
|
33
|
+
const size = rows.length / count;
|
|
34
|
+
return Array.from(
|
|
35
|
+
{ length: count },
|
|
36
|
+
(_, b) => rows.slice(Math.round(b * size), Math.round((b + 1) * size))
|
|
37
|
+
).filter((bucket) => bucket.length > 0);
|
|
38
|
+
}
|
|
39
|
+
function runRows(run, beforeGap) {
|
|
40
|
+
const keep = [
|
|
41
|
+
run.lo,
|
|
42
|
+
run.hi,
|
|
43
|
+
...run.afterGap ? [run.first] : [],
|
|
44
|
+
...beforeGap ? [run.last] : []
|
|
45
|
+
];
|
|
46
|
+
const byIndex = new Map(keep.map((k) => [k.row.i, k.row]));
|
|
47
|
+
return [...byIndex.values()].toSorted((a, b) => a.i - b.i);
|
|
48
|
+
}
|
|
49
|
+
function poolLine(rows, cap) {
|
|
50
|
+
const first = rows[0];
|
|
29
51
|
const last = rows.at(-1);
|
|
52
|
+
if (first === void 0 || last === void 0) return rows;
|
|
53
|
+
if (cap < LINE_POOL_MIN) return [first, last];
|
|
54
|
+
const out = [first];
|
|
55
|
+
const endsInGap = () => out.at(-1)?.v === null;
|
|
56
|
+
for (const bucket of buckets(rows.slice(1, -1), Math.floor(cap / 2) - 1)) {
|
|
57
|
+
let run;
|
|
58
|
+
for (const row of bucket) {
|
|
59
|
+
const s = sampleOf(row);
|
|
60
|
+
if (s === null) {
|
|
61
|
+
if (run !== void 0) out.push(...runRows(run, true));
|
|
62
|
+
run = void 0;
|
|
63
|
+
if (!endsInGap()) out.push(row);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
run = run === void 0 ? { first: s, lo: s, hi: s, last: s, afterGap: endsInGap() } : { ...run, lo: s.v < run.lo.v ? s : run.lo, hi: s.v > run.hi.v ? s : run.hi, last: s };
|
|
67
|
+
}
|
|
68
|
+
if (run !== void 0) out.push(...runRows(run, false));
|
|
69
|
+
}
|
|
70
|
+
return last.v === null && endsInGap() ? out : [...out, last];
|
|
71
|
+
}
|
|
72
|
+
function poolBar(rows, cap) {
|
|
73
|
+
const first = rows[0];
|
|
74
|
+
const last = rows.at(-1);
|
|
75
|
+
if (first === void 0 || last === void 0) return rows;
|
|
76
|
+
const furthest = (group) => group.reduce((best, r) => {
|
|
77
|
+
if (r.v === null) return best;
|
|
78
|
+
return best === null || Math.abs(r.v) > Math.abs(best) ? r.v : best;
|
|
79
|
+
}, null);
|
|
80
|
+
if (cap < 2) return [{ i: 0, v: furthest(rows) }];
|
|
81
|
+
const values = cap === 2 ? [first.v, last.v] : [first.v, ...buckets(rows.slice(1, -1), cap - 2).map(furthest), last.v];
|
|
82
|
+
return values.map((v, i) => ({ i, v }));
|
|
83
|
+
}
|
|
84
|
+
function poolSparkline(rows, width, mark) {
|
|
85
|
+
const cap = Math.floor(width / (mark === "bar" ? BAR_PX_PER_BAR : LINE_PX_PER_POINT));
|
|
86
|
+
if (width <= 0 || rows.length <= Math.max(cap, mark === "bar" ? 1 : 2)) return rows;
|
|
87
|
+
return mark === "bar" ? poolBar(rows, cap) : poolLine(rows, cap);
|
|
88
|
+
}
|
|
89
|
+
function compileSparkline(source, [lo, hi], mark, color, emphasisColor) {
|
|
30
90
|
return {
|
|
31
|
-
chart: () => {
|
|
91
|
+
chart: ({ width }) => {
|
|
92
|
+
const rows = poolSparkline(source, width, mark);
|
|
93
|
+
const last = rows.at(-1);
|
|
32
94
|
if (mark === "bar") {
|
|
33
95
|
return {
|
|
34
96
|
marks: [
|
|
@@ -55,7 +117,7 @@ function compileSparkline(rows, [lo, hi], mark, color, emphasisColor) {
|
|
|
55
117
|
};
|
|
56
118
|
}
|
|
57
119
|
const pad = (hi - lo) * 0.1 || 1;
|
|
58
|
-
const xPad = emphasisColor === null ? 0 : (
|
|
120
|
+
const xPad = emphasisColor === null ? 0 : (source.length - 1) * 0.04 || 0.5;
|
|
59
121
|
return {
|
|
60
122
|
marks: [
|
|
61
123
|
lineY(rows, {
|
|
@@ -74,7 +136,7 @@ function compileSparkline(rows, [lo, hi], mark, color, emphasisColor) {
|
|
|
74
136
|
],
|
|
75
137
|
scales: {
|
|
76
138
|
x: {
|
|
77
|
-
scale: scaleLinear().domain([-xPad, Math.max(
|
|
139
|
+
scale: scaleLinear().domain([-xPad, Math.max(source.length - 1, 1) + xPad]),
|
|
78
140
|
axis: false
|
|
79
141
|
},
|
|
80
142
|
y: { scale: scaleLinear().domain([lo - pad, hi + pad]), axis: false }
|
|
@@ -131,5 +193,6 @@ function Sparkline(props) {
|
|
|
131
193
|
);
|
|
132
194
|
}
|
|
133
195
|
export {
|
|
134
|
-
Sparkline
|
|
196
|
+
Sparkline,
|
|
197
|
+
poolSparkline
|
|
135
198
|
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { ChartSeries } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The fields a named state carries wherever one is declared (`BandStrip`'s `states`, `Heatmap`'s):
|
|
4
|
+
* the key, its legend label and color, its fill opacity, and the legend / tooltip / note switches.
|
|
5
|
+
* One base so a field means the same thing on every kind.
|
|
6
|
+
*/
|
|
7
|
+
export type NamedChartState = Pick<ChartSeries<never>, 'key' | 'label' | 'color' | 'tooltip' | 'legend' | 'note' | 'fillOpacity'>;
|
|
1
8
|
/** A run of adjacent slots drawn as one band; `items` are the source data it stands for. */
|
|
2
9
|
export type Group<T> = {
|
|
3
10
|
start: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"band-fold.d.ts","sourceRoot":"","sources":["../../src/charts/band-fold.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"band-fold.d.ts","sourceRoot":"","sources":["../../src/charts/band-fold.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,WAAW,CAAC,KAAK,CAAC,EAClB,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,aAAa,CAC1E,CAAA;AAED,4FAA4F;AAC5F,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,EAAE,CAAA;CAAE,CAAA;AAEpD,8FAA8F;AAC9F,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CASvE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAI3F;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAChD,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,CAAC,GAAG,SAAS,EACxB,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,CAAC,GAAG,SAAS,CAOf"}
|
package/dist/charts/compile.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChartGradient, ChartPositionScaleOptions, ChartTooltipRow as EngineTooltipRow, ChartValue, ResponsiveChartDefinition } from '@tanstack/charts/types/core';
|
|
2
2
|
import type { ContainerClass } from '../tokens/size-classes.js';
|
|
3
|
+
import type { PlotSizes } from './plot-context.js';
|
|
3
4
|
import type { XScaleModel } from './scales.js';
|
|
4
5
|
import type { AxisConfig, CartesianChartProps, ChartSeries, ChartTooltipRow, ChartX, RefLine, ZoneSpec } from './types.js';
|
|
5
6
|
/**
|
|
@@ -8,7 +9,7 @@ import type { AxisConfig, CartesianChartProps, ChartSeries, ChartTooltipRow, Cha
|
|
|
8
9
|
*/
|
|
9
10
|
export type CartesianDefinition = ResponsiveChartDefinition<unknown, ChartValue, number, 'dom'>;
|
|
10
11
|
/** Everything the rung compiles: the public props minus React chrome, plus the host's state. */
|
|
11
|
-
export type CartesianInput<T, X extends ChartX> = Pick<CartesianChartProps<T, X>, 'data' | 'x' | 'series' | 'marks' | 'y' | 'y2' | 'xTicks' | 'formatX' | 'zones' | 'xZones' | 'refLines' | 'cursorGroup' | 'cursorResolution' | 'tooltip'> & {
|
|
12
|
+
export type CartesianInput<T, X extends ChartX> = Pick<CartesianChartProps<T, X>, 'data' | 'x' | 'series' | 'marks' | 'y' | 'y2' | 'xTicks' | 'xDomain' | 'formatX' | 'zones' | 'xZones' | 'refLines' | 'cursorGroup' | 'cursorResolution' | 'tooltip'> & {
|
|
12
13
|
/** Unique per mounted chart (React `useId`): owns what this chart publishes to the cursor. */
|
|
13
14
|
chartId: string;
|
|
14
15
|
/** Series keys the legend has toggled off. */
|
|
@@ -23,6 +24,8 @@ export type CartesianInput<T, X extends ChartX> = Pick<CartesianChartProps<T, X>
|
|
|
23
24
|
reverseRows?: boolean;
|
|
24
25
|
/** Bar kinds: how the left-axis `mark: 'bar'` series combine for the auto domain. */
|
|
25
26
|
stack?: 'stacked' | 'normalized';
|
|
27
|
+
/** The plot area the engine last laid out; `null` before the first layout (the frame stands in). */
|
|
28
|
+
plot?: PlotSizes | null;
|
|
26
29
|
};
|
|
27
30
|
export declare function defaultNumberFormat(v: number): string;
|
|
28
31
|
/** `DD.MM`, read in UTC like the time scale that placed it (a local read shifts a day west of UTC). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/charts/compile.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAEV,aAAa,EAEb,yBAAyB,EACzB,eAAe,IAAI,gBAAgB,EACnC,UAAU,EACV,yBAAyB,EAE1B,MAAM,6BAA6B,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAK5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EAEnB,WAAW,EACX,eAAe,EACf,MAAM,EAEN,OAAO,EAEP,QAAQ,EACT,MAAM,SAAS,CAAA;AAEhB;;;GAGG;AACH,MAAM,MAAM,mBA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