@pond-ts/charts 0.43.0 → 0.44.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 +105 -1
- package/dist/BarChart.js +24 -1
- package/dist/BoxPlot.d.ts +80 -28
- package/dist/BoxPlot.js +67 -40
- package/dist/ChartContainer.d.ts +16 -8
- package/dist/ChartContainer.js +72 -26
- package/dist/Layers.js +31 -22
- package/dist/ScatterChart.d.ts +33 -6
- package/dist/ScatterChart.js +36 -16
- package/dist/XAxis.js +7 -5
- package/dist/box.d.ts +26 -9
- package/dist/box.js +86 -42
- package/dist/context.d.ts +39 -9
- package/dist/data.d.ts +73 -30
- package/dist/data.js +79 -21
- package/dist/format.d.ts +4 -2
- package/dist/format.js +7 -3
- package/dist/scatter.d.ts +2 -2
- package/dist/scatter.js +8 -5
- package/dist/tradingTimeScale.d.ts +6 -0
- package/dist/tradingTimeScale.js +6 -0
- package/package.json +3 -3
|
@@ -83,6 +83,12 @@ type TickGranularity = 'session' | 'week' | 'month' | 'quarter' | 'year';
|
|
|
83
83
|
* `count` buckets and returns the first open in each; beyond yearly it decimates
|
|
84
84
|
* every-nth so the axis never crowds. Exported so the container can draw session
|
|
85
85
|
* dividers at the same instants the axis labels.
|
|
86
|
+
*
|
|
87
|
+
* `count` is a **cap**, not a target: grains jump by 4–12× up the ladder, so a
|
|
88
|
+
* small fixed count over-coarsens long spans (a mid-year-anchored 12-month daily
|
|
89
|
+
* run spans 6 quarter buckets — capped at 5 it collapses to year grain, 2
|
|
90
|
+
* ticks). Callers size the cap to the room the labels have — the container
|
|
91
|
+
* derives it from plot width — rather than passing a small constant.
|
|
86
92
|
*/
|
|
87
93
|
export declare function coarsenCalendar(opens: readonly number[], count: number): {
|
|
88
94
|
ticks: number[];
|
package/dist/tradingTimeScale.js
CHANGED
|
@@ -52,6 +52,12 @@ const COARSENING_LADDER = [
|
|
|
52
52
|
* `count` buckets and returns the first open in each; beyond yearly it decimates
|
|
53
53
|
* every-nth so the axis never crowds. Exported so the container can draw session
|
|
54
54
|
* dividers at the same instants the axis labels.
|
|
55
|
+
*
|
|
56
|
+
* `count` is a **cap**, not a target: grains jump by 4–12× up the ladder, so a
|
|
57
|
+
* small fixed count over-coarsens long spans (a mid-year-anchored 12-month daily
|
|
58
|
+
* run spans 6 quarter buckets — capped at 5 it collapses to year grain, 2
|
|
59
|
+
* ticks). Callers size the cap to the room the labels have — the container
|
|
60
|
+
* derives it from plot width — rather than passing a small constant.
|
|
55
61
|
*/
|
|
56
62
|
export function coarsenCalendar(opens, count) {
|
|
57
63
|
if (opens.length <= count)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pond-ts/charts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.1",
|
|
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.44.0",
|
|
42
|
+
"pond-ts": "^0.44.0",
|
|
43
43
|
"react": "^18.0.0 || ^19.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|