ml-time-graph 1.7.1 → 1.7.2
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 +603 -0
- package/QUICKSTART_GRAPH_BUILDER.de.md +1 -1
- package/README.de.md +23 -7
- package/README.md +23 -8
- package/package.json +6 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `ml-time-graph` (TypeScript) and `go-time-graph` (Go) will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
Both libraries are released in lockstep on the same version number.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## [1.7.2] - 2026-09-21
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **The changelog ships with the npm package.** Until now a consumer got no history at all —
|
|
16
|
+
the file lives in the repository root, and npm does not publish anything outside the package
|
|
17
|
+
directory. A `prepack` step copies it in and `postpack` removes it again, so the copy is a
|
|
18
|
+
build artifact rather than a second document: it cannot drift, which is exactly how the two
|
|
19
|
+
per-package changelogs ended up claiming for five releases that the library had stopped at
|
|
20
|
+
1.2.0.
|
|
21
|
+
- **The handbook covers the input adapters** (`book/{de,en}/chapters/02_first_curve.md`). The
|
|
22
|
+
chapter already told the reader that `time` is a number in milliseconds and not a `Date` —
|
|
23
|
+
which is exactly the moment they look at their own rows and wonder. It now answers that in
|
|
24
|
+
the same breath, including why the core stays strict while the edge gives.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- **`CONTRIBUTING.md` and GitLab issue templates** (Bug, Parity, Feature). The library is
|
|
28
|
+
downloaded and used often enough now that reports arrive from people who cannot be asked
|
|
29
|
+
three follow-up questions. The Bug template asks for the chart options, because with them a
|
|
30
|
+
report becomes a failing test in minutes. **Parity** is a template of its own on purpose:
|
|
31
|
+
"TypeScript and Go draw different pictures from the same options" is the one defect class the
|
|
32
|
+
parity harness cannot find by itself, and it needs exactly the material a parity template is
|
|
33
|
+
built from. Both package READMEs now name the reporting route.
|
|
34
|
+
- **`scripts/make-book-images.mjs` — the handbook figures are a build artifact now.** 48 files
|
|
35
|
+
(24 templates, dark and light) that had been hand-made and inherited ever since. The
|
|
36
|
+
generator renders them from the same `go-time-graph/test_data/*.json` the parity harness
|
|
37
|
+
uses, so the handbook shows exactly the charts that are checked. Proof that the
|
|
38
|
+
reconstruction is faithful: 46 of the 48 come out byte-identical to what was committed. The
|
|
39
|
+
other two are `threshold_no_label`, where the committed image predates the 1.6.0 fix and was
|
|
40
|
+
still missing the axis tick that fix restored — the handbook had been showing the bug.
|
|
41
|
+
- **`scripts/make-examples.mjs` — the gallery images are a build artifact now**, and there is a
|
|
42
|
+
fourth one: `ex4.svg` shows **annotation bands**. A state is not a measurement; it does not
|
|
43
|
+
belong in the plot as a fourth curve but as a strip *below* it, where it covers nothing and
|
|
44
|
+
you read in one line **when** something applied.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
- **`ex1.svg` in the README showed a defect that 1.6.0 had fixed.** The image dated from
|
|
48
|
+
17 June and was never regenerated: a dip that starts and ends *on* the warning threshold was
|
|
49
|
+
drawn in the colour of the zone above it. Under the heading "zoned colouring", the picture
|
|
50
|
+
advertised the feature and displayed its bug. The series has been recovered from the old SVG
|
|
51
|
+
(the axes carry their scale, so the readings invert cleanly) and re-rendered — same chart,
|
|
52
|
+
correct colours, verified segment by segment against the threshold pixels. `ex2.svg` carried
|
|
53
|
+
`idfunction now() { [native code] }1` in its element ids, from a `Date.now` passed without the
|
|
54
|
+
call. An image nobody can regenerate ages quietly; these now come from the script, rendered
|
|
55
|
+
out of `dist/` — what the package actually ships.
|
|
56
|
+
- **Two gallery captions described something else than the image showed** (`ex1` was credited
|
|
57
|
+
with threshold fills it does not have; `ex2` is a min/max/avg band, not multi-zone fills).
|
|
58
|
+
- **The `SKILLS.md` link in both READMEs returned 404 on npmjs.com.** It was a *relative* link,
|
|
59
|
+
and npm rewrites those against the `repository` field into a path GitLab does not serve. The
|
|
60
|
+
file is right there in the package, but the place people actually click is the npm page.
|
|
61
|
+
Both READMEs now link absolutely, like every other link in them; each one was checked
|
|
62
|
+
afterwards and returns 200.
|
|
63
|
+
- **`homepage` in `package.json` pointed at GitHub** (`github.com/mlc0911/mlctimegraph`), which
|
|
64
|
+
is a 404 — the project lives on GitLab. That is the "Homepage" link in the npm sidebar, so
|
|
65
|
+
the first link a visitor takes was broken.
|
|
66
|
+
- **The product page metadata (`mlcprodweb/meta.yaml`) said 1.5.2** — five releases behind,
|
|
67
|
+
because `release.mjs` did not know about the file. It does now, so the page cannot fall
|
|
68
|
+
behind again. The same entry claimed 13 demos; there are 15.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## [1.7.1] - 2026-09-21
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
- **`toStepData` / `toStepPoints` are now actually exported** (via `ml-time-graph/internals`).
|
|
76
|
+
1.7.0 announced the staircase geometry as public so that a second output path would draw the
|
|
77
|
+
same step instead of deriving it again — and then shipped it reachable from nowhere. The Go
|
|
78
|
+
port had it right (`renderer.ToStepData`), which is exactly the asymmetry that lets two
|
|
79
|
+
derivations of the same step drift apart.
|
|
80
|
+
- **The link to the Go port in both READMEs returned 403.** It carried the Go *module path*
|
|
81
|
+
(`gitlab.com/mlc0911/mlctimegraph/go-time-graph`) as if it were a web address. `go get`
|
|
82
|
+
resolves it because the Go tooling appends `?go-get=1` and GitLab answers with a meta tag; a
|
|
83
|
+
browser gets no such treatment and GitLab reads the path as namespace/group/project. A
|
|
84
|
+
subdirectory needs the `/-/tree/<branch>/` form. Every absolute link in the published docs was
|
|
85
|
+
checked afterwards — all of them resolve.
|
|
86
|
+
|
|
87
|
+
### Removed
|
|
88
|
+
- **`packages/ml-time-graph/CHANGELOG.md` and `go-time-graph/CHANGELOG.md`.** Both stopped at
|
|
89
|
+
1.2.0 in August and had been telling readers ever since that the library stood still — while
|
|
90
|
+
five releases went out. Every entry in them was a word-for-word duplicate of this file, and
|
|
91
|
+
nothing linked to them. Both libraries ship in lockstep on one version number, so one
|
|
92
|
+
changelog is the honest number of changelogs. The READMEs now link here.
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
- **The PDF companion is mentioned in the package README** (and in `README.de.md` and
|
|
96
|
+
`SKILLS.md`). [mlctimegraph-pdf](https://gitlab.com/mlc0911/mlctimegraphpdf) is the second
|
|
97
|
+
consumer of the same draw commands and writes native PDF vectors — until now it was only
|
|
98
|
+
named in the monorepo README, which npm readers never see. Listed with what it is: 0.2.0, not
|
|
99
|
+
1.0, and a fill on a path still renders opaque and without its hatch there.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## [1.7.0] - 2026-09-21
|
|
104
|
+
|
|
105
|
+
### Fixed
|
|
106
|
+
- **Filled steps (`shape: "step"` + `style.fill`):** The area was built from the raw readings
|
|
107
|
+
and ran as a **ramp** underneath a step line — a triangle missing below every step, one too
|
|
108
|
+
many above it. That is precisely what a step is there to prevent for state-like quantities
|
|
109
|
+
(runtime, stage, operating mode): the fill claimed values nobody measured between two
|
|
110
|
+
readings, so a filled staircase could not be drawn at all. The step is now formed **in data
|
|
111
|
+
space**, before anything is split or drawn (`toStepData` / `ToStepData`): line, area and
|
|
112
|
+
hatch all use the same sequence of points. Both libraries had the same gap — a defect both
|
|
113
|
+
sides share is invisible to a parity comparison until a template shows it. The new
|
|
114
|
+
`step_filled` template shows it.
|
|
115
|
+
- **Zone colours on a step (`colorByThresholds` + `shape: "step"`):** The colour change sat at
|
|
116
|
+
the **interpolated** crossing time, with a horizontal piece at threshold level in between
|
|
117
|
+
that does not exist in the data. The boundary now cuts the vertical jump itself, at the
|
|
118
|
+
reading's timestamp.
|
|
119
|
+
- **No smoothing on a step:** A `smoothing: true` alongside `shape: "step"` is now ignored for
|
|
120
|
+
the line *and* the fill, instead of rounding off the very corners that make the step.
|
|
121
|
+
- **`style.line` as an array (`LineStyle[]`) — one spelling, two pictures:** "A step outline
|
|
122
|
+
plus a smoothed trend line" has been documented all along (USAGE.md, "Series"), and neither
|
|
123
|
+
library delivered it. TypeScript emitted N paths but never read `shape` there, so both layers
|
|
124
|
+
came out as ramps. Go read the shape of the FIRST entry and drew exactly ONE line; the second
|
|
125
|
+
layer was missing entirely. Both now draw N layers, each **in its own shape**: an entry
|
|
126
|
+
without a `shape` is a straight line and does not inherit the first one's step — otherwise
|
|
127
|
+
that exact combination would not be expressible. `seriesType: 'step'` still applies to every
|
|
128
|
+
layer without a shape of its own, and the first entry is the series' shape (fill, zones,
|
|
129
|
+
markers). The new `line_overlay` template holds both sides together.
|
|
130
|
+
- **`line: false` in the Go port:** The field was never read — an explicitly disabled line was
|
|
131
|
+
drawn anyway, which made ghost series impossible.
|
|
132
|
+
- **`opacity` on a line (Go):** was discarded and always written as 1. The value now passes
|
|
133
|
+
through per layer, as it does in TypeScript — the whole point of the array form, letting the
|
|
134
|
+
upper layer show the one below, depended on it.
|
|
135
|
+
- **Per-layer colour (Go):** Every layer would have carried the first entry's colour. The zone
|
|
136
|
+
colour (`colorByThresholds`) still wins over the layer's own colour.
|
|
137
|
+
|
|
138
|
+
### Added
|
|
139
|
+
- **Demo `demos/adapters.html` — "Input Adapters":** one chart built from tuples, a REST payload
|
|
140
|
+
in Unix seconds, a CSV export of strings with an empty cell, and a nested document.
|
|
141
|
+
- **Demo `demos/steps.html` — "Filled Steps":** the area under the staircase, the area against
|
|
142
|
+
a limit, enum states, and a step with a smoothed trend line on top — each with the optional
|
|
143
|
+
hatch, plus a step ↔ line switch.
|
|
144
|
+
- **Parity templates `step_filled` and `line_overlay`:** a filled step with two regions and
|
|
145
|
+
hatching; a step with a smoothed trend line above it. 34 templates now stand at 0/0.
|
|
146
|
+
- **`LineShape` (TS) / `LineStyleSpec.IsArray`, `FlatSeriesStyle.Opacity`, `IDSuffix` (Go):**
|
|
147
|
+
the types that make the array form distinguishable in the first place — `line: [{…}]` and
|
|
148
|
+
`line: {…}` hand out different SVG ids (`-line-<segment>-<layer>` vs `-line-<segment>`), and
|
|
149
|
+
without that field the port could not have told one form from the other.
|
|
150
|
+
- **`toStepData` (TS) / `renderer.ToStepData` (Go):** the staircase geometry as data — public,
|
|
151
|
+
so a second output path draws the same step instead of deriving it again.
|
|
152
|
+
- **`toDataPoints(rows, spec?)` and `toSeries(name, rows, spec?)` — input adapters.** `DataPoint`
|
|
153
|
+
stays strict, because scales, run splitting, zone cuts, the tooltip and the Go port all read
|
|
154
|
+
those two fields; widening the core would push that variance through every one of them. The
|
|
155
|
+
give belongs at the boundary, and until now every caller wrote that `.map()` themselves. The
|
|
156
|
+
adapter takes `[time, value]` tuples, objects with foreign field names (`{ time: 'ts', value:
|
|
157
|
+
'val' }`) and accessor functions for anything nested. Numeric timestamps are milliseconds
|
|
158
|
+
unless `timeUnit: 's'` or `'auto'` says otherwise — and `'auto'` deliberately leaves a relative
|
|
159
|
+
time base (0, 1000, 2000 …) alone instead of shifting it by a factor of 1000. ISO strings and
|
|
160
|
+
`Date`s are recognised on their own, numeric strings are converted, and a missing reading
|
|
161
|
+
(`null`, `undefined`, `NaN`, `''`) becomes a **gap** rather than a zero — a chart must not
|
|
162
|
+
claim a value the sensor never reported. Anything genuinely broken throws and names the row.
|
|
163
|
+
See the new `demos/adapters.html`: the same chart from four input shapes.
|
|
164
|
+
|
|
165
|
+
### Changed
|
|
166
|
+
- **`API_DESIGN.md` is no longer part of the npm package** and is now `DESIGN_NOTES.md`. It
|
|
167
|
+
called itself "API reference (v1.0.0)" but was a **target** design from the cleanup phase: it
|
|
168
|
+
described a `Series { points }` without `seriesType` that never existed, `view` instead of
|
|
169
|
+
`showAs`, two Y axes instead of arbitrarily many, a `src/analyze/` (long since its own
|
|
170
|
+
package) and CJS exports (the library is ESM only). Anyone typing out its examples got code
|
|
171
|
+
that does not compile — and it shipped in every tarball since 1.0.0. What is kept is what was
|
|
172
|
+
recorded nowhere else: principles P1–P9 and the resolved decisions Q1–Q11 with their
|
|
173
|
+
reasoning, each with today's status beside it, including where that status contradicts the
|
|
174
|
+
decision. The phase-by-phase cleanup log is condensed to one paragraph; the full version
|
|
175
|
+
lives in the git history. `USAGE.md` is the user documentation, the generated types are
|
|
176
|
+
binding.
|
|
177
|
+
- **Six `§` references in the source pointed nowhere** — the numbering had shifted, so "fills
|
|
178
|
+
§6" landed on the axes and "theme §12" on the options. They now name a section in `USAGE.md`
|
|
179
|
+
instead of a number that moves again with the next insertion.
|
|
180
|
+
- **`QUICKSTART_GRAPH_BUILDER.md`, `QUICKSTART_GRAPH_BUILDER.de.md` and
|
|
181
|
+
`GRAPH_JSON_STRUCTURE.md` now ship with the npm package** (20 files instead of 17). They used
|
|
182
|
+
to live in the repository only, while linking `USAGE.md` and each other — whoever unpacked
|
|
183
|
+
the package had neither the graph-builder walkthrough nor the full JSON form. Every link
|
|
184
|
+
inside the tarball now resolves to a file inside it. A link to a `GRAPH_JSON_STRUCTURE.de.md`
|
|
185
|
+
that never existed turned up on the way; it points at the English version now.
|
|
186
|
+
|
|
187
|
+
### Removed
|
|
188
|
+
- **`API_DESIGN.md.merged` and `chunks/API_DESIGN-part-*.md`:** md-splitter working files,
|
|
189
|
+
committed by accident — a second copy of the same text that had already started to diverge.
|
|
190
|
+
`chunks/` and `*.md.merged` are in `.gitignore` now.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## [1.6.0] - 2026-09-21
|
|
195
|
+
|
|
196
|
+
### Added
|
|
197
|
+
- **Automatic gap detection in Go (`gaps.autoDetect`):** The Go port now supports
|
|
198
|
+
`gaps.autoDetect: true` with configurable `minGapMs`, matching TypeScript parity.
|
|
199
|
+
- **Marker `lineStyle: "none"`:** Added support for standalone point markers without
|
|
200
|
+
projection lines.
|
|
201
|
+
- **Companion project for PDF output:** [mlctimegraph-pdf](https://gitlab.com/mlc0911/mlctimegraphpdf)
|
|
202
|
+
consumes the same draw commands and writes native PDF vectors — no browser, no SVG parsing.
|
|
203
|
+
Linked from the README as the worked example of what the command-based engine is for.
|
|
204
|
+
- **`renderer.SmoothPath` (Go):** The Catmull-Rom geometry behind smoothed lines is now
|
|
205
|
+
exported as `SmoothPath(points, smoothing, smoothCount) (segments, straight)`, returning
|
|
206
|
+
cubic Bézier segments plus the remaining straight points. The SVG renderer uses the same
|
|
207
|
+
function, so a second output format (PDF) draws the identical curve instead of
|
|
208
|
+
re-deriving it. Control-point rounding is part of the result, not of the SVG formatting.
|
|
209
|
+
- **`ZoneLow` / `zoneLow` on `SplitSegment`:** Explicit lower boundary field on segments
|
|
210
|
+
produced by `splitByBoundaries` / `SplitByBoundaries` in both TypeScript and Go.
|
|
211
|
+
- **12 Edge-Case Fixtures & Golden Templates:** Added comprehensive parity templates
|
|
212
|
+
covering unsorted thresholds, gap detection, steep crossings, step threshold splits,
|
|
213
|
+
single-point aggregations, separate legends, constant values, duplicate timestamps,
|
|
214
|
+
and annotation band overflows (32 total parity test suites passing with 0 diffs).
|
|
215
|
+
|
|
216
|
+
- **`title` on annotation band items:** An item can carry a hover tooltip, rendered as an
|
|
217
|
+
SVG `<title>` child of its rectangle (`SetTitle(...)` in Go, `title` in TypeScript).
|
|
218
|
+
It holds the detail that does not fit as a printed label — a full id, exact times, a
|
|
219
|
+
duration. Interactive only: PDF and raster output drop it, so a chart must stay readable
|
|
220
|
+
without it. `<title>` makes the rectangle a paired element; items without one are
|
|
221
|
+
unchanged and still self-closing.
|
|
222
|
+
|
|
223
|
+
### Changed
|
|
224
|
+
- **`legend.position: "separate"` renders no SVG overlay in Go:** In parity with TypeScript,
|
|
225
|
+
a separate legend delegates rendering entirely to external HTML/DOM callers.
|
|
226
|
+
- **`gapThreshold` actively breaks lines in Go:** `style.line.gapThreshold` in Go now splits
|
|
227
|
+
series segments when time differences exceed the threshold, matching TypeScript behaviour.
|
|
228
|
+
|
|
229
|
+
### Fixed
|
|
230
|
+
- **An annotation band item shorter than one pixel was not drawn at all.** Both ports
|
|
231
|
+
skipped it (`if endX - startX < 1`), and how short that is depends entirely on the
|
|
232
|
+
window: half a minute in a six-hour chart of 800px, a quarter of an **hour** in a
|
|
233
|
+
seven-day one. A five-minute outage was simply absent from the weekly view — not
|
|
234
|
+
shortened, not a hairline: gone. For a chart used as evidence that is the one failure
|
|
235
|
+
mode that must not exist, because a reader cannot notice what was never drawn. Such an
|
|
236
|
+
item is now drawn one pixel wide, clamped to stay inside the plot. One pixel claims no
|
|
237
|
+
duration — the exact times are the item's own data — it says “here was something”.
|
|
238
|
+
Items lying entirely outside the window are still dropped; that is a different
|
|
239
|
+
statement. Found in mlcsensormonitor on 20.09.2026, on a report with 32 events in six
|
|
240
|
+
hours.
|
|
241
|
+
|
|
242
|
+
- **Thresholds without `label` no longer suppress axis ticks:** Suppressing ticks required an
|
|
243
|
+
explicit label string; unlabelled thresholds no longer trigger nil pointer crashes in Go or
|
|
244
|
+
suppress neighbouring axis tick values.
|
|
245
|
+
- **Multi-axis marker projection targeting correct value scale:** Standalone markers targeting
|
|
246
|
+
series on secondary or arbitrary Y-axes (`seriesIndex > 0`) now map against the target series'
|
|
247
|
+
scale instead of erroneously projecting onto axis 0.
|
|
248
|
+
- **Zoned line coloring with unsorted thresholds:** Zone colors are now resolved using `ZoneLow`
|
|
249
|
+
and the highest reached boundary, rather than the caller's input slice ordering.
|
|
250
|
+
- **Zoned fills for dips and peaks returning to the same threshold:** Corrected `above` / `below`
|
|
251
|
+
determination for segments whose endpoints start and end on the boundary value.
|
|
252
|
+
- **Duplicate boundary intersection points:** Eliminated duplicate points and empty 2-point
|
|
253
|
+
segments in `splitByBoundaries` (TS) and `SplitByBoundaries` (Go) when crossing values coincide.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## [1.5.2] - 2026-09-19
|
|
258
|
+
|
|
259
|
+
### Fixed
|
|
260
|
+
- **A dip that returns to the same threshold was coloured as if it were above it.**
|
|
261
|
+
`colorByThresholds` derived a segment's zone from the *mean of its endpoints*. A
|
|
262
|
+
spike below the lowest threshold starts and ends exactly ON it, so the mean landed
|
|
263
|
+
on the boundary and `>=` counted it as “above”: the whole excursion was drawn in
|
|
264
|
+
the colour of the zone above, while the markers of the same points carried the
|
|
265
|
+
right one. On a chart used as evidence, green where it was not in order is the
|
|
266
|
+
worst statement a picture can make. The zone now comes from the split itself
|
|
267
|
+
(`splitByBoundaries` already computes it from the crossing).
|
|
268
|
+
|
|
269
|
+
- **`FillRegion.outer` limits a fill; it no longer filters it.** It used to drop
|
|
270
|
+
every sub-segment that ran past the outer bound. For a zone corridor — “fill
|
|
271
|
+
between the line and the warning limit, but never past the hard limit” — that
|
|
272
|
+
tore a HOLE exactly where the excursion was worst. It now clamps: the fill stops
|
|
273
|
+
at the bound and what lies beyond belongs to the next region. Anyone who really
|
|
274
|
+
wants to filter can say so with two regions.
|
|
275
|
+
|
|
276
|
+
Both found in mlcsensormonitor on 19.09.2026, both invisible until a fixture
|
|
277
|
+
provoked them: no template had data crossing a colour threshold and returning, and
|
|
278
|
+
none used `outer` at all. The new fixture `fill_outer_clamp` covers both. No
|
|
279
|
+
existing golden changed.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## [1.5.1] - 2026-09-19
|
|
284
|
+
|
|
285
|
+
### Fixed
|
|
286
|
+
- **The Go port drew a grid when none was configured**, while TypeScript drew
|
|
287
|
+
none — the same JSON produced two different charts. Now both follow the
|
|
288
|
+
TypeScript rule: a grid appears only when `axes.x.grid.major` or
|
|
289
|
+
`axes.left.grid.major` is set, and setting either gives both axes one.
|
|
290
|
+
|
|
291
|
+
It went unnoticed for as long as it did because *every* fixture set the grid
|
|
292
|
+
explicitly; it surfaced the moment a new one left it out (19.09.2026). No
|
|
293
|
+
existing golden changed — which is the proof that only the previously
|
|
294
|
+
undefined case is affected. The new fixture `grid_default` pins it.
|
|
295
|
+
|
|
296
|
+
**If you use the Go port and rely on the implicit grid, set it explicitly**
|
|
297
|
+
before upgrading: `axes: { x: { grid: { major: {} } }, left: { grid: { major: {} } } }`.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## [1.5.0] - 2026-09-19
|
|
302
|
+
|
|
303
|
+
### Changed
|
|
304
|
+
- **A series is clipped to the plot area** (`clipSeries`, default `true`; set it to
|
|
305
|
+
`false` to opt out — every clipped group carries a `clip-path` and a browser may
|
|
306
|
+
give it its own layer, which is nothing for a handful of series and worth
|
|
307
|
+
measuring for dozens). Only thresholds were clipped before,
|
|
308
|
+
because series data is practically always inside the domain — with an automatic
|
|
309
|
+
domain it cannot be otherwise. The moment a caller *fixes* the time axis and
|
|
310
|
+
passes points outside it (the last reading before the window, so the curve runs
|
|
311
|
+
to the edge instead of starting in mid-air), the series painted into the axis
|
|
312
|
+
gutter: line and markers sat on top of the axis labels. A canvas that does not
|
|
313
|
+
keep to its own bounds makes every fixed range unusable. TS and Go; the fixture
|
|
314
|
+
goldens gained the clip and nothing else. Two new fixtures (`series_clip`,
|
|
315
|
+
`series_clip_off`) pin both switch positions — until now no fixture had data
|
|
316
|
+
outside its range, which is why nobody noticed. A demo card shows both side by
|
|
317
|
+
side (Styles → “Clip an der festen Zeitachse”).
|
|
318
|
+
- **A threshold is no longer labelled with its own name.** Leaving `label` out used
|
|
319
|
+
to mean “paint the name”. But `name` is an IDENTIFIER — it wires
|
|
320
|
+
`colorByThresholds`, fill regions and CSS classes — so an invisible anchor
|
|
321
|
+
(`line: 'none'`, used to colour a line by zone) shouted its internal name into
|
|
322
|
+
the chart: `z_hi`, `w_lo` right next to real captions like “Grenze ↑ 8”. That is
|
|
323
|
+
not a default, it is a leak. Now: nothing given, nothing drawn. `label: true`
|
|
324
|
+
asks for the name explicitly, a string or `{ text }` sets your own, and
|
|
325
|
+
`label: false` keeps working. TS and Go, one contract.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## [1.4.0] - 2026-09-18
|
|
330
|
+
|
|
331
|
+
### Added
|
|
332
|
+
- **`getLineStyle` and `drawMarker` are public** (TypeScript). Both were internal,
|
|
333
|
+
and both are exactly what a caller needs to draw its **own** legend: a swatch
|
|
334
|
+
has to show the same dash pattern and the same symbol as the curve it names.
|
|
335
|
+
The built-in legend is left/right only and not clickable, so callers do draw
|
|
336
|
+
their own — and until now each of them re-implemented the dash table on the
|
|
337
|
+
outside. Such a copy drifts silently: the swatch then advertises a line the
|
|
338
|
+
chart does not contain, which only shows up on a black-and-white print, where
|
|
339
|
+
colour no longer tells the series apart. `drawMarker` emits `DrawCommand`s;
|
|
340
|
+
feed them to the already-exported `SVGRenderer` for SVG. The Go port keeps both
|
|
341
|
+
helpers internal for now; no renderer changed for this one.
|
|
342
|
+
- **`opaqueColor` / `hasAlpha`** (TypeScript, `patterns/hatch.js`): the two colour
|
|
343
|
+
rules the hatch derivation below is built on, exported so a caller can follow
|
|
344
|
+
the same rule. Mirrored 1:1 in Go (`pkg/renderer`, unexported).
|
|
345
|
+
- **`resolveDash(variant, strokeWidth?, dashed?)`** (TypeScript): what the renderer
|
|
346
|
+
*actually* draws, including the two historical exceptions — `dashed` and `dotted`
|
|
347
|
+
keep their fixed `"4,4"` / `"2,4"` patterns, everything else comes from the
|
|
348
|
+
scale-aware table. It used to be a private method of `SVGRenderer`, so a caller
|
|
349
|
+
drawing its own legend had to re-derive it and got `getLineStyle`'s `"6, 4"` for
|
|
350
|
+
`dashed`: a swatch dashed 6-on-4 beside a curve dashed 4-on-4. The renderer now
|
|
351
|
+
calls the exported function — one rule, one place. Output is byte-identical.
|
|
352
|
+
- **`LegendItem` carries `line` and `marker`** (TS + Go): the line variant of the
|
|
353
|
+
series and its marker shape, so `chart.legendItems()` is enough to draw a legend
|
|
354
|
+
that matches the curves. `marker` is omitted when the chart does not actually
|
|
355
|
+
draw one (a series whose `markers.threshold` hides them above n samples) —
|
|
356
|
+
a symbol in the legend that is missing from the chart states something untrue.
|
|
357
|
+
Both fields are optional and the built-in legend ignores them: nothing rendered
|
|
358
|
+
changes.
|
|
359
|
+
- **`LegendItem` and `DrawCommand` are exported from the main entry.** Both are
|
|
360
|
+
the types of main-entry functions (`chart.legendItems()`, `drawMarker`), so the
|
|
361
|
+
recipe below could not be written in typed code without them. The rest of the
|
|
362
|
+
DrawCommand model stays behind `/internals`.
|
|
363
|
+
- **Docs: „Drawing your own legend"** — USAGE.md gets the recipe and the reason a
|
|
364
|
+
coloured block stops working as soon as series differ by more than colour (any
|
|
365
|
+
print, any red-green deficiency); the manual (`book/`, chapter 4) gets the same
|
|
366
|
+
in prose. The legend demo now draws the swatch that way and hides a series on
|
|
367
|
+
click — it used to demonstrate the coloured block.
|
|
368
|
+
|
|
369
|
+
### Changed
|
|
370
|
+
- **A hatch now takes the colour of the area it marks** (TS + Go). The pattern
|
|
371
|
+
lines were always `#4D88FF` — blue hatching on a red zone, on charts whose
|
|
372
|
+
colours *are* the statement. An extra colour there does not decorate, it says
|
|
373
|
+
something, and what it said was nothing. The lines now use the fill's colour at
|
|
374
|
+
full strength; a translucent fill stays the backdrop as given, an opaque one is
|
|
375
|
+
drawn at 30 % so the lines have something to stand out against. A caller that
|
|
376
|
+
wants a different line colour still passes one to `getHatch`.
|
|
377
|
+
|
|
378
|
+
`getHatch`'s `linecolor` parameter therefore no longer defaults to blue — it is
|
|
379
|
+
optional, and left out means "derive from the fill". The only fixture affected
|
|
380
|
+
is `hatch_patterns`; its Go golden was regenerated and parity re-checked.
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## [1.3.3] - 2026-09-04
|
|
385
|
+
|
|
386
|
+
> **1.3.2 wurde uebersprungen.** Die Tags `v1.3.2` und `go-time-graph/v1.3.2`
|
|
387
|
+
> wurden versehentlich auf den Commit *vor* der Versionsanhebung gesetzt und
|
|
388
|
+
> gepusht; `proxy.golang.org` hatte sie bereits geholt, und sein Inhalt ist
|
|
389
|
+
> unveraenderlich. Sie zu verschieben haette Pruefsummenfehler bei jedem
|
|
390
|
+
> ausgeloest, der das Modul schon gezogen hat. Der Go-Tag `v1.3.2` existiert
|
|
391
|
+
> also und traegt alle Aenderungen dieser Fassung — nur meldet
|
|
392
|
+
> `pkg/version.Version` dort noch 1.3.1. Auf npm gibt es keine 1.3.2.
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
### Added
|
|
396
|
+
- **`scripts/render-book-images.mts`**: renders every fixture twice — light and
|
|
397
|
+
dark — into `book/images/`. There was no script at all before; the eighteen
|
|
398
|
+
figures in the manual were hand-copied Go goldens, which is why they were
|
|
399
|
+
stale the moment a renderer changed and why every one of them carried the
|
|
400
|
+
white background the golden test paints (`SetBackgroundColor("white")`) — a
|
|
401
|
+
white box on mlcgo.eu's dark pages. Both sets now come out of one run:
|
|
402
|
+
missing one of them would show a gap, not the other version.
|
|
403
|
+
|
|
404
|
+
### Fixed
|
|
405
|
+
- **`setDefaultTheme()` only half worked (TS)**: `style/resolver.ts` read the
|
|
406
|
+
runtime theme, the other 132 accesses in the render path read the static
|
|
407
|
+
object from `theme/defaults.ts` — so setting a theme changed the series
|
|
408
|
+
colour and left the axes, grid, labels and legend alone. Worse than no theme
|
|
409
|
+
at all, and the documented example in `theme/runtime.ts` promised the
|
|
410
|
+
opposite. The `theme` facade now reads the runtime value.
|
|
411
|
+
- **`seriesType: "step"` drew a ramp, in both libraries (TS + Go)**: the older,
|
|
412
|
+
documented way to ask for a step chart was assigned, described in the model
|
|
413
|
+
docs — and read by nobody on the render path. Go never looked at
|
|
414
|
+
`SeriesType`; in TS `style/resolver.ts` knew the mapping but `MLTimeGraph`
|
|
415
|
+
took a different route and never asked it. `style.line.shape: "step"` was the
|
|
416
|
+
only thing that worked. The canonical `step_sensor` example therefore drew
|
|
417
|
+
diagonal transitions instead of steps — and the parity check could not see
|
|
418
|
+
it, because both libraries were wrong in the same way. A comparison of two
|
|
419
|
+
implementations finds no fault they share.
|
|
420
|
+
|
|
421
|
+
## [1.3.1] - 2026-09-04
|
|
422
|
+
|
|
423
|
+
### Fixed
|
|
424
|
+
- **Crash on a threshold without a label (Go)**: `Threshold.Label` is a pointer
|
|
425
|
+
and `nil` is the normal case — a threshold configured without an explicit
|
|
426
|
+
label. The tick-suppression pass added in 1.3.0 dereferenced it unchecked, so
|
|
427
|
+
`RenderCommands` panicked on every such chart. Found while integrating 1.3.0
|
|
428
|
+
into mlcsensor; a regression test now covers it.
|
|
429
|
+
- **A threshold without a label drew nothing in the Go port (Go)**: `nil` was
|
|
430
|
+
read as "no label" while the TypeScript side has always read it as "label
|
|
431
|
+
from the threshold's name" (`threshold_renderer.ts`: `if (t.label !== false)`
|
|
432
|
+
with `labelObj?.text ?? t.name`). The same JSON therefore produced a labelled
|
|
433
|
+
line in the browser and a bare one on the server — in the most common
|
|
434
|
+
configuration of all. Only an explicit `label: false` suppresses it now.
|
|
435
|
+
New fixture `threshold_no_label` covers the case in the parity test, which is
|
|
436
|
+
why nobody noticed: every existing fixture sets a label.
|
|
437
|
+
|
|
438
|
+
## [1.3.0] - 2026-09-04
|
|
439
|
+
|
|
440
|
+
Includes everything that was bumped to 1.2.1 and 1.2.2 in `package.json` but never tagged and never
|
|
441
|
+
published — npm and the Go module both went from 1.2.0 straight to this release.
|
|
442
|
+
|
|
443
|
+
This release **changes what is drawn**, on both sides. Most of it is a rendering difference between
|
|
444
|
+
the two libraries being removed — the same JSON now produces the same chart in TypeScript and in Go
|
|
445
|
+
across all thirteen reference configurations, checked element by element on every test run. The
|
|
446
|
+
visible changes are listed under *Changed* and *Fixed*; the one to read before upgrading is the new
|
|
447
|
+
id scheme.
|
|
448
|
+
|
|
449
|
+
### Added
|
|
450
|
+
- **Marker shapes `plus`, `triangle-down`, `hexagon`, `hourglass` and `line-horizontal` for series,
|
|
451
|
+
in both libraries**: they only ever existed in the TypeScript annotation renderer. A series could
|
|
452
|
+
not use them, and the Go port did not know them at all — a `pointStyle: "hexagon"` silently fell
|
|
453
|
+
through to a circle there.
|
|
454
|
+
|
|
455
|
+
### Changed
|
|
456
|
+
- **Series id scheme (TS + Go, breaking)**: the prefix of every element id of a series was a
|
|
457
|
+
timestamp in TS (`id1788523516216-…`, different on every render) and the raw series name in Go
|
|
458
|
+
(`Temperatur (min/max/avg)-…` — with spaces and parentheses, not a valid id). Both sides now
|
|
459
|
+
derive it the same way: an explicit `id` from the configuration verbatim, otherwise
|
|
460
|
+
`s-<crc32 of the name>`. The same checksum in both languages, so a chart rendered on the server
|
|
461
|
+
and one rendered in the browser address the same elements. **If you select elements by id, your
|
|
462
|
+
selectors need updating.**
|
|
463
|
+
- **One marker drawing routine instead of two (TS)**: `annotation/marker.ts` kept its own. The same
|
|
464
|
+
`pointStyle` looked different depending on where it came from, and an annotation point had no
|
|
465
|
+
outline while a series point did. Annotations now use the same routine as series, which gives an
|
|
466
|
+
annotation point a 1.5px outline — 0.75px larger than before, and exactly what the Go port has
|
|
467
|
+
always drawn.
|
|
468
|
+
- **Per-series group in the Go port (Go)**: the port set no id on the `<g>` and wrote the raw name
|
|
469
|
+
into the class attribute — `class="series series-Solid Line"` is in fact three classes. Now as in
|
|
470
|
+
TS: `<g class="series series--solid-line" id="series-solid-line">`, so a whole measurement series
|
|
471
|
+
can be shown or hidden through one selector.
|
|
472
|
+
- **Axis stroke width (TS)**: `axes.*.axis.width` now defaults to `1` instead of `undefined`, so
|
|
473
|
+
the SVG carries `stroke-width="1"` on the axis line and its ticks. The Go port has always used
|
|
474
|
+
that default. The line looks the same — 1 is the SVG default — but the two outputs no longer
|
|
475
|
+
differ on every axis line, and an inherited `line { stroke-width: … }` from the embedding page no
|
|
476
|
+
longer drags the axis along.
|
|
477
|
+
- **Tooltip performance (from 1.2.1)**: `mousemove` is coalesced through `requestAnimationFrame`,
|
|
478
|
+
and `Intl` formatters are cached (`src/intl_cache.ts`).
|
|
479
|
+
- **Cleanup (from 1.2.2)**: refactoring for large time series, generated docs, formatting.
|
|
480
|
+
|
|
481
|
+
### Fixed
|
|
482
|
+
- **`showAs: "minmaxavg"` in the Go port (Go)**: the port never evaluated `showAs`. An aggregated
|
|
483
|
+
series was reduced to its averages and drawn as one ordinary line in the default colour — no
|
|
484
|
+
boundaries, no fill, and `minColor`, `maxColor`, `avgColor`, `avgDashed`, `fillToMax`,
|
|
485
|
+
`fillToMin` were all ignored. The same JSON produced two entirely different pictures.
|
|
486
|
+
`renderer.RenderMinMaxAvg` now draws what the TypeScript side draws.
|
|
487
|
+
- **Marker lines and labels in the Go port (Go)**: `YRange` arrives as `[bottom, top]`, but the
|
|
488
|
+
names in the marker renderer were assigned by position — and were therefore swapped. A
|
|
489
|
+
`to-value` line ran from the top edge down to the point instead of up from the baseline,
|
|
490
|
+
`to-top` the other way round, and a marker label ended up at `yTop - 6`, i.e. **below** the plot
|
|
491
|
+
area (y=354 instead of y=14).
|
|
492
|
+
- **`style.line.shape: "step"` (TS)**: the type knew the field and `renderStep()` existed — nobody
|
|
493
|
+
in `MLTimeGraph` ever read it. A series configured as a step chart came out as a straight line in
|
|
494
|
+
the browser while the Go port drew the steps.
|
|
495
|
+
- **`colorByThresholds` against an explicit line colour (TS)**: the zone colour only applied when
|
|
496
|
+
no `style.line.color` was set, which made the option silently useless in almost every real
|
|
497
|
+
configuration. The base colour is now the default that the zone colour overrides, as in the Go
|
|
498
|
+
port.
|
|
499
|
+
- **Threshold references by id (TS)**: the lookup table was keyed by name only. A `fillSpec`
|
|
500
|
+
referring to a threshold by its `id` did not find it and threw — `thresholds_fill_demo` could not
|
|
501
|
+
be rendered in TypeScript at all, while the port produced the chart. The key is now the id, else
|
|
502
|
+
the name, as in the port and as for a threshold's CSS class.
|
|
503
|
+
- **Axis titles in the Go port (Go)**: `axes.{left,right,x}.label` was never drawn — the field
|
|
504
|
+
exists in the model, nobody read it. A chart with "Temp (°C)" on the left axis came out of the
|
|
505
|
+
backend without that title.
|
|
506
|
+
- **Grid style in the Go port (Go)**: `axes.*.grid.major.{color,width,opacity,style}` was ignored,
|
|
507
|
+
the port always used the theme values. A dashed grid at half opacity came out as a solid line at
|
|
508
|
+
full opacity.
|
|
509
|
+
- **Tick labels overprinted by threshold labels (Go)**: a threshold at 20 carrying a label
|
|
510
|
+
("WARNING HIGH (20°C)") and the axis tick at the same height ("20") were drawn on top of each
|
|
511
|
+
other. The axis could prevent that all along — `ValueAxisConfig.SuppressLabelsNear` exists — but
|
|
512
|
+
nobody filled it in. The TypeScript side has done so since 7859993.
|
|
513
|
+
- **Marker stroke width and colour in the Go port (Go)**: `style.markers.stroke`, `.fill` and
|
|
514
|
+
`.strokeWidth` were not passed through at all — a configured marker colour had no effect — and
|
|
515
|
+
without one the stroke width was missing entirely instead of the theme's 1.5.
|
|
516
|
+
- **Duplicate ids on aggregated series (TS + Go)**: a minmaxavg series with a data gap is split
|
|
517
|
+
into several runs, and every run received the same ids — `<id>-max-line-0` appeared twice in one
|
|
518
|
+
document. Ids have to be unique: `getElementById` otherwise returns whichever element it finds
|
|
519
|
+
first, and `#id` in a stylesheet matches only one of the two. The fills now carry the run index
|
|
520
|
+
themselves (`-fillToMax-<run>-fill-0`), the lines get it through the segment index `renderLine`
|
|
521
|
+
appends anyway (`-max-line-0`, `-max-line-1`). Side effect: all fills now sit behind all lines
|
|
522
|
+
instead of only behind those of their own run.
|
|
523
|
+
- **Series id (TS)**: `"id" + Date.now + …` — without the parentheses. Every series without an id
|
|
524
|
+
of its own was therefore called `idfunction now() { [native code] }<n>`; with spaces and braces
|
|
525
|
+
that is not a valid id, and those elements were reachable neither through `getElementById` nor
|
|
526
|
+
through a CSS selector.
|
|
527
|
+
- **Gap labels (TS)**: the SVG renderer wrote `textBaseline="middle"` — that is the Canvas API
|
|
528
|
+
name; in SVG the attribute is called `dominant-baseline`. The browser ignored it silently and the
|
|
529
|
+
label sat vertically off its intended position. The Go port was never affected.
|
|
530
|
+
- **Alignment of text edges (TS + Go)**: `textBaseline: "top" | "bottom"` was passed through to
|
|
531
|
+
`dominant-baseline` unchanged. Those are not valid values there, the browser fell back to `auto`,
|
|
532
|
+
and the label sat on its baseline instead of at the intended edge. Both libraries now map to
|
|
533
|
+
`text-top` / `text-bottom`.
|
|
534
|
+
- **Star shape of annotation markers (TS)**: an annotation's star was drawn with inner radius 0.4,
|
|
535
|
+
a series' star with 0.5 — the same `pointStyle: "star"` looked different depending on where it
|
|
536
|
+
came from. Both are 0.5 now, as in the Go port.
|
|
537
|
+
- **Hatch pattern numbering (Go)**: the port counted from 1, the TypeScript side from 0 — the same
|
|
538
|
+
drawing referred to `hatch-dots-0` in the browser and `hatch-dots-1` on the server.
|
|
539
|
+
- **Mini axis of an annotation band in the Go port (Go)**: it was written into the band as loose
|
|
540
|
+
lines instead of its own `annotation-band-axis` group, as the TypeScript side does — it could not
|
|
541
|
+
be addressed as a whole.
|
|
542
|
+
- **Smoothing control points (TS)**: after rounding to two decimals the renderer truncated again at
|
|
543
|
+
three (`Math.trunc(x * 1000) / 1000`). That could not improve anything but could make it worse:
|
|
544
|
+
259.83 is not exact in binary, times 1000 gives 259829.99999999997, and out came 259.829. The
|
|
545
|
+
step is gone.
|
|
546
|
+
- **Zone crossing timestamps (TS)**: rounded to whole milliseconds. The Go port cannot do otherwise
|
|
547
|
+
— its timestamp is an `int64` — and without the rounding the crossing points of the two libraries
|
|
548
|
+
drifted apart from the sixth decimal onwards.
|
|
549
|
+
- **Large data series (from 1.2.1)**: `Math.min(...arr)` / `Math.max(...arr)` replaced with
|
|
550
|
+
explicit loops. The spread blows the call stack on long series
|
|
551
|
+
(`RangeError: Maximum call stack size exceeded`).
|
|
552
|
+
|
|
553
|
+
## [1.2.0] - 2026-08-28
|
|
554
|
+
|
|
555
|
+
### Added
|
|
556
|
+
- **Configurable Axis Offsets**: Added `offset?: number` (TS) and `Offset *float64` (Go) to `YAxisConfig` for explicit pixel placement of stacked vertical axes, eliminating label collisions when using custom units/formatters.
|
|
557
|
+
- **Go Interactive Coordinate Math**: Added `Project(timeMs, value, axisIndex)`, `InvertTime(px)`, and `InvertValue(py, axisIndex)` methods to Go's `MLTimeGraph` for 1:1 parity with the TypeScript interactive calculations.
|
|
558
|
+
- **Fluent Builder Extensions**:
|
|
559
|
+
- TypeScript `TimeSeriesBuilder`: Added `setYAxisIndex()`, `setColor()`, and `setData()`.
|
|
560
|
+
- Go `GraphBuilder` & `TimeSeriesBuilder`: Added `AddSeries()`, `SetYAxis()`, `SetYAxisIndex()`, `SetLineColor()`, and `SetColor()`.
|
|
561
|
+
- **Interactive Multi-Axis Demo**: Added comprehensive multi-axis examples to the demo gallery (`demos/src/demos/multi-axis.ts`), including an Environmental Station (4 axes: 2 left, 2 right) and Industrial Telemetry Dashboard (4 axes: 1 left, 3 right stacked) with external HTML legends.
|
|
562
|
+
|
|
563
|
+
### Fixed
|
|
564
|
+
- **Time-Axis Baseline Span**: Fixed horizontal time-axis baseline rendering in both TypeScript (`TimeAxis.render`) and Go (`TimeAxis.Render`) to span the complete chart plot width (`[x0, x1]`) instead of cutting off at the last tick coordinate.
|
|
565
|
+
- **Multi-Axis Placement Parity**: Fixed an issue where vertical axes with index $\ge 2$ were forced to the right side; both engines now respect `position: "left" | "right"` for any index.
|
|
566
|
+
- **Demo Container Widths**: Adjusted zoom and rolling MKT demo charts to fit within card container boundaries with dynamic viewBox ratio calculations for brush interactions.
|
|
567
|
+
- **Internationalization**: Translated all German UI text, demo titles, descriptions, and code comments to English.
|
|
568
|
+
|
|
569
|
+
### Changed
|
|
570
|
+
- **Modularized Graph Builders**: Refactored monolithic `graph_builder.ts` into modular classes under `packages/ml-time-graph/src/builders/`.
|
|
571
|
+
- **Modularized Spatial Math**: Refactored `spatial.ts` in `ml-time-analyze` into a structured module under `src/spatial/`.
|
|
572
|
+
- **Code Formatting**: Adopted Prettier across all TypeScript and JavaScript sources.
|
|
573
|
+
- **Documentation**: Updated `USAGE.md`, `BUILDER.md`, `JSON_CONFIG.md`, `API_REFERENCE.md`, and READMEs with multi-axis and coordinate conversion guides.
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
## [1.1.1] - 2026-08-28
|
|
578
|
+
|
|
579
|
+
### Added
|
|
580
|
+
- **`attachTooltip` Documentation & API**: Detailed usage guide for tooltip integration, hover picks, and server-side DOM-free SVG export.
|
|
581
|
+
- **`SKILLS.md` Guide**: 60-second architecture map and workflow guide for developers and agents.
|
|
582
|
+
|
|
583
|
+
### Fixed
|
|
584
|
+
- **Tooltip Viewport Flipping**: Improved tooltip positioning to flip automatically across cursor axes when nearing plot area edges.
|
|
585
|
+
|
|
586
|
+
---
|
|
587
|
+
|
|
588
|
+
## [1.1.0] - 2026-08-28
|
|
589
|
+
|
|
590
|
+
### Added
|
|
591
|
+
- **Go Locale-Aware Time Formatting**: Added dependency-free i18n date/time formatting for Go (`en-US`, `de-DE`, `fr-FR`, `es-ES`, etc.).
|
|
592
|
+
|
|
593
|
+
### Fixed
|
|
594
|
+
- **Value Axis Tick De-duplication**: Resolved duplicate rounded tick labels on value axes with small numeric domains.
|
|
595
|
+
- **Annotation Band Vertical Alignment**: Centered labels vertically within annotation bands across TypeScript and Go.
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
## [1.0.7] - 2026-08-28
|
|
600
|
+
|
|
601
|
+
### Added
|
|
602
|
+
- **Lockstep Release Workflow**: Unified versioning across `packages/ml-time-graph` and `go-time-graph`.
|
|
603
|
+
- **SVG Baseline Gallery**: Comprehensive golden rendering test suite for Go chart rendering.
|
|
@@ -117,7 +117,7 @@ Varianten hängen Arrays an. Alle geben `this` zurück.
|
|
|
117
117
|
Beispiele:
|
|
118
118
|
|
|
119
119
|
```ts
|
|
120
|
-
//
|
|
120
|
+
// Schwellenwert: `fill` ist eine Zeichenkette ("above" | "below" | "none") und
|
|
121
121
|
// `line` ist eine Zeichenkette ("solid" | "dashed" | "dotted" | "none");
|
|
122
122
|
// die Deckkraft ist ein separates Feld.
|
|
123
123
|
g.addThreshold({
|
package/README.de.md
CHANGED
|
@@ -8,7 +8,7 @@ schnell und unkompliziert aufbereiten, mit Fokus auf Reporting und Incident-Anal
|
|
|
8
8
|
> Voll typisiert · i18n-aware · DOM-freier SVG-Renderer (Browser & serverseitig) · keine Laufzeit-Abhängigkeiten · ESM-only
|
|
9
9
|
|
|
10
10
|
> 🤖 **Sie arbeiten mit einem KI-Assistenten?** Geben Sie ihm
|
|
11
|
-
> **[SKILLS.md](SKILLS.md)** — die Datei wird mitgeliefert und liegt nach
|
|
11
|
+
> **[SKILLS.md](https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/SKILLS.md)** — die Datei wird mitgeliefert und liegt nach
|
|
12
12
|
> `npm install` unter `node_modules/ml-time-graph/SKILLS.md`. Eine Seite: der
|
|
13
13
|
> kürzeste Weg zum Diagramm, die vier Einstiegspunkte, die üblichen Aufgaben und
|
|
14
14
|
> ein Abschnitt **Traps** für die Stellen, an denen ein Modell danebengreift
|
|
@@ -77,15 +77,19 @@ mount('#chart', {
|
|
|
77
77
|
## Galerie
|
|
78
78
|
|
|
79
79
|
<p align="center">
|
|
80
|
-
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex1.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex1.svg" alt="Linie
|
|
81
|
-
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex2.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex2.svg" alt="
|
|
80
|
+
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex1.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex1.svg" alt="Linie nach Schwellenwert-Zonen eingefärbt, mit Datenlücken" width="300"></a>
|
|
81
|
+
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex2.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex2.svg" alt="Min/Max/Avg-Band mit schraffierten Flächen" width="300"></a>
|
|
82
82
|
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex3.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex3.svg" alt="stdDevBand + movingMkt-Overlays auf einem Sensorstrom" width="300"></a>
|
|
83
|
+
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex4.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex4.svg" alt="Annotationsbänder markieren Betriebszustände unter dem Diagramm" width="300"></a>
|
|
83
84
|
</p>
|
|
84
85
|
|
|
85
|
-
Typische Sensor-Darstellung
|
|
86
|
-
Incident-Reports
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
Typische Sensor-Darstellung, Min/Max/Avg mit Schraffuren für
|
|
87
|
+
Incident-Reports, ein Sensorstrom mit Statistik-Overlays (±2σ-Band +
|
|
88
|
+
12-h-MKT) und Annotationsbänder, die Betriebszustände und Ereignisse
|
|
89
|
+
*unterhalb* des Diagramms markieren — dort verdecken sie nichts, und man
|
|
90
|
+
liest in einer Zeile ab, **wann** etwas galt. Alles dieselbe Library, alles
|
|
91
|
+
in der Demo-Galerie zu sehen (`pnpm dev`); die Bilder selbst entstehen mit
|
|
92
|
+
`node scripts/make-examples.mjs`.
|
|
89
93
|
|
|
90
94
|
---
|
|
91
95
|
|
|
@@ -101,10 +105,22 @@ Sowohl die TypeScript- als auch die Go-Bibliothek:
|
|
|
101
105
|
|
|
102
106
|
---
|
|
103
107
|
|
|
108
|
+
## 🐞 Fehler gefunden?
|
|
109
|
+
|
|
110
|
+
Issues liegen unter
|
|
111
|
+
[gitlab.com/mlc0911/mlctimegraph/-/issues](https://gitlab.com/mlc0911/mlctimegraph/-/issues).
|
|
112
|
+
Die Vorlagen fragen nach deinen Chart-Optionen — damit wird aus einer Meldung in
|
|
113
|
+
Minuten ein fehlschlagender Test. Einzelheiten in
|
|
114
|
+
[CONTRIBUTING.md](https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/CONTRIBUTING.md).
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
104
118
|
## 📜 Versionsverlauf
|
|
105
119
|
|
|
106
120
|
Beide Bibliotheken werden im Gleichschritt unter einer Versionsnummer veröffentlicht —
|
|
107
121
|
deshalb gibt es **ein** Changelog für beide: [CHANGELOG.md](https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/CHANGELOG.md).
|
|
122
|
+
Es liegt auch dem Paket bei — die Historie genau der Version, die du installiert hast, liegt
|
|
123
|
+
damit neben dem Code.
|
|
108
124
|
|
|
109
125
|
---
|
|
110
126
|
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ clear, readable charts quickly, with a focus on reporting and incident analysis.
|
|
|
8
8
|
> Fully typed · i18n-aware · DOM-free SVG output (browser & server) · zero runtime dependencies · ESM-only
|
|
9
9
|
|
|
10
10
|
> 🤖 **Working with an AI coding assistant?** Point it at
|
|
11
|
-
> **[SKILLS.md](SKILLS.md)** — it ships inside the package, so after
|
|
11
|
+
> **[SKILLS.md](https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/SKILLS.md)** — it ships inside the package, so after
|
|
12
12
|
> `npm install` it sits at `node_modules/ml-time-graph/SKILLS.md`. One page:
|
|
13
13
|
> the shortest path to a chart, the four entry points, the recipes, and a
|
|
14
14
|
> **Traps** section for the places a model guesses wrong (timestamps are epoch
|
|
@@ -77,15 +77,19 @@ mount('#chart', {
|
|
|
77
77
|
## Gallery
|
|
78
78
|
|
|
79
79
|
<p align="center">
|
|
80
|
-
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex1.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex1.svg" alt="Line
|
|
81
|
-
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex2.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex2.svg" alt="
|
|
82
|
-
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex3.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex3.svg" alt="stdDevBand + movingMkt
|
|
80
|
+
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex1.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex1.svg" alt="Line coloured by threshold zones, with gaps" width="300"></a>
|
|
81
|
+
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex2.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex2.svg" alt="Min/max/avg band with hatched fills" width="300"></a>
|
|
82
|
+
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex3.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex3.svg" alt="stdDevBand + movingMkt overlays on a sensor stream" width="300"></a>
|
|
83
|
+
<a href="https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/packages/ml-time-graph/ex4.svg"><img src="https://gitlab.com/mlc0911/mlctimegraph/-/raw/main/packages/ml-time-graph/ex4.svg" alt="Annotation bands marking operating states below the chart" width="300"></a>
|
|
83
84
|
</p>
|
|
84
85
|
|
|
85
|
-
A typical sensor visualisation
|
|
86
|
-
incident-style reports
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
A typical sensor visualisation, min/max/avg with hatched fills for
|
|
87
|
+
incident-style reports, a sensor stream with statistic overlays (±2σ band +
|
|
88
|
+
12 h MKT), and annotation bands marking operating states and events *below*
|
|
89
|
+
the chart — where they cover nothing and you read in one line **when**
|
|
90
|
+
something applied. All rendered with the same library, all live in the demo
|
|
91
|
+
gallery (`pnpm dev`); the images themselves come from
|
|
92
|
+
`node scripts/make-examples.mjs`.
|
|
89
93
|
|
|
90
94
|
---
|
|
91
95
|
|
|
@@ -101,10 +105,21 @@ Both the TypeScript and Go libraries:
|
|
|
101
105
|
|
|
102
106
|
---
|
|
103
107
|
|
|
108
|
+
## 🐞 Found a bug?
|
|
109
|
+
|
|
110
|
+
Issues live at
|
|
111
|
+
[gitlab.com/mlc0911/mlctimegraph/-/issues](https://gitlab.com/mlc0911/mlctimegraph/-/issues).
|
|
112
|
+
The templates ask for your chart options — with them a report becomes a failing
|
|
113
|
+
test in minutes. [CONTRIBUTING.md](https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/CONTRIBUTING.md) has the details.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
104
117
|
## 📜 Release history
|
|
105
118
|
|
|
106
119
|
Both libraries are released in lockstep on one version number, so there is **one**
|
|
107
120
|
changelog for both: [CHANGELOG.md](https://gitlab.com/mlc0911/mlctimegraph/-/blob/main/CHANGELOG.md).
|
|
121
|
+
It ships with this package too, so the history of the exact version you installed is right
|
|
122
|
+
next to the code.
|
|
108
123
|
|
|
109
124
|
---
|
|
110
125
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ml-time-graph",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "TypeScript library for time-series chart rendering — DOM-free SVG output (works in the browser and on the server).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"README.md",
|
|
32
32
|
"README.de.md",
|
|
33
33
|
"USAGE.md",
|
|
34
|
+
"CHANGELOG.md",
|
|
34
35
|
"QUICKSTART_GRAPH_BUILDER.md",
|
|
35
36
|
"QUICKSTART_GRAPH_BUILDER.de.md",
|
|
36
37
|
"GRAPH_JSON_STRUCTURE.md",
|
|
@@ -40,7 +41,9 @@
|
|
|
40
41
|
"build": "tsup",
|
|
41
42
|
"test": "vitest run",
|
|
42
43
|
"typecheck": "tsc --noEmit",
|
|
43
|
-
"prepublishOnly": "tsup"
|
|
44
|
+
"prepublishOnly": "tsup",
|
|
45
|
+
"prepack": "node ../../scripts/sync-changelog.mjs",
|
|
46
|
+
"postpack": "node ../../scripts/sync-changelog.mjs --clean"
|
|
44
47
|
},
|
|
45
48
|
"keywords": [
|
|
46
49
|
"chart",
|
|
@@ -59,7 +62,7 @@
|
|
|
59
62
|
},
|
|
60
63
|
"author": "Michael Lechner",
|
|
61
64
|
"license": "SEE LICENSE IN LICENSE",
|
|
62
|
-
"homepage": "https://
|
|
65
|
+
"homepage": "https://gitlab.com/mlc0911/mlctimegraph",
|
|
63
66
|
"repository": {
|
|
64
67
|
"type": "git",
|
|
65
68
|
"url": "git+https://gitlab.com/mlc0911/mlctimegraph.git",
|