@pond-ts/charts 0.56.2 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1218 -1
- package/dist/AreaChart.d.ts +12 -1
- package/dist/AreaChart.js +131 -13
- package/dist/BarChart.d.ts +84 -9
- package/dist/BarChart.js +295 -40
- package/dist/BarList.d.ts +85 -5
- package/dist/BarList.js +25 -4
- package/dist/BoxList.d.ts +70 -3
- package/dist/BoxList.js +21 -7
- package/dist/BoxPlot.d.ts +2 -1
- package/dist/BoxPlot.js +101 -9
- package/dist/Candlestick.d.ts +13 -1
- package/dist/Candlestick.js +89 -3
- package/dist/ChartContainer.d.ts +79 -48
- package/dist/ChartContainer.js +482 -60
- package/dist/ChartRow.d.ts +9 -2
- package/dist/ChartRow.js +86 -12
- package/dist/HeatMap.d.ts +176 -0
- package/dist/HeatMap.js +344 -0
- package/dist/Layers.d.ts +5 -1
- package/dist/Layers.js +1014 -253
- package/dist/Legend.js +8 -4
- package/dist/LineChart.d.ts +18 -1
- package/dist/LineChart.js +165 -4
- package/dist/ListTable.d.ts +30 -3
- package/dist/ListTable.js +381 -23
- package/dist/ScatterChart.d.ts +3 -2
- package/dist/ScatterChart.js +68 -4
- package/dist/XAxis.js +40 -22
- package/dist/YAxis.d.ts +28 -1
- package/dist/YAxis.js +24 -2
- package/dist/annotations.d.ts +74 -0
- package/dist/annotations.js +97 -7
- package/dist/area.d.ts +34 -1
- package/dist/area.js +88 -1
- package/dist/bars.d.ts +178 -5
- package/dist/bars.js +504 -46
- package/dist/box.d.ts +2 -2
- package/dist/box.js +158 -40
- package/dist/brush.d.ts +142 -0
- package/dist/brush.js +179 -0
- package/dist/child-index.d.ts +27 -0
- package/dist/child-index.js +57 -0
- package/dist/context.d.ts +871 -36
- package/dist/cursors.d.ts +161 -0
- package/dist/cursors.js +503 -0
- package/dist/decimate.d.ts +78 -1
- package/dist/decimate.js +157 -0
- package/dist/heat.d.ts +163 -0
- package/dist/heat.js +659 -0
- package/dist/index.d.ts +13 -4
- package/dist/index.js +25 -2
- package/dist/line.d.ts +137 -0
- package/dist/line.js +328 -0
- package/dist/ohlc.d.ts +16 -1
- package/dist/ohlc.js +93 -4
- package/dist/scatter.d.ts +17 -9
- package/dist/scatter.js +221 -33
- package/dist/select.d.ts +13 -5
- package/dist/select.js +14 -6
- package/dist/selection-fixtures.d.ts +174 -0
- package/dist/selection-fixtures.js +569 -0
- package/dist/selection-stories.d.ts +73 -0
- package/dist/selection-stories.js +301 -0
- package/dist/selectors.d.ts +316 -0
- package/dist/selectors.js +391 -0
- package/dist/span.d.ts +122 -0
- package/dist/span.js +203 -0
- package/dist/sweep.d.ts +154 -0
- package/dist/sweep.js +282 -0
- package/dist/theme.d.ts +517 -11
- package/dist/theme.js +220 -39
- package/dist/tracker.d.ts +6 -0
- package/dist/tracker.js +6 -0
- package/dist/tradingAxis.fixture.d.ts +78 -0
- package/dist/tradingAxis.fixture.js +215 -0
- package/dist/useChartLegend.js +18 -3
- package/package.json +3 -3
package/dist/useChartLegend.js
CHANGED
|
@@ -48,8 +48,10 @@ export function buildChartLegend(container, cursor, rowKey) {
|
|
|
48
48
|
label: spec.label,
|
|
49
49
|
swatch: spec.swatch,
|
|
50
50
|
...(spec.id !== undefined ? { id: spec.id } : {}),
|
|
51
|
-
selected: spec.id !== undefined &&
|
|
52
|
-
|
|
51
|
+
selected: spec.id !== undefined &&
|
|
52
|
+
container.selected.some((m) => m.id === spec.id),
|
|
53
|
+
hovered: spec.id !== undefined &&
|
|
54
|
+
container.hovered.some((m) => m.id === spec.id),
|
|
53
55
|
};
|
|
54
56
|
const last = rows[rows.length - 1];
|
|
55
57
|
if (last !== undefined && last.rowKey === spec.rowKey) {
|
|
@@ -79,7 +81,20 @@ export function buildChartLegend(container, cursor, rowKey) {
|
|
|
79
81
|
select: (row) => {
|
|
80
82
|
if (row.id === undefined)
|
|
81
83
|
return;
|
|
82
|
-
|
|
84
|
+
// Toggle: clicking an already-selected row reports `null`, which a
|
|
85
|
+
// consumer reads as "clear".
|
|
86
|
+
//
|
|
87
|
+
// **Known limitation ([PND-MULTISEL]).** With a multi-member set that
|
|
88
|
+
// clears *everything*, not just this row — the callback's vocabulary is
|
|
89
|
+
// one hit, and "remove this one member" has no representation in it. A
|
|
90
|
+
// legend click also carries no modifiers (see below), so ⌘-click-adds
|
|
91
|
+
// can't be driven from a legend either. Both want the legend row to hand
|
|
92
|
+
// over its own event + identity; that is a legend-surface change rather
|
|
93
|
+
// than part of this wave, and is recorded in the plan. Single-selection
|
|
94
|
+
// behaviour — the only shipped behaviour before this — is unchanged.
|
|
95
|
+
container.select(container.selected.some((m) => m.id === row.id)
|
|
96
|
+
? null
|
|
97
|
+
: seriesSelectInfo(row));
|
|
83
98
|
},
|
|
84
99
|
};
|
|
85
100
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pond-ts/charts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Canvas-rendered, streaming-first time-series charts for pond-ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"perf": "PERF_BENCH=1 playwright test perf.spec.ts --workers=1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@pond-ts/react": "^0.
|
|
42
|
-
"pond-ts": "^0.
|
|
41
|
+
"@pond-ts/react": "^0.58.0",
|
|
42
|
+
"pond-ts": "^0.58.0",
|
|
43
43
|
"react": "^18.0.0 || ^19.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|