ml-time-graph 1.10.0 → 1.11.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 +25 -0
- package/README.de.md +2 -2
- package/README.md +1 -1
- package/SKILLS.md +37 -0
- package/dist/index.d.ts +6 -288
- package/dist/index.js +9 -9
- package/dist/interaction/index.d.ts +1 -1
- package/dist/internals.d.ts +50 -5
- package/dist/internals.js +4 -4
- package/dist/{marker_renderer-D6rDW2Pe.d.ts → marker_renderer-CiccLy7h.d.ts} +318 -2
- package/dist/{scale-B3MhoTu1.d.ts → scale-DQ-IdB6t.d.ts} +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,31 @@ release notes, and every change is in `git log` in full.
|
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
+
## [1.11.0] - 2026-10-05
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **`CommandBuilder` now covers every draw command**, in both libraries, and is reachable:
|
|
26
|
+
`ml-time-graph/internals` exports it, Go has `renderer.NewCommandBuilder()`. It sets the `type`
|
|
27
|
+
field for you, chains, nests groups — and skips a group whose body stays empty, which every
|
|
28
|
+
renderer used to guard by hand. Until 1.11.0 the TypeScript class had exactly one method
|
|
29
|
+
(`addLine`) and no entry point named it, so nobody could use it; the Go port had none at all.
|
|
30
|
+
`renderLegend` is built with it in both ports, so it runs on every reference chart.
|
|
31
|
+
- **A panel behind the legend.** `legend.box` draws a background and a border under the entries —
|
|
32
|
+
`box: {}` is enough and takes the defaults (white, a grey hairline, 6 px padding, 85 % opaque).
|
|
33
|
+
It is meant for `inside-left` / `inside-right`, where the legend sits over the data and a dense
|
|
34
|
+
curve or a filled area makes it hard to read. `stroke: 'none'` keeps the background without a
|
|
35
|
+
border. Nothing is drawn without `box`, so every existing chart looks as it did.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
- **A labelled threshold no longer deletes the axis number at its height unless the two can
|
|
39
|
+
actually meet.** The axis dropped every tick label within 8 px of a labelled threshold, looking
|
|
40
|
+
only at the height and never at where the threshold's label sits. With the default position
|
|
41
|
+
(`'right'`, inside the plot) a humidity chart lost exactly its `100` at the left axis while
|
|
42
|
+
the label "saturation" stood at the far right. A tick label now gives way only to a threshold
|
|
43
|
+
label in the gutter of the same side: `'outside-left'` for a left axis, `'outside-right'` for a
|
|
44
|
+
right one. Expect axis numbers to reappear in charts with labelled thresholds — ten of the
|
|
45
|
+
reference templates gained one to three each, nothing else moved. Both ports, same rule.
|
|
46
|
+
|
|
22
47
|
## [1.10.0] - 2026-10-05
|
|
23
48
|
|
|
24
49
|
### Added
|
package/README.de.md
CHANGED
|
@@ -171,7 +171,7 @@ deshalb gibt es **ein** Changelog für beide: [CHANGELOG.md](https://gitlab.com/
|
|
|
171
171
|
Es liegt auch dem Paket bei — die Historie genau der Version, die du installiert hast, liegt
|
|
172
172
|
damit neben dem Code.
|
|
173
173
|
|
|
174
|
-
### Warum schon 1.
|
|
174
|
+
### Warum schon 1.X, und warum so viele Minor-Versionen?
|
|
175
175
|
|
|
176
176
|
Weil die Bibliothek täglich im Einsatz ist, und der Einsatz findet, was ein sauberer Entwurf
|
|
177
177
|
nicht findet.
|
|
@@ -219,7 +219,7 @@ go get gitlab.com/mlc0911/mlctimegraphpdf
|
|
|
219
219
|
mtg-pdf -in chart.json -out chart.pdf
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
Noch jung: Version 0.
|
|
222
|
+
Noch jung: Version 0.X.0, nicht 1.0, und ein, zwei Fähigkeiten hinter dieser Bibliothek. Was man
|
|
223
223
|
vorher wissen sollte — eine Füllung auf einem *Pfad*, also die Fläche unter einer Linie oder
|
|
224
224
|
einer Treppe, kommt derzeit deckend und ohne Schraffur heraus, weil nur Rechtecke beides
|
|
225
225
|
durchreichen. Linien, Marker, Text, Strichmuster, Kurvengeometrie und rechteckige Füllungen sind
|
package/README.md
CHANGED
|
@@ -170,7 +170,7 @@ changelog for both: [CHANGELOG.md](https://gitlab.com/mlc0911/mlctimegraph/-/blo
|
|
|
170
170
|
It ships with this package too, so the history of the exact version you installed is right
|
|
171
171
|
next to the code.
|
|
172
172
|
|
|
173
|
-
### Why already at 1.
|
|
173
|
+
### Why already at 1.X, and why so many minor releases?
|
|
174
174
|
|
|
175
175
|
Because the library is in daily professional use, and use finds what a clean design does not.
|
|
176
176
|
|
package/SKILLS.md
CHANGED
|
@@ -295,6 +295,43 @@ labels are drawn later still and stay on top either way.
|
|
|
295
295
|
is *meant* to cover it, or when a faint raster behind the data is enough. One setting governs the
|
|
296
296
|
whole grid; `axes.x` wins over `axes.left`, same as for the style.
|
|
297
297
|
|
|
298
|
+
### Building draw commands — `CommandBuilder`
|
|
299
|
+
```ts
|
|
300
|
+
import { CommandBuilder } from 'ml-time-graph/internals';
|
|
301
|
+
|
|
302
|
+
const b = new CommandBuilder();
|
|
303
|
+
b.rect({ x: 0, y: 0, w: 10, h: 10, fill: '#eee' })
|
|
304
|
+
.text({ content: 'Label', x: 14, y: 9 })
|
|
305
|
+
.group({ cssClass: 'marks' }, (g) => g.circle({ cx: 5, cy: 5, r: 2 }));
|
|
306
|
+
const group = b.toGroup({ cssClass: 'my-layer' });
|
|
307
|
+
```
|
|
308
|
+
For anyone producing draw commands — a custom layer, an annotation of your own, a renderer that
|
|
309
|
+
feeds the same `SVGRenderer`. It sets `type` for you, chains, and nests.
|
|
310
|
+
|
|
311
|
+
Two rules worth knowing. `group` draws **nothing** when its body adds nothing, so you cannot leave
|
|
312
|
+
an empty `<g>` behind; `toGroup` always returns a group, because a function that promises one must
|
|
313
|
+
deliver one. And `commands` hands out a copy — what you do with it afterwards cannot reach back
|
|
314
|
+
into the chart.
|
|
315
|
+
|
|
316
|
+
In Go it is `renderer.NewCommandBuilder()` with the same methods.
|
|
317
|
+
|
|
318
|
+
### A panel behind the legend — `legend.box`
|
|
319
|
+
```ts
|
|
320
|
+
legend: { show: true, position: 'inside-right', box: {} }
|
|
321
|
+
```
|
|
322
|
+
A legend inside the plot sits **over** the data, and over a dense curve or a filled area it can be
|
|
323
|
+
unreadable. `box` puts a quiet panel under it. Like the grid, it is drawn only when you ask:
|
|
324
|
+
`box: {}` takes the defaults — white, a grey hairline, 6 px padding, 85 % opaque, so the data still
|
|
325
|
+
shows through faintly. `fill`, `stroke`, `strokeWidth`, `padding` and `opacity` override them, and
|
|
326
|
+
`stroke: 'none'` keeps the background without a border.
|
|
327
|
+
|
|
328
|
+
The panel takes the place where the entries would otherwise end, rather than pushing them around:
|
|
329
|
+
turning it on does not move the legend out over the plot edge. With an outside legend the padding
|
|
330
|
+
is reserved as real space, so the border never reaches into the plot.
|
|
331
|
+
|
|
332
|
+
There are no rounded corners — the draw-command model has no corner radius, and adding one would
|
|
333
|
+
mean changing SVG, Go and the PDF renderer for a rounding.
|
|
334
|
+
|
|
298
335
|
### Legend Placement
|
|
299
336
|
`inside-left` / `inside-right` draw over the plot, `outside-left` / `outside-right` beside it,
|
|
300
337
|
`above` / `below` as a horizontal strip that wraps into as many rows as the entries need — the
|
package/dist/index.d.ts
CHANGED
|
@@ -1,289 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export { v as AggregatedShowAs, w as AggregationConfig, x as AggregationMode, y as AnnotationKind, z as AxisOrientation, B as DataPointRef, E as EnumMap, C as FillBound, I as FillRegion, J as FillSide, K as FillStyle, N as GapConfig, O as GapLabel, Q as GapRegion, U as GapStyle, V as LineShape, W as LineStyle, X as MarkerStyle, Y as MovingAverageType, Z as SVGLineStyle, _ as SensorType, $ as SeriesOverlay, a0 as SeriesOverlayKind, a1 as SeriesType, a2 as ShadowStyle, a3 as SolidDashStyle, a4 as ThresholdLabelConfig, a5 as getLineStyle, a6 as resolveDash } from './scale-
|
|
5
|
-
|
|
6
|
-
/*!
|
|
7
|
-
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
8
|
-
* MIT with Attribution: free use incl. commercial requires visible credit to
|
|
9
|
-
* "Michael Lechner". Commercial license (no attribution) on request. See LICENSE.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/** Tick density / sizing for one axis. */
|
|
13
|
-
interface TickConfig {
|
|
14
|
-
/** Target number of major (labelled) ticks. */
|
|
15
|
-
major?: number;
|
|
16
|
-
/** How many minor ticks to place between two major ticks. Default 0 = off. */
|
|
17
|
-
minor?: number;
|
|
18
|
-
/** Tick mark length in px. */
|
|
19
|
-
size?: number;
|
|
20
|
-
}
|
|
21
|
-
/** Grid line styling for one tick level. `false` disables that grid level. */
|
|
22
|
-
interface GridLineStyle {
|
|
23
|
-
color?: string;
|
|
24
|
-
width?: number;
|
|
25
|
-
style?: LineVariant;
|
|
26
|
-
opacity?: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Per-axis grid configuration. Each tick level (major / minor) can be styled
|
|
30
|
-
* independently or disabled. Defaults: major grid shown with theme colours,
|
|
31
|
-
* minor grid off.
|
|
32
|
-
*/
|
|
33
|
-
interface GridStyle {
|
|
34
|
-
major?: GridLineStyle | false;
|
|
35
|
-
/**
|
|
36
|
-
* Zwischengitter -- die Linien zwischen den Hauptlinien.
|
|
37
|
-
*
|
|
38
|
-
* Wieviele es sind, sagt `ticks.minor`; steht dort nichts, ist EINE je
|
|
39
|
-
* Hauptabstand gemeint. Ohne eigene `opacity` sind sie halb so kraeftig wie
|
|
40
|
-
* das Hauptgitter: ein Zwischengitter in voller Staerke macht aus der
|
|
41
|
-
* Orientierung ein zweites Raster.
|
|
42
|
-
*
|
|
43
|
-
* **Eine Angabe gilt fuer beide Richtungen.** Wie beim Hauptgitter gewinnt
|
|
44
|
-
* `axes.x.grid.minor`, sonst `axes.left.grid.minor` -- ein Gitter mit zwei
|
|
45
|
-
* Stilen waere zwei Gitter.
|
|
46
|
-
*/
|
|
47
|
-
minor?: GridLineStyle | false;
|
|
48
|
-
/**
|
|
49
|
-
* Wann das Gitter gezeichnet wird.
|
|
50
|
-
*
|
|
51
|
-
* `'front'` (Vorgabe) heisst: NACH den Serien -- eine Flaeche bis zur
|
|
52
|
-
* Grundlinie verdeckt es dann nicht, und die Linien des Gitters liegen
|
|
53
|
-
* sichtbar ueber der Kurve. Marker, Annotationen und Beschriftungen kommen
|
|
54
|
-
* trotzdem darueber.
|
|
55
|
-
*
|
|
56
|
-
* `'back'` zeichnet es als ERSTES, noch vor Highlights und Schwellenwerten.
|
|
57
|
-
* Das ist die Wahl, wenn eine deckende Flaeche das Gitter verschlucken SOLL
|
|
58
|
-
* -- oder wenn ein feines Raster hinter den Daten genuegt.
|
|
59
|
-
*
|
|
60
|
-
* Eine Angabe gilt fuer das ganze Gitter; wie beim Stil gewinnt `axes.x`
|
|
61
|
-
* vor `axes.left`.
|
|
62
|
-
*/
|
|
63
|
-
layer?: GridLayer;
|
|
64
|
-
}
|
|
65
|
-
/** Axis baseline + tick marks styling. */
|
|
66
|
-
interface AxisStyle {
|
|
67
|
-
color?: string;
|
|
68
|
-
width?: number;
|
|
69
|
-
}
|
|
70
|
-
/** Tick / axis-label text styling. */
|
|
71
|
-
interface AxisLabelsStyle {
|
|
72
|
-
color?: string;
|
|
73
|
-
fontSize?: number;
|
|
74
|
-
}
|
|
75
|
-
/** Configuration for one Y-axis (left or right). */
|
|
76
|
-
interface YAxisConfig {
|
|
77
|
-
/** Position is 'left' or 'right' to determine placement side. Defaults to 'left'. */
|
|
78
|
-
position?: AxisPosition;
|
|
79
|
-
/** Optional explicit horizontal pixel offset from chart edge (defaults to index * 50px). */
|
|
80
|
-
offset?: number;
|
|
81
|
-
/** Rotated label drawn next to the axis. */
|
|
82
|
-
label?: string;
|
|
83
|
-
/** Override the value domain. `'auto'` lets the chart compute it from data. */
|
|
84
|
-
domain?: [number, number] | "auto";
|
|
85
|
-
/**
|
|
86
|
-
* Extra room above and below the data, **in pixels**. Ignored when `domain`
|
|
87
|
-
* is set explicitly — then you decide the range.
|
|
88
|
-
*
|
|
89
|
-
* The computed domain ends exactly at the smallest and largest reading, and
|
|
90
|
-
* the plot is clipped to its rectangle. A line of width 10 at the maximum
|
|
91
|
-
* therefore loses half its stroke, and a marker half its disc. That is right
|
|
92
|
-
* for the *value* and wrong for the *picture*.
|
|
93
|
-
*
|
|
94
|
-
* Pixels rather than a share of the range: the cause is in pixels
|
|
95
|
-
* (`style.line.width`, `markers.size`), and the same number then works for a
|
|
96
|
-
* series in °C and one in kW. A rule of thumb is half the widest stroke plus
|
|
97
|
-
* a little — `padding: 8` covers a 10 px line and a size-6 marker.
|
|
98
|
-
*
|
|
99
|
-
* ```ts
|
|
100
|
-
* axes: { left: { padding: 8 } }
|
|
101
|
-
* axes: { left: { padding: { top: 24, bottom: 4 } } } // room for a label
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
104
|
-
padding?: number | {
|
|
105
|
-
top?: number;
|
|
106
|
-
bottom?: number;
|
|
107
|
-
};
|
|
108
|
-
/** Format a tick value into its label text. */
|
|
109
|
-
format?: (value: number) => string;
|
|
110
|
-
/** Tick density / sizing. */
|
|
111
|
-
ticks?: TickConfig;
|
|
112
|
-
/** Per-tick-level grid styling. */
|
|
113
|
-
grid?: GridStyle;
|
|
114
|
-
/** Axis baseline + tick marks styling. */
|
|
115
|
-
axis?: AxisStyle;
|
|
116
|
-
/** Tick label text styling. */
|
|
117
|
-
labels?: AxisLabelsStyle;
|
|
118
|
-
}
|
|
119
|
-
/** Configuration for the X (time) axis. */
|
|
120
|
-
interface XAxisConfig {
|
|
121
|
-
/** Label drawn below the axis. */
|
|
122
|
-
label?: string;
|
|
123
|
-
/** Override the time domain. `'auto'` lets the chart compute it from data. */
|
|
124
|
-
domain?: [number, number] | "auto";
|
|
125
|
-
/** Custom formatter for tick labels (called with a `Date`). */
|
|
126
|
-
format?: (d: Date) => string;
|
|
127
|
-
/** Tick density / sizing. */
|
|
128
|
-
ticks?: TickConfig;
|
|
129
|
-
/** Per-tick-level grid styling. */
|
|
130
|
-
grid?: GridStyle;
|
|
131
|
-
/** Axis baseline + tick marks styling. */
|
|
132
|
-
axis?: AxisStyle;
|
|
133
|
-
/** Tick label text styling. */
|
|
134
|
-
labels?: AxisLabelsStyle;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Top-level axes container on {@link MLTimeGraphOptions}.
|
|
138
|
-
* `left` and `right` correspond to `yAxisIndex: 0` and `yAxisIndex: 1` series.
|
|
139
|
-
* Additional axes can be defined in the `y` array, with indices mapping to series via `yAxisIndex`.
|
|
140
|
-
*/
|
|
141
|
-
interface AxesConfig {
|
|
142
|
-
x?: XAxisConfig;
|
|
143
|
-
left?: YAxisConfig;
|
|
144
|
-
right?: YAxisConfig;
|
|
145
|
-
/** Y specifies an arbitrary number of vertical axes, each mapped by its slice index. */
|
|
146
|
-
y?: YAxisConfig[];
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/*!
|
|
150
|
-
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
151
|
-
* MIT with Attribution: free use incl. commercial requires visible credit to
|
|
152
|
-
* "Michael Lechner". Commercial license (no attribution) on request. See LICENSE.
|
|
153
|
-
*/
|
|
154
|
-
|
|
155
|
-
/** Chart margins in pixels. */
|
|
156
|
-
interface Margin {
|
|
157
|
-
top: number;
|
|
158
|
-
right: number;
|
|
159
|
-
bottom: number;
|
|
160
|
-
left: number;
|
|
161
|
-
}
|
|
162
|
-
/** Legend placement position — inside or outside the chart area. */
|
|
163
|
-
type LegendPosition = "inside-right" | "inside-left" | "outside-right" | "outside-left"
|
|
164
|
-
/**
|
|
165
|
-
* Ueber bzw. unter der Zeichenflaeche, waagerecht und ueber mehrere Zeilen
|
|
166
|
-
* umgebrochen. Bis 1.10.0 gab es beides nicht, und zwar aus einem Grund: Ohne
|
|
167
|
-
* echte Textbreiten laesst sich nicht ausrechnen, wieviele Eintraege in eine
|
|
168
|
-
* Zeile passen und wieviel Hoehe zu reservieren ist.
|
|
169
|
-
*/
|
|
170
|
-
| "above" | "below" | "separate";
|
|
171
|
-
interface LegendOptions {
|
|
172
|
-
/** Show the legend (default false). */
|
|
173
|
-
show?: boolean;
|
|
174
|
-
/** Placement (default 'inside-right'). 'separate' draws nothing — read chart.legendItems() and render your own. */
|
|
175
|
-
position?: LegendPosition;
|
|
176
|
-
/** Item layout direction (default 'vertical'). */
|
|
177
|
-
orientation?: LegendOrientation;
|
|
178
|
-
}
|
|
179
|
-
interface MLTimeGraphOptions {
|
|
180
|
-
/**
|
|
181
|
-
* Womit Textbreiten gerechnet werden (Legende, Achsentitel, Raender).
|
|
182
|
-
*
|
|
183
|
-
* Vorgabe ist `liberationMetrics` -- die mitgelieferte Vorschubtabelle des
|
|
184
|
-
* Stapels `Liberation Sans, Arial, Helvetica`. Sie liegt BEI, statt gemessen
|
|
185
|
-
* zu werden: eine Messung im Browser (Canvas `measureText`) und eine im
|
|
186
|
-
* Go-Port stimmen nicht aufs Pixel ueberein, und dann haengt das Bild davon
|
|
187
|
-
* ab, wer es zeichnet.
|
|
188
|
-
*
|
|
189
|
-
* Eigene Schrift? Dann entweder die Tabelle dafuer erzeugen
|
|
190
|
-
* (`node scripts/gen-text-metrics.mjs --font deine.ttf`) oder hier messen --
|
|
191
|
-
* etwa ueber Canvas im Browser. Mit dem zweiten Weg verlaesst du die
|
|
192
|
-
* Paritaet zwischen den beiden Bibliotheken, und zwar bewusst: eine Funktion
|
|
193
|
-
* steht in keinem JSON, der Go-Port kann sie nicht nachbilden.
|
|
194
|
-
*/
|
|
195
|
-
textMetrics?: TextMetrics;
|
|
196
|
-
/** Chart dimensions */
|
|
197
|
-
width?: number;
|
|
198
|
-
height?: number;
|
|
199
|
-
/** Margins */
|
|
200
|
-
margin?: Margin;
|
|
201
|
-
/** Renderer (injected) */
|
|
202
|
-
renderer?: Renderer;
|
|
203
|
-
/** Time series data (raw or aggregated min/max/avg) */
|
|
204
|
-
series?: AnySeries[];
|
|
205
|
-
/**
|
|
206
|
-
* Clip series drawing to the plot area (default `true`).
|
|
207
|
-
*
|
|
208
|
-
* It matters only when data lies outside the axis domain — which happens as soon as you
|
|
209
|
-
* fix `axes.x.domain` and hand over a reading from just outside the window, so the curve
|
|
210
|
-
* runs to the edge instead of starting in mid-air. Without clipping, line and markers
|
|
211
|
-
* paint over the axis labels.
|
|
212
|
-
*
|
|
213
|
-
* Turn it off if you deliberately want a series to reach beyond the plot, or if the
|
|
214
|
-
* clip costs you: every clipped group gets a `clip-path`, and a browser may promote each
|
|
215
|
-
* to its own layer. With a handful of series that is nothing; with dozens on a slow
|
|
216
|
-
* machine it can be worth measuring.
|
|
217
|
-
*/
|
|
218
|
-
clipSeries?: boolean;
|
|
219
|
-
/** Locale for i18n (e.g. 'de-DE') */
|
|
220
|
-
locale?: string;
|
|
221
|
-
/**
|
|
222
|
-
* IANA time zone for the time axis, e.g. `'Europe/Berlin'` or `'UTC'`.
|
|
223
|
-
*
|
|
224
|
-
* Unset means the machine's zone — the behaviour up to 1.8.1, kept so that
|
|
225
|
-
* nothing changes for callers who never thought about it. But a browser sits
|
|
226
|
-
* in the reader's zone and a server almost always in UTC, so the *same* JSON
|
|
227
|
-
* labelled the same reading with different times depending on where it was
|
|
228
|
-
* drawn. That is the opposite of what a DOM-free renderer is for; set this
|
|
229
|
-
* whenever a chart is produced in one place and read in another.
|
|
230
|
-
*
|
|
231
|
-
* The tick *positions* never depended on it — they are epoch arithmetic. Only
|
|
232
|
-
* the labels do.
|
|
233
|
-
*/
|
|
234
|
-
timeZone?: string;
|
|
235
|
-
/**
|
|
236
|
-
* Font for every text in the chart, written into the SVG as `font-family`.
|
|
237
|
-
*
|
|
238
|
-
* Unset means the default stack below. Why name one at all: the SVG says
|
|
239
|
-
* nothing about fonts today, so a viewer picks its own, and the same chart
|
|
240
|
-
* has different label widths in a browser, in an email client and in a
|
|
241
|
-
* rasteriser. Naming a stack removes that variance.
|
|
242
|
-
*
|
|
243
|
-
* The default is chosen for **metric compatibility**, not looks: Liberation
|
|
244
|
-
* Sans was designed with the same advance widths as Arial, so Linux lands on
|
|
245
|
-
* Liberation, Windows and macOS on Arial or Helvetica, and the labels occupy
|
|
246
|
-
* the same space. A stack with DejaVu Sans would not do that — it is
|
|
247
|
-
* noticeably wider, and labels would collide differently.
|
|
248
|
-
*
|
|
249
|
-
* A CSS stack *is* "use it if installed, otherwise ours" — no extra
|
|
250
|
-
* mechanism needed.
|
|
251
|
-
*
|
|
252
|
-
* Note that the library never **measures** text (it renders DOM-free), so
|
|
253
|
-
* this does not change the layout: anchors and `text-anchor` stay where they
|
|
254
|
-
* are. It changes what the viewer draws. A much wider house font will
|
|
255
|
-
* therefore collide differently; that is on you.
|
|
256
|
-
*/
|
|
257
|
-
fontFamily?: string;
|
|
258
|
-
/** Integrated legend configuration */
|
|
259
|
-
legend?: LegendOptions;
|
|
260
|
-
/** Markers */
|
|
261
|
-
markers?: Marker[];
|
|
262
|
-
/** Threshold bands / lines / fills drawn behind the series */
|
|
263
|
-
thresholds?: Threshold[];
|
|
264
|
-
/** Highlighted time regions drawn behind the series */
|
|
265
|
-
highlights?: Highlight[];
|
|
266
|
-
/**
|
|
267
|
-
* Data-gap configuration. Two equivalent forms:
|
|
268
|
-
* - `Gap[]` — legacy: array of region objects with flat
|
|
269
|
-
* fill/hatch/labelBaseline/rotate fields.
|
|
270
|
-
* - {@link GapsConfig} — new (preferred): `{ regions?, autoDetect?,
|
|
271
|
-
* minGapMs?, style? }`, where `style` provides
|
|
272
|
-
* per-region fallbacks and `autoDetect` (TODO)
|
|
273
|
-
* will derive gaps from time spacing in
|
|
274
|
-
* Phase 3+. For now: typed but not yet acted on.
|
|
275
|
-
*/
|
|
276
|
-
gaps?: Gap[] | GapsConfig;
|
|
277
|
-
/** Free-form overlays (arrow, line, rect, point, label) in data coordinates */
|
|
278
|
-
annotations?: Annotation[];
|
|
279
|
-
/** Horizontal annotation bands below the chart (colored time ranges + labels) */
|
|
280
|
-
annotationBands?: AnnotationBandConfig[];
|
|
281
|
-
/**
|
|
282
|
-
* First-class axes configuration: per-axis `label`, `format`, `ticks`, `grid`,
|
|
283
|
-
* `axis`, `labels` (see USAGE.md, "Axes").
|
|
284
|
-
*/
|
|
285
|
-
axes?: AxesConfig;
|
|
286
|
-
}
|
|
1
|
+
import { M as MLTimeGraphOptions, L as LegendItem, R as Renderer, a as LayoutResult, b as Margin, A as AxesConfig, X as XAxisConfig, Y as YAxisConfig, c as LegendOptions, d as LegendPosition, e as LegendOrientation, f as Marker, g as RenderOutput } from './marker_renderer-CiccLy7h.js';
|
|
2
|
+
export { h as AxisLabelsStyle, i as AxisStyle, G as GridLineStyle, j as GridStyle, T as TextMetrics, k as Theme, l as TickConfig, m as drawMarker, n as estimateMetrics, o as getDefaultTheme, p as liberationMetrics, r as resetDefaultTheme, s as setDefaultTheme, q as slugify } from './marker_renderer-CiccLy7h.js';
|
|
3
|
+
import { d as AnySeries, h as Annotation, a as DrawCommand, T as TimeScale, L as LinearScale, f as Gap, g as GapsConfig, e as Threshold, H as Highlight, i as AnnotationBandConfig, k as SeriesStyle, b as LineVariant, S as SmoothingType, F as FillSpec, l as TimeSeries, m as LineDashStyle, n as ThresholdFill, j as HatchVariant, o as ThresholdLabelPosition, P as PointStyleType, M as MarkerLineStyle, R as RangeLabelPosition, p as AnnotationPointShape, q as LabelAnchor, r as AnnotationBandItem, s as TextBaseline, t as AggregatedPoint, u as AggregatedSeries, D as DataPoint } from './scale-DQ-IdB6t.js';
|
|
4
|
+
export { v as AggregatedShowAs, w as AggregationConfig, x as AggregationMode, y as AnnotationKind, z as AxisOrientation, A as AxisPosition, B as DataPointRef, E as EnumMap, C as FillBound, I as FillRegion, J as FillSide, K as FillStyle, N as GapConfig, O as GapLabel, Q as GapRegion, U as GapStyle, G as GridLayer, V as LineShape, W as LineStyle, X as MarkerStyle, Y as MovingAverageType, Z as SVGLineStyle, _ as SensorType, $ as SeriesOverlay, a0 as SeriesOverlayKind, a1 as SeriesType, a2 as ShadowStyle, a3 as SolidDashStyle, a4 as ThresholdLabelConfig, a5 as getLineStyle, a6 as resolveDash } from './scale-DQ-IdB6t.js';
|
|
287
5
|
|
|
288
6
|
/*!
|
|
289
7
|
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
@@ -1143,6 +861,6 @@ declare function mergeOptions(...layers: (OptionsLayer | undefined)[]): MLTimeGr
|
|
|
1143
861
|
* Monate spaeter eine Datei aus einem Stapel von Berichten in der Hand haelt,
|
|
1144
862
|
* kann sonst nicht feststellen, welcher Stand sie gezeichnet hat.
|
|
1145
863
|
*/
|
|
1146
|
-
declare const VERSION = "1.
|
|
864
|
+
declare const VERSION = "1.11.0";
|
|
1147
865
|
|
|
1148
|
-
export { AggregatedPoint, AggregatedSeries, Annotation, AnnotationBandBuilder, AnnotationBandConfig, AnnotationBandItem, AnnotationBandItemBuilder, AnnotationBuilder, AnnotationPointShape, AnySeries,
|
|
866
|
+
export { AggregatedPoint, AggregatedSeries, Annotation, AnnotationBandBuilder, AnnotationBandConfig, AnnotationBandItem, AnnotationBandItemBuilder, AnnotationBuilder, AnnotationPointShape, AnySeries, AxesConfig, DataPoint, DrawCommand, type FieldAccessor, type FillBetweenThresholdsInput, FillSpec, Gap, GapsConfig, GraphBuilder, HatchVariant, Highlight, HighlightBuilder, LabelAnchor, LegendItem, LegendOptions, LegendOrientation, LegendPosition, type LimitStatsPoint, LineDashStyle, LineVariant, MLTimeGraph, MLTimeGraphOptions, Margin, Marker, MarkerBuilder, MarkerLineStyle, type MktPoint, type OptionsLayer, PointStyleType, RangeLabelPosition, SVGRenderer, SeriesStyle, SmoothingType, type StatsAggregatedPoint, type StdDevPoint, TextBaseline, Threshold, ThresholdBuilder, ThresholdFill, ThresholdLabelPosition, type TimeInput, TimeSeries, TimeSeriesBuilder, type ToDataPointsSpec, type TooltipOptions, type TooltipSample, VERSION, XAxisConfig, YAxisConfig, attachTooltip, fillBetweenThresholds, mergeOptions, mount, parseAggregated, parseDataPoint, parseSeries, toDataPoints, toSeries };
|