@pond-ts/charts 0.34.1 → 0.35.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 +19 -1
- package/dist/line.js +13 -1
- package/dist/theme.d.ts +9 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,8 @@ The `@pond-ts` packages — `pond-ts`, `@pond-ts/react`, `@pond-ts/charts`, and
|
|
|
8
8
|
them all. Pre-1.0: minor bumps may include new features and type-level changes;
|
|
9
9
|
patch bumps are strictly additive.
|
|
10
10
|
|
|
11
|
-
[Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.
|
|
11
|
+
[Unreleased]: https://github.com/pjm17971/pond-ts/compare/v0.35.0...HEAD
|
|
12
|
+
[0.35.0]: https://github.com/pjm17971/pond-ts/compare/v0.34.1...v0.35.0
|
|
12
13
|
[0.34.1]: https://github.com/pjm17971/pond-ts/compare/v0.34.0...v0.34.1
|
|
13
14
|
[0.34.0]: https://github.com/pjm17971/pond-ts/compare/v0.33.0...v0.34.0
|
|
14
15
|
[0.33.0]: https://github.com/pjm17971/pond-ts/compare/v0.32.0...v0.33.0
|
|
@@ -30,6 +31,23 @@ patch bumps are strictly additive.
|
|
|
30
31
|
[0.19.0]: https://github.com/pjm17971/pond-ts/compare/v0.18.0...v0.19.0
|
|
31
32
|
[0.18.0]: https://github.com/pjm17971/pond-ts/compare/v0.17.1...v0.18.0
|
|
32
33
|
|
|
34
|
+
## [0.35.0] — 2026-07-02
|
|
35
|
+
|
|
36
|
+
A `@pond-ts/charts` release: per-series line dash patterns. `pond-ts`,
|
|
37
|
+
`@pond-ts/react`, and `@pond-ts/fit` carry no code changes — republished in
|
|
38
|
+
lock-step (their `pond-ts` / `@pond-ts/react` peer ranges widen to `^0.35.0`).
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **Charts — per-series line dash (`LineStyle.dash`).** A theme's line style
|
|
43
|
+
accepts an optional `dash?: readonly number[]` — a px on/off pattern
|
|
44
|
+
(`[6, 4]` dashed, `[2, 3]` ≈ dotted; omit or `[]` = solid) applied to the
|
|
45
|
+
series stroke. Lets a theme set a **modeled / forecast** line (e.g. GARCH
|
|
46
|
+
vol) apart from an observed one at a glance. Distinct from a `GapMode`'s
|
|
47
|
+
inferred gap-bridge dashing (which marks *missing data*, not the whole
|
|
48
|
+
line). Additive: existing themes are unaffected; a solid line never touches
|
|
49
|
+
`setLineDash`. New `Charts/LineChart → LineStyles` story. (#313)
|
|
50
|
+
|
|
33
51
|
## [0.34.1] — 2026-07-01
|
|
34
52
|
|
|
35
53
|
A `pond-ts` core patch: fixes a performance regression introduced in 0.34.0.
|
package/dist/line.js
CHANGED
|
@@ -69,7 +69,19 @@ export function drawLine(ctx, cs, xScale, yScale, style, curve = curveLinear, ga
|
|
|
69
69
|
gen(ys);
|
|
70
70
|
ctx.strokeStyle = style.color;
|
|
71
71
|
ctx.lineWidth = style.width;
|
|
72
|
-
|
|
72
|
+
// Per-series dash (a modeled/forecast line reads dashed). Applied only when
|
|
73
|
+
// set — a solid line never touches `setLineDash` — then reset to solid right
|
|
74
|
+
// after the stroke so it can't leak into the gap-bridge overlay below (which
|
|
75
|
+
// sets its own dash) or the next layer drawn on this context.
|
|
76
|
+
const dash = style.dash;
|
|
77
|
+
if (dash && dash.length > 0) {
|
|
78
|
+
ctx.setLineDash(dash.slice());
|
|
79
|
+
ctx.stroke();
|
|
80
|
+
ctx.setLineDash([]);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
ctx.stroke();
|
|
84
|
+
}
|
|
73
85
|
// Overlay bridges for the inferred-gap modes. `dashed` / `step` are faint
|
|
74
86
|
// dashed connectors (gapConnectorOpacity); only `fade` drops to the axis floor.
|
|
75
87
|
if (gaps === 'dashed' || gaps === 'step' || gaps === 'fade') {
|
package/dist/theme.d.ts
CHANGED
|
@@ -138,6 +138,15 @@ export interface ChartTheme {
|
|
|
138
138
|
export interface LineStyle {
|
|
139
139
|
readonly color: string;
|
|
140
140
|
readonly width: number;
|
|
141
|
+
/**
|
|
142
|
+
* Optional dash pattern — px on/off lengths (`[6, 4]` = 6 on, 4 off; `[2, 3]`
|
|
143
|
+
* ≈ dotted). Omit or `[]` for a solid stroke. This is the *series'* own style
|
|
144
|
+
* — distinct from a {@link GapMode}'s inferred faint gap-bridge dashing (that
|
|
145
|
+
* marks missing data; this marks the whole line). Use it to set a **modeled**
|
|
146
|
+
* series (a forecast / smoothed estimate, e.g. GARCH vol) apart from an
|
|
147
|
+
* observed one at a glance.
|
|
148
|
+
*/
|
|
149
|
+
readonly dash?: readonly number[];
|
|
141
150
|
}
|
|
142
151
|
/** A resolved band style: fill colour + opacity (0–1) for the variance envelope. */
|
|
143
152
|
export interface BandStyle {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pond-ts/charts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.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.35.0",
|
|
42
|
+
"pond-ts": "^0.35.0",
|
|
43
43
|
"react": "^18.0.0 || ^19.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|