@sentropic/design-system-svelte 0.34.35 → 0.34.37
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/dist/AnomalySwimLaneChart.svelte +388 -0
- package/dist/AnomalySwimLaneChart.svelte.d.ts +42 -0
- package/dist/AnomalySwimLaneChart.svelte.d.ts.map +1 -0
- package/dist/FlamegraphChart.svelte +291 -0
- package/dist/FlamegraphChart.svelte.d.ts +39 -0
- package/dist/FlamegraphChart.svelte.d.ts.map +1 -0
- package/dist/RibbonChart.svelte +439 -0
- package/dist/RibbonChart.svelte.d.ts +43 -0
- package/dist/RibbonChart.svelte.d.ts.map +1 -0
- package/dist/TraceWaterfallChart.svelte +432 -0
- package/dist/TraceWaterfallChart.svelte.d.ts +44 -0
- package/dist/TraceWaterfallChart.svelte.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* AnomalySwimLaneChart - heatmap TEMPS × JOB dont chaque cellule encode un
|
|
4
|
+
* SCORE CONTINU (façon Kibana ML « anomaly swim lane »). Une ligne = un `job` ;
|
|
5
|
+
* une colonne = un bucket temporel (trié par `at`). La couleur suit l'INTENSITÉ
|
|
6
|
+
* du score normalisé 0..max sur l'échelle catégorielle continue (category1..8),
|
|
7
|
+
* reprise de HeatmapChart. Distinct de StatusHistoryChart (statut DISCRET) : ici
|
|
8
|
+
* le score est CONTINU → gradient d'intensité.
|
|
9
|
+
* API canonique (référence Svelte, React/Vue doivent s'aligner).
|
|
10
|
+
*
|
|
11
|
+
* Props obligatoires :
|
|
12
|
+
* data AnomalySwimLaneSeries[] - tableau {job, buckets[]}
|
|
13
|
+
*
|
|
14
|
+
* Props optionnelles :
|
|
15
|
+
* max number (défaut dérivé du score max des data)
|
|
16
|
+
* label string
|
|
17
|
+
* width number (défaut 520)
|
|
18
|
+
* height number (défaut 300)
|
|
19
|
+
* size number (alias de width)
|
|
20
|
+
* class string
|
|
21
|
+
*/
|
|
22
|
+
export type AnomalySwimLaneTone =
|
|
23
|
+
| "category1" | "category2" | "category3" | "category4"
|
|
24
|
+
| "category5" | "category6" | "category7" | "category8";
|
|
25
|
+
|
|
26
|
+
export type AnomalySwimLaneBucket = {
|
|
27
|
+
at: number;
|
|
28
|
+
score: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type AnomalySwimLaneSeries = {
|
|
32
|
+
job: string;
|
|
33
|
+
buckets: AnomalySwimLaneBucket[];
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<script lang="ts">
|
|
38
|
+
import ChartDataList from "./ChartDataList.svelte";
|
|
39
|
+
|
|
40
|
+
type AnomalySwimLaneChartProps = {
|
|
41
|
+
data: AnomalySwimLaneSeries[];
|
|
42
|
+
max?: number;
|
|
43
|
+
label?: string;
|
|
44
|
+
width?: number;
|
|
45
|
+
height?: number;
|
|
46
|
+
size?: number;
|
|
47
|
+
class?: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
let {
|
|
51
|
+
data = [],
|
|
52
|
+
max,
|
|
53
|
+
label,
|
|
54
|
+
width,
|
|
55
|
+
height = 300,
|
|
56
|
+
size,
|
|
57
|
+
class: className
|
|
58
|
+
}: AnomalySwimLaneChartProps = $props();
|
|
59
|
+
|
|
60
|
+
const resolvedWidth = $derived(width ?? size ?? 520);
|
|
61
|
+
|
|
62
|
+
const MARGIN = { top: 28, right: 18, bottom: 44, left: 132 };
|
|
63
|
+
const TONES = [
|
|
64
|
+
"category1","category2","category3","category4","category5","category6","category7","category8"
|
|
65
|
+
] as const;
|
|
66
|
+
|
|
67
|
+
// Échelle continue : intensité du score normalisé 0..max → category1..8 (reprise
|
|
68
|
+
// de HeatmapChart). max ≤ 0 ou score non fini → category1 (intensité plancher).
|
|
69
|
+
function toneForScore(score: number, scoreMax: number): AnomalySwimLaneTone {
|
|
70
|
+
if (!Number.isFinite(score) || scoreMax <= 0) return "category1";
|
|
71
|
+
const ratio = Math.max(0, Math.min(1, score / scoreMax));
|
|
72
|
+
const index = Math.max(0, Math.min(TONES.length - 1, Math.floor(ratio * TONES.length)));
|
|
73
|
+
return TONES[index];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Tronque une étiquette à la largeur de la marge gauche (approx. par char).
|
|
77
|
+
function ellipsize(text: string, maxChars: number): string {
|
|
78
|
+
if (text.length <= maxChars) return text;
|
|
79
|
+
if (maxChars <= 1) return "…";
|
|
80
|
+
return `${text.slice(0, maxChars - 1)}…`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function formatTick(v: number): string {
|
|
84
|
+
if (Math.abs(v) >= 1000) return `${(v / 1000).toFixed(v % 1000 === 0 ? 0 : 1)}k`;
|
|
85
|
+
if (Number.isInteger(v)) return String(v);
|
|
86
|
+
return v.toFixed(1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let hoveredKey: string | null = $state(null);
|
|
90
|
+
|
|
91
|
+
const plotWidth = $derived(Math.max(resolvedWidth - MARGIN.left - MARGIN.right, 1));
|
|
92
|
+
const plotHeight = $derived(Math.max(height - MARGIN.top - MARGIN.bottom, 1));
|
|
93
|
+
|
|
94
|
+
// Normalise : filtre les jobs sans libellé et les buckets non finis.
|
|
95
|
+
const validData = $derived(
|
|
96
|
+
data
|
|
97
|
+
.filter((d) => typeof d.job === "string" && d.job.length > 0)
|
|
98
|
+
.map((d) => ({
|
|
99
|
+
job: d.job,
|
|
100
|
+
buckets: (d.buckets ?? [])
|
|
101
|
+
.filter((b) => Number.isFinite(b.at))
|
|
102
|
+
.map((b) => ({ at: b.at, score: b.score }))
|
|
103
|
+
}))
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
// Colonnes temporelles distinctes (par `at`, croissant).
|
|
107
|
+
const columnOrder = $derived.by(() => {
|
|
108
|
+
const seen: number[] = [];
|
|
109
|
+
for (const d of validData) {
|
|
110
|
+
for (const b of d.buckets) {
|
|
111
|
+
if (!seen.includes(b.at)) seen.push(b.at);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return seen.sort((a, b) => a - b);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Score max effectif : prop `max` si finie et > 0, sinon dérivée des data.
|
|
118
|
+
const scoreMax = $derived.by(() => {
|
|
119
|
+
if (typeof max === "number" && Number.isFinite(max) && max > 0) return max;
|
|
120
|
+
const scores = validData.flatMap((d) => d.buckets.map((b) => b.score)).filter(Number.isFinite);
|
|
121
|
+
return scores.length > 0 ? Math.max(...scores) : 1;
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
const rows = $derived.by(() => {
|
|
125
|
+
if (validData.length === 0 || columnOrder.length === 0) return [];
|
|
126
|
+
const band = plotHeight / validData.length;
|
|
127
|
+
const rowHeight = Math.min(band * 0.78, 34);
|
|
128
|
+
const colWidth = plotWidth / columnOrder.length;
|
|
129
|
+
return validData.map((d, i) => {
|
|
130
|
+
const y = MARGIN.top + band * i + (band - rowHeight) / 2;
|
|
131
|
+
const cells = d.buckets.map((b, j) => {
|
|
132
|
+
const colIndex = Math.max(0, columnOrder.indexOf(b.at));
|
|
133
|
+
const x = MARGIN.left + colIndex * colWidth;
|
|
134
|
+
const w = Math.max(colWidth - 2, 1);
|
|
135
|
+
return {
|
|
136
|
+
key: `${i}-${j}`,
|
|
137
|
+
datum: b,
|
|
138
|
+
x,
|
|
139
|
+
width: w,
|
|
140
|
+
cx: x + w / 2,
|
|
141
|
+
tone: toneForScore(b.score, scoreMax)
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
return {
|
|
145
|
+
datum: d,
|
|
146
|
+
index: i,
|
|
147
|
+
y,
|
|
148
|
+
height: rowHeight,
|
|
149
|
+
rowCenterY: MARGIN.top + band * (i + 0.5),
|
|
150
|
+
cells
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const columns = $derived.by(() => {
|
|
156
|
+
if (columnOrder.length === 0) return [];
|
|
157
|
+
const colWidth = plotWidth / columnOrder.length;
|
|
158
|
+
return columnOrder.map((at, index) => ({
|
|
159
|
+
at,
|
|
160
|
+
cx: MARGIN.left + (index + 0.5) * colWidth
|
|
161
|
+
}));
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
const dataValueItems = $derived(
|
|
165
|
+
validData.map(
|
|
166
|
+
(d) => `${d.job}: ${d.buckets.map((b) => `${b.at} = ${b.score}`).join(", ")}`
|
|
167
|
+
)
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
const legendItems = $derived(TONES.map((tone) => ({ tone })));
|
|
171
|
+
const hasLegend = $derived(validData.length > 0 && columnOrder.length > 0);
|
|
172
|
+
|
|
173
|
+
function handlePointerMove(event: PointerEvent) {
|
|
174
|
+
const target = event.target;
|
|
175
|
+
if (!(target instanceof Element)) {
|
|
176
|
+
hoveredKey = null;
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
const key = target.getAttribute("data-chart-key");
|
|
180
|
+
hoveredKey = key ?? null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const hoveredCell = $derived.by(() => {
|
|
184
|
+
if (hoveredKey === null) return null;
|
|
185
|
+
for (const row of rows) {
|
|
186
|
+
for (const cell of row.cells) {
|
|
187
|
+
if (cell.key === hoveredKey) return { row, cell };
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return null;
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
const classes = () => ["st-anomalySwimLaneChart", className].filter(Boolean).join(" ");
|
|
194
|
+
</script>
|
|
195
|
+
|
|
196
|
+
<div class={classes()}>
|
|
197
|
+
<div
|
|
198
|
+
class="st-anomalySwimLaneChart__visual"
|
|
199
|
+
role="img"
|
|
200
|
+
aria-label={label}
|
|
201
|
+
onpointermove={handlePointerMove}
|
|
202
|
+
onpointerleave={() => (hoveredKey = null)}
|
|
203
|
+
>
|
|
204
|
+
<svg
|
|
205
|
+
viewBox="0 0 {resolvedWidth} {height}"
|
|
206
|
+
preserveAspectRatio="xMidYMid meet"
|
|
207
|
+
width="100%"
|
|
208
|
+
height="100%"
|
|
209
|
+
focusable="false"
|
|
210
|
+
aria-hidden="true"
|
|
211
|
+
>
|
|
212
|
+
<!-- tick labels (axe X temporel) -->
|
|
213
|
+
{#each columns as column (column.at)}
|
|
214
|
+
<text class="st-anomalySwimLaneChart__tickLabel" x={column.cx} y={height - MARGIN.bottom + 16} text-anchor="middle">
|
|
215
|
+
{formatTick(column.at)}
|
|
216
|
+
</text>
|
|
217
|
+
{/each}
|
|
218
|
+
|
|
219
|
+
<!-- axes -->
|
|
220
|
+
<line class="st-anomalySwimLaneChart__axis" x1={MARGIN.left} x2={MARGIN.left} y1={MARGIN.top} y2={height - MARGIN.bottom} />
|
|
221
|
+
<line class="st-anomalySwimLaneChart__axis" x1={MARGIN.left} x2={resolvedWidth - MARGIN.right} y1={height - MARGIN.bottom} y2={height - MARGIN.bottom} />
|
|
222
|
+
|
|
223
|
+
<!-- une ligne par job : étiquette à gauche + cellules de score par bucket -->
|
|
224
|
+
{#each rows as row (`${row.index}-${row.datum.job}`)}
|
|
225
|
+
<text
|
|
226
|
+
class="st-anomalySwimLaneChart__jobLabel"
|
|
227
|
+
x={MARGIN.left - 8}
|
|
228
|
+
y={row.rowCenterY}
|
|
229
|
+
text-anchor="end"
|
|
230
|
+
dominant-baseline="middle"
|
|
231
|
+
>
|
|
232
|
+
{ellipsize(row.datum.job, 18)}
|
|
233
|
+
</text>
|
|
234
|
+
{#each row.cells as cell (cell.key)}
|
|
235
|
+
<rect
|
|
236
|
+
class="st-anomalySwimLaneChart__cell st-anomalySwimLaneChart__cell--{cell.tone}"
|
|
237
|
+
class:st-anomalySwimLaneChart__cell--dim={hoveredKey !== null && hoveredKey !== cell.key}
|
|
238
|
+
x={cell.x}
|
|
239
|
+
y={row.y}
|
|
240
|
+
width={cell.width}
|
|
241
|
+
height={row.height}
|
|
242
|
+
rx="2"
|
|
243
|
+
data-chart-key={cell.key}
|
|
244
|
+
/>
|
|
245
|
+
{/each}
|
|
246
|
+
{/each}
|
|
247
|
+
</svg>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
{#if hasLegend}
|
|
251
|
+
<div class="st-anomalySwimLaneChart__legend" aria-hidden="true">
|
|
252
|
+
<span class="st-anomalySwimLaneChart__legendText">Low</span>
|
|
253
|
+
<span class="st-anomalySwimLaneChart__legendRamp">
|
|
254
|
+
{#each legendItems as item (item.tone)}
|
|
255
|
+
<span class="st-anomalySwimLaneChart__legendSwatch st-anomalySwimLaneChart__legendSwatch--{item.tone}"></span>
|
|
256
|
+
{/each}
|
|
257
|
+
</span>
|
|
258
|
+
<span class="st-anomalySwimLaneChart__legendText">High</span>
|
|
259
|
+
</div>
|
|
260
|
+
{/if}
|
|
261
|
+
|
|
262
|
+
<ChartDataList label={label ?? "anomaly swim lane"} items={dataValueItems} />
|
|
263
|
+
|
|
264
|
+
{#if hoveredCell}
|
|
265
|
+
{@const cell = hoveredCell.cell}
|
|
266
|
+
{@const row = hoveredCell.row}
|
|
267
|
+
<div
|
|
268
|
+
class="st-anomalySwimLaneChart__tooltip"
|
|
269
|
+
role="presentation"
|
|
270
|
+
style="left: {(cell.cx / resolvedWidth) * 100}%; top: {(row.rowCenterY / height) * 100}%"
|
|
271
|
+
>
|
|
272
|
+
<span class="st-anomalySwimLaneChart__tooltipLabel">{row.datum.job} · {cell.datum.at}</span>
|
|
273
|
+
<span class="st-anomalySwimLaneChart__tooltipValue">{cell.datum.score}</span>
|
|
274
|
+
</div>
|
|
275
|
+
{/if}
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
<style>
|
|
279
|
+
.st-anomalySwimLaneChart {
|
|
280
|
+
color: var(--st-semantic-text-secondary);
|
|
281
|
+
display: block;
|
|
282
|
+
font-family: inherit;
|
|
283
|
+
position: relative;
|
|
284
|
+
width: 100%;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.st-anomalySwimLaneChart svg {
|
|
288
|
+
display: block;
|
|
289
|
+
overflow: visible;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.st-anomalySwimLaneChart__visual {
|
|
293
|
+
display: block;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.st-anomalySwimLaneChart__axis {
|
|
297
|
+
stroke: var(--st-semantic-border-subtle);
|
|
298
|
+
stroke-width: 1;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.st-anomalySwimLaneChart__tickLabel,
|
|
302
|
+
.st-anomalySwimLaneChart__jobLabel {
|
|
303
|
+
fill: var(--st-semantic-text-secondary);
|
|
304
|
+
font-size: 0.6875rem;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.st-anomalySwimLaneChart__cell {
|
|
308
|
+
cursor: pointer;
|
|
309
|
+
stroke: var(--st-semantic-surface-default, Canvas);
|
|
310
|
+
stroke-width: 1;
|
|
311
|
+
transition: opacity 120ms ease;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.st-anomalySwimLaneChart__cell--dim {
|
|
315
|
+
opacity: 0.4;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.st-anomalySwimLaneChart__cell--category1,
|
|
319
|
+
.st-anomalySwimLaneChart__legendSwatch--category1 { fill: var(--st-semantic-data-category1); background: var(--st-semantic-data-category1); }
|
|
320
|
+
.st-anomalySwimLaneChart__cell--category2,
|
|
321
|
+
.st-anomalySwimLaneChart__legendSwatch--category2 { fill: var(--st-semantic-data-category2); background: var(--st-semantic-data-category2); }
|
|
322
|
+
.st-anomalySwimLaneChart__cell--category3,
|
|
323
|
+
.st-anomalySwimLaneChart__legendSwatch--category3 { fill: var(--st-semantic-data-category3); background: var(--st-semantic-data-category3); }
|
|
324
|
+
.st-anomalySwimLaneChart__cell--category4,
|
|
325
|
+
.st-anomalySwimLaneChart__legendSwatch--category4 { fill: var(--st-semantic-data-category4); background: var(--st-semantic-data-category4); }
|
|
326
|
+
.st-anomalySwimLaneChart__cell--category5,
|
|
327
|
+
.st-anomalySwimLaneChart__legendSwatch--category5 { fill: var(--st-semantic-data-category5); background: var(--st-semantic-data-category5); }
|
|
328
|
+
.st-anomalySwimLaneChart__cell--category6,
|
|
329
|
+
.st-anomalySwimLaneChart__legendSwatch--category6 { fill: var(--st-semantic-data-category6); background: var(--st-semantic-data-category6); }
|
|
330
|
+
.st-anomalySwimLaneChart__cell--category7,
|
|
331
|
+
.st-anomalySwimLaneChart__legendSwatch--category7 { fill: var(--st-semantic-data-category7); background: var(--st-semantic-data-category7); }
|
|
332
|
+
.st-anomalySwimLaneChart__cell--category8,
|
|
333
|
+
.st-anomalySwimLaneChart__legendSwatch--category8 { fill: var(--st-semantic-data-category8); background: var(--st-semantic-data-category8); }
|
|
334
|
+
|
|
335
|
+
.st-anomalySwimLaneChart__legend {
|
|
336
|
+
align-items: center;
|
|
337
|
+
display: flex;
|
|
338
|
+
gap: var(--st-spacing-2, 0.5rem);
|
|
339
|
+
margin-top: var(--st-spacing-2, 0.5rem);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.st-anomalySwimLaneChart__legendRamp {
|
|
343
|
+
display: inline-grid;
|
|
344
|
+
grid-template-columns: repeat(8, minmax(0.75rem, 1fr));
|
|
345
|
+
min-width: 8rem;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.st-anomalySwimLaneChart__legendSwatch {
|
|
349
|
+
display: block;
|
|
350
|
+
height: 0.5rem;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.st-anomalySwimLaneChart__legendText {
|
|
354
|
+
color: var(--st-semantic-text-secondary);
|
|
355
|
+
font-size: 0.75rem;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.st-anomalySwimLaneChart__tooltip {
|
|
359
|
+
background: var(--st-semantic-surface-inverse);
|
|
360
|
+
border-radius: var(--st-radius-sm, 0.25rem);
|
|
361
|
+
color: var(--st-semantic-text-inverse);
|
|
362
|
+
display: inline-flex;
|
|
363
|
+
flex-direction: column;
|
|
364
|
+
font-size: 0.75rem;
|
|
365
|
+
gap: 0.125rem;
|
|
366
|
+
line-height: 1.2;
|
|
367
|
+
padding: 0.375rem 0.5rem;
|
|
368
|
+
pointer-events: none;
|
|
369
|
+
position: absolute;
|
|
370
|
+
transform: translate(-50%, calc(-100% - 8px));
|
|
371
|
+
white-space: nowrap;
|
|
372
|
+
z-index: 1;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.st-anomalySwimLaneChart__tooltipLabel {
|
|
376
|
+
font-weight: 600;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.st-anomalySwimLaneChart__tooltipValue {
|
|
380
|
+
opacity: 0.85;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
@media (prefers-reduced-motion: reduce) {
|
|
384
|
+
.st-anomalySwimLaneChart__cell {
|
|
385
|
+
transition: none;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnomalySwimLaneChart - heatmap TEMPS × JOB dont chaque cellule encode un
|
|
3
|
+
* SCORE CONTINU (façon Kibana ML « anomaly swim lane »). Une ligne = un `job` ;
|
|
4
|
+
* une colonne = un bucket temporel (trié par `at`). La couleur suit l'INTENSITÉ
|
|
5
|
+
* du score normalisé 0..max sur l'échelle catégorielle continue (category1..8),
|
|
6
|
+
* reprise de HeatmapChart. Distinct de StatusHistoryChart (statut DISCRET) : ici
|
|
7
|
+
* le score est CONTINU → gradient d'intensité.
|
|
8
|
+
* API canonique (référence Svelte, React/Vue doivent s'aligner).
|
|
9
|
+
*
|
|
10
|
+
* Props obligatoires :
|
|
11
|
+
* data AnomalySwimLaneSeries[] - tableau {job, buckets[]}
|
|
12
|
+
*
|
|
13
|
+
* Props optionnelles :
|
|
14
|
+
* max number (défaut dérivé du score max des data)
|
|
15
|
+
* label string
|
|
16
|
+
* width number (défaut 520)
|
|
17
|
+
* height number (défaut 300)
|
|
18
|
+
* size number (alias de width)
|
|
19
|
+
* class string
|
|
20
|
+
*/
|
|
21
|
+
export type AnomalySwimLaneTone = "category1" | "category2" | "category3" | "category4" | "category5" | "category6" | "category7" | "category8";
|
|
22
|
+
export type AnomalySwimLaneBucket = {
|
|
23
|
+
at: number;
|
|
24
|
+
score: number;
|
|
25
|
+
};
|
|
26
|
+
export type AnomalySwimLaneSeries = {
|
|
27
|
+
job: string;
|
|
28
|
+
buckets: AnomalySwimLaneBucket[];
|
|
29
|
+
};
|
|
30
|
+
type AnomalySwimLaneChartProps = {
|
|
31
|
+
data: AnomalySwimLaneSeries[];
|
|
32
|
+
max?: number;
|
|
33
|
+
label?: string;
|
|
34
|
+
width?: number;
|
|
35
|
+
height?: number;
|
|
36
|
+
size?: number;
|
|
37
|
+
class?: string;
|
|
38
|
+
};
|
|
39
|
+
declare const AnomalySwimLaneChart: import("svelte").Component<AnomalySwimLaneChartProps, {}, "">;
|
|
40
|
+
type AnomalySwimLaneChart = ReturnType<typeof AnomalySwimLaneChart>;
|
|
41
|
+
export default AnomalySwimLaneChart;
|
|
42
|
+
//# sourceMappingURL=AnomalySwimLaneChart.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnomalySwimLaneChart.svelte.d.ts","sourceRoot":"","sources":["../src/lib/AnomalySwimLaneChart.svelte.ts"],"names":[],"mappings":"AAGE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,mBAAmB,GAC3B,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GACrD,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,qBAAqB,EAAE,CAAC;CAClC,CAAC;AAMF,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,qBAAqB,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA+MJ,QAAA,MAAM,oBAAoB,+DAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
|