ml-time-graph 1.9.1 → 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 +111 -0
- package/README.de.md +2 -2
- package/README.md +1 -1
- package/SKILLS.md +121 -3
- package/USAGE.md +14 -0
- package/dist/analyze/index.js +2 -2
- package/dist/index.d.ts +60 -246
- package/dist/index.js +24 -24
- package/dist/interaction/index.d.ts +1 -1
- package/dist/interaction/index.js +1 -1
- package/dist/internals.d.ts +191 -45
- package/dist/internals.js +20 -20
- package/dist/marker_renderer-CiccLy7h.d.ts +734 -0
- package/dist/{scale-CQhADkWB.d.ts → scale-DQ-IdB6t.d.ts} +184 -68
- package/package.json +1 -1
- package/dist/slug-aDUz3wBN.d.ts +0 -432
|
@@ -11,6 +11,98 @@ interface DrawEffects {
|
|
|
11
11
|
shadowOffsetY?: number;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
/*!
|
|
15
|
+
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
16
|
+
* MIT with Attribution: free use incl. commercial requires visible credit to
|
|
17
|
+
* "Michael Lechner". Commercial license (no attribution) on request. See LICENSE.
|
|
18
|
+
*/
|
|
19
|
+
/** Point marker style — unified for series points, annotations, and markers. */
|
|
20
|
+
type PointStyleType = "none" | "circle" | "cross" | "square" | "diamond" | "triangle" | "star" | "arrow" | "plus" | "triangle-down" | "hexagon" | "hourglass" | "line-horizontal";
|
|
21
|
+
/** Chart series type (determines which renderer pipeline is used). */
|
|
22
|
+
type SeriesType = "line" | "area" | "step";
|
|
23
|
+
/** Line dashes style. 'none' means the line is not drawn at all. */
|
|
24
|
+
type LineDashStyle = "solid" | "dashed" | "dotted" | "none";
|
|
25
|
+
/** Side of a threshold or value for fill rendering. */
|
|
26
|
+
type FillSide = "above" | "below";
|
|
27
|
+
/** Axis orientation: vertical (left/right Y-axis) or horizontal (bottom X-axis). */
|
|
28
|
+
type AxisOrientation = "vertical" | "horizontal";
|
|
29
|
+
/** Vertical axis placement. */
|
|
30
|
+
type AxisPosition = "left" | "right";
|
|
31
|
+
/**
|
|
32
|
+
* Waagerechte Textausrichtung -- `text-anchor` im SVG.
|
|
33
|
+
*
|
|
34
|
+
* Steht hier EINMAL, weil die Union sonst an sieben Stellen ausgeschrieben
|
|
35
|
+
* stuende: in den Optionen, in den Zeichenbefehlen, in den Buildern und in den
|
|
36
|
+
* Renderern. Jede Kopie ist eine Stelle, an der eine kuenftige vierte
|
|
37
|
+
* Ausrichtung vergessen wird.
|
|
38
|
+
*/
|
|
39
|
+
type LabelAnchor = "start" | "middle" | "end";
|
|
40
|
+
/**
|
|
41
|
+
* Senkrechte Textausrichtung -- `dominant-baseline` im SVG.
|
|
42
|
+
*
|
|
43
|
+
* "middle" zentriert auf der Grundlinie, "top" setzt den Text darunter,
|
|
44
|
+
* "bottom" darueber.
|
|
45
|
+
*/
|
|
46
|
+
type TextBaseline = "top" | "middle" | "bottom";
|
|
47
|
+
/**
|
|
48
|
+
* Wie weit die senkrechte Linie eines Markers reicht.
|
|
49
|
+
*
|
|
50
|
+
* `full` ueber die ganze Zeichenflaeche, `to-value` bis zum Messwert der
|
|
51
|
+
* Zielreihe, `to-top` von dort nach oben, `none` gar nicht (dann bleibt der
|
|
52
|
+
* Punkt und die Beschriftung).
|
|
53
|
+
*/
|
|
54
|
+
type MarkerLineStyle = "full" | "to-value" | "to-top" | "none";
|
|
55
|
+
/**
|
|
56
|
+
* Wie eine Luecke im ZEICHENBEFEHL erscheint.
|
|
57
|
+
*
|
|
58
|
+
* `bridge_line` steht hier bewusst NICHT: Die Bruecke ist eine Linie zwischen
|
|
59
|
+
* zwei Punkten, kein Feld -- MLTimeGraph loest sie vorher auf (`style:
|
|
60
|
+
* display === "bridge_line" ? undefined : display`). Was der Aufrufer bestellen
|
|
61
|
+
* kann, steht in GapStyle.display und hat einen Wert mehr.
|
|
62
|
+
*/
|
|
63
|
+
type DrawGapType_t$1 = "dashed_border" | "empty" | "filled" | "label";
|
|
64
|
+
/**
|
|
65
|
+
* Verlauf einer Linie zwischen zwei Punkten: gerade oder als Treppe.
|
|
66
|
+
*
|
|
67
|
+
* Teilmenge von SeriesType -- "area" ist keine Linienform, sondern eine
|
|
68
|
+
* Fuellung.
|
|
69
|
+
*/
|
|
70
|
+
type LineShape = "line" | "step";
|
|
71
|
+
/**
|
|
72
|
+
* Wann das Gitter gezeichnet wird: hinter den Daten oder darueber.
|
|
73
|
+
*
|
|
74
|
+
* "front" ist die Vorgabe und das Verhalten, das die Bibliothek immer hatte.
|
|
75
|
+
*/
|
|
76
|
+
type GridLayer = "back" | "front";
|
|
77
|
+
/**
|
|
78
|
+
* Wie eine geglaettete Linie von Punkt zu Punkt laeuft.
|
|
79
|
+
*
|
|
80
|
+
* "catmull-rom" ist die Vorgabe: weich, aber sie schwingt ueber. "monotone"
|
|
81
|
+
* (Fritsch-Carlson) bleibt zwischen zwei Messwerten garantiert dazwischen --
|
|
82
|
+
* fuer alles mit einem Anschlag. "akima" bleibt vor einer Kante ruhig, statt
|
|
83
|
+
* ihr entgegenzuschwingen -- fuer Sensoren, die nur bei Aenderung funken.
|
|
84
|
+
*/
|
|
85
|
+
type SmoothingType = "catmull-rom" | "monotone" | "akima";
|
|
86
|
+
/** Form eines freien Annotations-Punktes. */
|
|
87
|
+
type AnnotationPointShape = "circle" | "square" | "cross";
|
|
88
|
+
/** Art einer freien Annotation. */
|
|
89
|
+
type AnnotationKind = "line" | "arrow" | "rect" | "point" | "label";
|
|
90
|
+
/** Welche Haelfte ein Schwellenwert fuellt -- oder keine. */
|
|
91
|
+
type ThresholdFill = "above" | "below" | "none";
|
|
92
|
+
/** Rechenart des gleitenden Mittelwerts. */
|
|
93
|
+
type MovingAverageType = "simple" | "exponential";
|
|
94
|
+
/** Darstellung einer aggregierten Reihe. */
|
|
95
|
+
type AggregatedShowAs = "band" | "minmaxavg";
|
|
96
|
+
/**
|
|
97
|
+
* Strichart OHNE "none".
|
|
98
|
+
*
|
|
99
|
+
* Wo eine Linie bereits feststeht -- der Rand einer Luecke, die Linie eines
|
|
100
|
+
* Schwellenwerts im Renderer -- gibt es kein "gar nicht". Als Exclude
|
|
101
|
+
* geschrieben, damit die Verwandtschaft zu LineDashStyle im Typ steht und eine
|
|
102
|
+
* kuenftige fuenfte Strichart hier von selbst ankommt.
|
|
103
|
+
*/
|
|
104
|
+
type SolidDashStyle = Exclude<LineDashStyle, "none">;
|
|
105
|
+
|
|
14
106
|
/*!
|
|
15
107
|
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
16
108
|
* MIT with Attribution: free use incl. commercial requires visible credit to
|
|
@@ -59,6 +151,23 @@ declare function resolveDash(variant: LineVariant | undefined, strokeWidth?: num
|
|
|
59
151
|
*/
|
|
60
152
|
declare function getLineStyle(variant: LineVariant, strokeWidth?: number): SVGLineStyle;
|
|
61
153
|
|
|
154
|
+
/*!
|
|
155
|
+
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
156
|
+
* MIT with Attribution: free use incl. commercial requires visible credit to
|
|
157
|
+
* "Michael Lechner". Commercial license (no attribution) on request. See LICENSE.
|
|
158
|
+
*/
|
|
159
|
+
/** All available hatch and pattern variants. */
|
|
160
|
+
type HatchVariant = "none" | "classic-diagonal" | "dense-steep" | "crosshatch" | "dots" | "waves" | "dashed" | "herringbone" | "brick" | "double-stripe" | "honeycomb";
|
|
161
|
+
/**
|
|
162
|
+
* Produce an SVG `<pattern>` element for the given variant.
|
|
163
|
+
* @param id DOM id to reference the pattern from `fill="url(#id)"`.
|
|
164
|
+
* @param variant Visual pattern kind (default `classic-diagonal`).
|
|
165
|
+
* @param fillcolor Pattern background colour (default a light steel-blue).
|
|
166
|
+
* @param linecolor Foreground stroke colour for the pattern shapes.
|
|
167
|
+
* @param strokewidth Stroke width in user units (scales with the pattern).
|
|
168
|
+
*/
|
|
169
|
+
declare function getHatch(id: string, variant?: HatchVariant, fillcolor?: string, linecolor?: string, strokewidth?: number): string;
|
|
170
|
+
|
|
62
171
|
/**
|
|
63
172
|
* Stroke pattern for path / line draw commands. Widened to {@link LineVariant}
|
|
64
173
|
* in Phase 2 (was: `'dashed' | 'dotted'`). The legacy values still work; the
|
|
@@ -67,6 +176,7 @@ declare function getLineStyle(variant: LineVariant, strokeWidth?: number): SVGLi
|
|
|
67
176
|
* proportionally to the stroke width.
|
|
68
177
|
*/
|
|
69
178
|
type Dashstyle_t = LineVariant;
|
|
179
|
+
|
|
70
180
|
interface DrawPath extends DrawEffects {
|
|
71
181
|
type: "path";
|
|
72
182
|
points: Point[];
|
|
@@ -82,6 +192,11 @@ interface DrawPath extends DrawEffects {
|
|
|
82
192
|
*/
|
|
83
193
|
cssClass?: string;
|
|
84
194
|
smoothing?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Which spline to use when `smoothing` is on. Default `'catmull-rom'`,
|
|
197
|
+
* which is how every chart before 1.10.0 was drawn.
|
|
198
|
+
*/
|
|
199
|
+
smoothingType?: SmoothingType;
|
|
85
200
|
/**
|
|
86
201
|
* When `smoothing` is enabled, only apply the Catmull-Rom spline to the
|
|
87
202
|
* first `smoothCount` points; the remaining points connect with straight
|
|
@@ -103,7 +218,7 @@ interface DrawPath extends DrawEffects {
|
|
|
103
218
|
stroke?: string;
|
|
104
219
|
strokeWidth?: number;
|
|
105
220
|
fill?: string;
|
|
106
|
-
hatch?:
|
|
221
|
+
hatch?: HatchVariant;
|
|
107
222
|
dashed?: boolean;
|
|
108
223
|
/** Dash style; overrides `dashed`. */
|
|
109
224
|
dash?: Dashstyle_t;
|
|
@@ -133,7 +248,7 @@ interface DrawRect extends DrawEffects {
|
|
|
133
248
|
w: number;
|
|
134
249
|
h: number;
|
|
135
250
|
fill?: string;
|
|
136
|
-
hatch?:
|
|
251
|
+
hatch?: HatchVariant;
|
|
137
252
|
stroke?: string;
|
|
138
253
|
strokeWidth?: number;
|
|
139
254
|
opacity?: number;
|
|
@@ -153,7 +268,7 @@ interface DrawCircle extends DrawEffects {
|
|
|
153
268
|
cy: number;
|
|
154
269
|
r: number;
|
|
155
270
|
fill?: string;
|
|
156
|
-
hatch?:
|
|
271
|
+
hatch?: HatchVariant;
|
|
157
272
|
stroke?: string;
|
|
158
273
|
strokeWidth?: number;
|
|
159
274
|
/** Optional SVG `id` attribute for this element. */
|
|
@@ -164,7 +279,7 @@ interface DrawText {
|
|
|
164
279
|
content: string;
|
|
165
280
|
x: number;
|
|
166
281
|
y: number;
|
|
167
|
-
anchor?:
|
|
282
|
+
anchor?: LabelAnchor;
|
|
168
283
|
fontSize?: number;
|
|
169
284
|
fontFamily?: string;
|
|
170
285
|
fill?: string;
|
|
@@ -178,18 +293,18 @@ interface DrawText {
|
|
|
178
293
|
* auf "auto" zurueck. Der Go-Port reicht sie genauso durch; eine echte
|
|
179
294
|
* Abbildung (top -> text-top, bottom -> text-bottom) waere eine Aenderung
|
|
180
295
|
* in beiden Bibliotheken samt neuer Go-Golden. */
|
|
181
|
-
textBaseline?:
|
|
296
|
+
textBaseline?: TextBaseline;
|
|
182
297
|
/** Optional SVG `id` attribute for this element. */
|
|
183
298
|
id?: string;
|
|
184
299
|
}
|
|
185
|
-
type DrawGapType_t
|
|
300
|
+
type DrawGapType_t = "dashed_border" | "empty" | "filled" | "label";
|
|
186
301
|
interface DrawGap {
|
|
187
302
|
type: "gap";
|
|
188
303
|
x1: number;
|
|
189
304
|
y1: number;
|
|
190
305
|
x2: number;
|
|
191
306
|
y2: number;
|
|
192
|
-
style: DrawGapType_t
|
|
307
|
+
style: DrawGapType_t;
|
|
193
308
|
label?: string;
|
|
194
309
|
/** Optional SVG `id` attribute for this element. */
|
|
195
310
|
id?: string;
|
|
@@ -216,47 +331,38 @@ type PathParams = Omit<DrawPath, "type">;
|
|
|
216
331
|
type RectParams = Omit<DrawRect, "type">;
|
|
217
332
|
type CircleParams = Omit<DrawCircle, "type">;
|
|
218
333
|
type TextParams = Omit<DrawText, "type">;
|
|
334
|
+
type GapParams = Omit<DrawGap, "type">;
|
|
219
335
|
|
|
220
336
|
/*!
|
|
221
337
|
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
222
338
|
* MIT with Attribution: free use incl. commercial requires visible credit to
|
|
223
339
|
* "Michael Lechner". Commercial license (no attribution) on request. See LICENSE.
|
|
224
340
|
*/
|
|
225
|
-
/** Point marker style — unified for series points, annotations, and markers. */
|
|
226
|
-
type PointStyleType = "none" | "circle" | "cross" | "square" | "diamond" | "triangle" | "star" | "arrow" | "plus" | "triangle-down" | "hexagon" | "hourglass" | "line-horizontal";
|
|
227
|
-
/** Chart series type (determines which renderer pipeline is used). */
|
|
228
|
-
type SeriesType = "line" | "area" | "step";
|
|
229
|
-
/** Line dashes style. 'none' means the line is not drawn at all. */
|
|
230
|
-
type LineDashStyle = "solid" | "dashed" | "dotted" | "none";
|
|
231
|
-
/** Direction for zoned fills relative to the line. */
|
|
232
|
-
type FillDirectionType = "toMin" | "toMax";
|
|
233
|
-
/** Side of a threshold or value for fill rendering. */
|
|
234
|
-
type FillSide = "above" | "below";
|
|
235
|
-
/** Axis orientation: vertical (left/right Y-axis) or horizontal (bottom X-axis). */
|
|
236
|
-
type AxisOrientation = "vertical" | "horizontal";
|
|
237
|
-
/** Vertical axis placement. */
|
|
238
|
-
type AxisPosition = "left" | "right";
|
|
239
|
-
/** Text anchor alignment. */
|
|
240
|
-
type LabelAnchor = "start" | "middle" | "end";
|
|
241
|
-
/** Gap rendering style. */
|
|
242
|
-
type DrawGapType_t = "dashed_border" | "empty" | "filled" | "label";
|
|
243
|
-
|
|
244
|
-
/*!
|
|
245
|
-
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
246
|
-
* MIT with Attribution: free use incl. commercial requires visible credit to
|
|
247
|
-
* "Michael Lechner". Commercial license (no attribution) on request. See LICENSE.
|
|
248
|
-
*/
|
|
249
|
-
/** All available hatch and pattern variants. */
|
|
250
|
-
type HatchVariant = "none" | "classic-diagonal" | "dense-steep" | "crosshatch" | "dots" | "waves" | "dashed" | "herringbone" | "brick" | "double-stripe" | "honeycomb";
|
|
251
341
|
/**
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
342
|
+
* Wo die Beschriftung eines Zeitbereichs sitzt — Highlight wie Datenluecke.
|
|
343
|
+
*
|
|
344
|
+
* Fuenf Werte, und die Unterscheidung ist der ganze Punkt:
|
|
345
|
+
*
|
|
346
|
+
* - `top` / `center` / `bottom` liegen INNERHALB der Zeichenflaeche. Sie
|
|
347
|
+
* brauchen keinen Rand und koennen die Kurve ueberdecken.
|
|
348
|
+
* - `above` / `below` liegen im Rand DES BILDES — oben ueber der Flaeche,
|
|
349
|
+
* unten unter der Zeitachse. Sie ueberdecken nie Daten, brauchen dafuer
|
|
350
|
+
* aber Platz: `margin.top` bzw. `margin.bottom`.
|
|
351
|
+
*
|
|
352
|
+
* `below` rechnet deshalb von der Gesamthoehe her, nicht von der Unterkante
|
|
353
|
+
* der Zeichenflaeche. Ohne diese Zahl gibt es keinen unteren Rand, in den die
|
|
354
|
+
* Schrift gehoeren koennte, und der Aufrufer bekaeme Text ausserhalb des SVG —
|
|
355
|
+
* sichtbar in keinem Betrachter, aber vorhanden in jeder Datei.
|
|
356
|
+
*
|
|
357
|
+
* `middle` ist der alte Name der Datenluecken fuer `center` und bleibt
|
|
358
|
+
* gueltig: Ein Name, der einmal in einer Datei stand, verschwindet nicht,
|
|
359
|
+
* weil zwei Bauteile sich auf eine gemeinsame Schreibweise einigen.
|
|
360
|
+
*
|
|
361
|
+
* Dieselben Zahlen stehen im Go-Port (pkg/renderer/range_label.go). Laufen sie
|
|
362
|
+
* auseinander, sitzt dieselbe Beschriftung im Browser und auf dem Server
|
|
363
|
+
* verschieden hoch.
|
|
258
364
|
*/
|
|
259
|
-
|
|
365
|
+
type RangeLabelPosition = "top" | "center" | "middle" | "bottom" | "above" | "below";
|
|
260
366
|
|
|
261
367
|
/*!
|
|
262
368
|
* MLTimeGraph — Copyright (c) 2026 Michael Lechner
|
|
@@ -268,15 +374,13 @@ declare function getHatch(id: string, variant?: HatchVariant, fillcolor?: string
|
|
|
268
374
|
* A fill description. Three shapes:
|
|
269
375
|
* - `string` — plain colour (`'#ef444433'` or `'rgba(…)'`)
|
|
270
376
|
* - `{ color }` — explicit colour
|
|
271
|
-
* - `{ color, hatch
|
|
377
|
+
* - `{ color, hatch }` — colour + hatch pattern
|
|
272
378
|
*
|
|
273
379
|
* Where the fill is applied is described by {@link FillRegion}, not by `FillStyle`.
|
|
274
380
|
*/
|
|
275
381
|
type FillStyle = string | {
|
|
276
382
|
color: string;
|
|
277
383
|
hatch?: HatchVariant;
|
|
278
|
-
hatchColor?: string;
|
|
279
|
-
hatchWidth?: number;
|
|
280
384
|
};
|
|
281
385
|
/** Vertical boundary of a fill region. */
|
|
282
386
|
type FillBound = "series" | "chartTop" | "chartBottom" | {
|
|
@@ -308,7 +412,7 @@ interface FillRegion {
|
|
|
308
412
|
/** The fill itself. */
|
|
309
413
|
fill: FillStyle;
|
|
310
414
|
/** Only fill on one side of the `from`/`to` transition. */
|
|
311
|
-
side?:
|
|
415
|
+
side?: FillSide;
|
|
312
416
|
/**
|
|
313
417
|
* Optional outer gate. With `side` set and exactly one bound being
|
|
314
418
|
* `'series'`, the region renders only in X-spans where the line's value
|
|
@@ -344,7 +448,7 @@ interface GapLabel {
|
|
|
344
448
|
* `'above'` | `'below'` sit in the margin around it and never cover data —
|
|
345
449
|
* but they need `margin.top` / `margin.bottom` to have somewhere to go.
|
|
346
450
|
*/
|
|
347
|
-
baseline?:
|
|
451
|
+
baseline?: RangeLabelPosition;
|
|
348
452
|
rotate?: number;
|
|
349
453
|
color?: string;
|
|
350
454
|
fontSize?: number;
|
|
@@ -385,7 +489,7 @@ interface GapStyle {
|
|
|
385
489
|
color?: string;
|
|
386
490
|
width?: number;
|
|
387
491
|
/** Default `'dotted'`. */
|
|
388
|
-
style?:
|
|
492
|
+
style?: SolidDashStyle;
|
|
389
493
|
};
|
|
390
494
|
}
|
|
391
495
|
/** A manually-declared gap region. */
|
|
@@ -410,8 +514,6 @@ interface GapsConfig {
|
|
|
410
514
|
*/
|
|
411
515
|
|
|
412
516
|
/** Line styling for a series. All fields optional; defaults come from the theme. */
|
|
413
|
-
/** Linienform: gerade Strecken oder Treppe. */
|
|
414
|
-
type LineShape = "line" | "step";
|
|
415
517
|
interface LineStyle {
|
|
416
518
|
/** Stroke colour. */
|
|
417
519
|
color?: string;
|
|
@@ -419,8 +521,10 @@ interface LineStyle {
|
|
|
419
521
|
width?: number;
|
|
420
522
|
/** Stroke variant (`solid` / `dashed` / `dotted` / …). */
|
|
421
523
|
style?: LineVariant;
|
|
422
|
-
/** Catmull-Rom
|
|
524
|
+
/** Curve smoothing. The spline is `smoothingType`; by default Catmull-Rom. */
|
|
423
525
|
smoothing?: boolean;
|
|
526
|
+
/** Which spline when `smoothing` is on. Default `"catmull-rom"`. */
|
|
527
|
+
smoothingType?: SmoothingType;
|
|
424
528
|
/**
|
|
425
529
|
* Line shape — `line` (Default) or `step` (Treppe).
|
|
426
530
|
*
|
|
@@ -503,7 +607,7 @@ interface SeriesStyle {
|
|
|
503
607
|
type SeriesOverlay = {
|
|
504
608
|
kind: "movingAverage";
|
|
505
609
|
window: number;
|
|
506
|
-
type?:
|
|
610
|
+
type?: MovingAverageType;
|
|
507
611
|
style?: SeriesStyle;
|
|
508
612
|
} | {
|
|
509
613
|
kind: "movingMkt";
|
|
@@ -539,14 +643,16 @@ interface DataPoint {
|
|
|
539
643
|
/** Optional annotation text. */
|
|
540
644
|
annotation?: string;
|
|
541
645
|
/**
|
|
542
|
-
* Synthetic point — not a real measurement. Set
|
|
543
|
-
*
|
|
544
|
-
* edges
|
|
545
|
-
* trend line over interpolated values).
|
|
646
|
+
* Synthetic point — not a real measurement. Set on points the library
|
|
647
|
+
* computes itself: the intersections where a line crosses a threshold, and
|
|
648
|
+
* the edges of a gap. You may set it yourself on helper points.
|
|
546
649
|
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
650
|
+
* **The renderer does not act on it.** Until 1.10.0 this doc promised three
|
|
651
|
+
* consequences — no marker, no tooltip snap, no row in the value table — and
|
|
652
|
+
* none of them was ever implemented, in either library. It is a marker for
|
|
653
|
+
* whoever reads the processed data (a table beside the chart, a consumer of
|
|
654
|
+
* the draw commands), not an instruction to the renderer. Saying so is worth
|
|
655
|
+
* more than a promise nobody kept.
|
|
550
656
|
*/
|
|
551
657
|
synthetic?: boolean;
|
|
552
658
|
}
|
|
@@ -573,6 +679,11 @@ interface EnumMap {
|
|
|
573
679
|
interface TimeSeries {
|
|
574
680
|
name: string;
|
|
575
681
|
data: DataPoint[];
|
|
682
|
+
/**
|
|
683
|
+
* Art der Messgroesse. Der Daten-Adapter (`parseJSON`) liest sie und legt
|
|
684
|
+
* sie ab; auf das BILD wirkt sie nicht -- die Darstellung bestimmen `style`
|
|
685
|
+
* und `showAs`. Vorgabe: 'numeric'.
|
|
686
|
+
*/
|
|
576
687
|
sensorType?: SensorType;
|
|
577
688
|
enumMap?: EnumMap;
|
|
578
689
|
/**
|
|
@@ -599,7 +710,7 @@ interface AggregatedSeries {
|
|
|
599
710
|
name: string;
|
|
600
711
|
data: AggregatedPoint[];
|
|
601
712
|
/** 'band' = filled rectangle per slot; 'minmaxavg' = min/max/avg lines + optional fill */
|
|
602
|
-
showAs?:
|
|
713
|
+
showAs?: AggregatedShowAs;
|
|
603
714
|
yAxisIndex?: number;
|
|
604
715
|
avgLine?: boolean;
|
|
605
716
|
countOpacity?: boolean;
|
|
@@ -640,9 +751,9 @@ interface Gap {
|
|
|
640
751
|
hatch?: HatchVariant;
|
|
641
752
|
fillOpacity?: number;
|
|
642
753
|
/** Same five values as a highlight's `labelPosition` — see `core/range_label.ts`. */
|
|
643
|
-
labelBaseline?:
|
|
754
|
+
labelBaseline?: RangeLabelPosition;
|
|
644
755
|
rotate?: number;
|
|
645
|
-
style?: DrawGapType_t
|
|
756
|
+
style?: DrawGapType_t;
|
|
646
757
|
}
|
|
647
758
|
/** Configuration for gap rendering (manual or auto-detected) */
|
|
648
759
|
interface GapConfig {
|
|
@@ -673,7 +784,7 @@ interface ThresholdLabelConfig {
|
|
|
673
784
|
/** Rotation in degrees (default: none). */
|
|
674
785
|
rotate?: number;
|
|
675
786
|
/** Text vertical alignment: 'top', 'middle' (default), or 'bottom'. */
|
|
676
|
-
textBaseline?:
|
|
787
|
+
textBaseline?: TextBaseline;
|
|
677
788
|
}
|
|
678
789
|
/**
|
|
679
790
|
* A named value boundary. It can be drawn (line / half-plane fill / label) and
|
|
@@ -683,10 +794,15 @@ interface Threshold {
|
|
|
683
794
|
name: string;
|
|
684
795
|
value: number;
|
|
685
796
|
color?: string;
|
|
686
|
-
line?:
|
|
687
|
-
fill?:
|
|
797
|
+
line?: LineDashStyle;
|
|
798
|
+
fill?: ThresholdFill;
|
|
688
799
|
fillHatch?: HatchVariant;
|
|
689
800
|
fillOpacity?: number;
|
|
801
|
+
/**
|
|
802
|
+
* Caption on the line. Omit it and there is NO caption: since 1.4.0 the
|
|
803
|
+
* `name` is an identifier (`fill.regions` looks the threshold up by it), not
|
|
804
|
+
* something to print. Pass a string, or an object to place it.
|
|
805
|
+
*/
|
|
690
806
|
label?: false | string | ThresholdLabelConfig;
|
|
691
807
|
/**
|
|
692
808
|
* Which Y-axis this threshold's `value` is on. Default 0 (left).
|
|
@@ -713,7 +829,7 @@ interface Highlight {
|
|
|
713
829
|
* the highlighted band; 'above' / 'below' place it outside the plot area
|
|
714
830
|
* (in the top margin / below the x-axis) so it never overlaps the data.
|
|
715
831
|
*/
|
|
716
|
-
labelPosition?:
|
|
832
|
+
labelPosition?: RangeLabelPosition;
|
|
717
833
|
rotate?: number;
|
|
718
834
|
}
|
|
719
835
|
/** A point in data coordinates. `axis` selects the y-scale (0 = left, 1 = right). */
|
|
@@ -762,13 +878,13 @@ type Annotation = {
|
|
|
762
878
|
at: DataPointRef;
|
|
763
879
|
color?: string;
|
|
764
880
|
radius?: number;
|
|
765
|
-
shape?:
|
|
881
|
+
shape?: AnnotationPointShape;
|
|
766
882
|
} | {
|
|
767
883
|
type: "label";
|
|
768
884
|
at: DataPointRef;
|
|
769
885
|
text: string;
|
|
770
886
|
color?: string;
|
|
771
|
-
anchor?:
|
|
887
|
+
anchor?: LabelAnchor;
|
|
772
888
|
dx?: number;
|
|
773
889
|
dy?: number;
|
|
774
890
|
rotate?: number;
|
|
@@ -805,7 +921,7 @@ interface AnnotationBandItem {
|
|
|
805
921
|
/**
|
|
806
922
|
* Label vertical position: 'top', 'middle' (default), or 'bottom' inside the band.
|
|
807
923
|
*/
|
|
808
|
-
labelBaseline?:
|
|
924
|
+
labelBaseline?: TextBaseline;
|
|
809
925
|
/**
|
|
810
926
|
* Hover tooltip of the segment (SVG `<title>`). Use it for the detail that does not
|
|
811
927
|
* fit as a printed label — the full event id, exact times, a duration.
|
|
@@ -938,4 +1054,4 @@ declare class BandScale implements Scale {
|
|
|
938
1054
|
positions(): Map<string, number>;
|
|
939
1055
|
}
|
|
940
1056
|
|
|
941
|
-
export { type
|
|
1057
|
+
export { type SeriesOverlay as $, type AxisPosition as A, type DataPointRef as B, type FillBound as C, type DataPoint as D, type EnumMap as E, type FillSpec as F, type GridLayer as G, type Highlight as H, type FillRegion as I, type FillSide as J, type FillStyle as K, LinearScale as L, type MarkerLineStyle as M, type GapConfig as N, type GapLabel as O, type PointStyleType as P, type GapRegion as Q, type RangeLabelPosition as R, type SmoothingType as S, TimeScale as T, type GapStyle as U, type LineShape as V, type LineStyle as W, type MarkerStyle as X, type MovingAverageType as Y, type SVGLineStyle as Z, type SensorType as _, type DrawCommand as a, type SeriesOverlayKind as a0, type SeriesType as a1, type ShadowStyle as a2, type SolidDashStyle as a3, type ThresholdLabelConfig as a4, getLineStyle as a5, resolveDash as a6, type LineParams as a7, type PathParams as a8, type RectParams as a9, type CircleParams as aa, type TextParams as ab, type GapParams as ac, type Point as ad, BandScale as ae, type BandScaleConfig as af, type Dashstyle_t as ag, type DomainScaleConfig as ah, type DrawCircle as ai, type DrawGap as aj, type DrawGapType_t$1 as ak, type DrawLine as al, type DrawPath as am, type DrawRect as an, type DrawText as ao, type LinearScaleConfig as ap, type Scale as aq, type ScaleConfig as ar, TIME_INTERVALS as as, type TimeScaleConfig as at, getHatch as au, type LineVariant as b, type DrawGroup as c, type AnySeries as d, type Threshold as e, type Gap as f, type GapsConfig as g, type Annotation as h, type AnnotationBandConfig as i, type HatchVariant as j, type SeriesStyle as k, type TimeSeries as l, type LineDashStyle as m, type ThresholdFill as n, type ThresholdLabelPosition as o, type AnnotationPointShape as p, type LabelAnchor as q, type AnnotationBandItem as r, type TextBaseline as s, type AggregatedPoint as t, type AggregatedSeries as u, type AggregatedShowAs as v, type AggregationConfig as w, type AggregationMode as x, type AnnotationKind as y, type AxisOrientation as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ml-time-graph",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "TypeScript library for time-series charts with rich contextual annotation — telemetry, sensors, metrics, logs, finance. DOM-free SVG output, identical in the browser and on the server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|