@adecore/charts 0.62.1 → 0.63.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/dist/Root.js CHANGED
@@ -11,6 +11,7 @@ import { seriesColor } from './color.js';
11
11
  import { ChartContext, GroupContext } from './context.js';
12
12
  import { containingIndex, keyIndexOf, moveIndex, nearestIndex, snapIndex } from './cursor.js';
13
13
  import { useAlignedAxes } from './group-axes.js';
14
+ import { COLUMNS, ROWS } from './plane.js';
14
15
  import { movePoint, nearestPoint } from './points.js';
15
16
  import { bucketStepOf, continuousXScale, extentOf, pointXScale, stackSeries, tickCount, yScaleOf } from './scale.js';
16
17
  import { createChartStore } from './store.js';
@@ -33,7 +34,7 @@ const NO_ENTRIES = new Map();
33
34
  const defaultValue = value => Number.isInteger(value) ? formatNumber(value) : formatRounded(value, 2);
34
35
  /* The box of a chart: owns the data, the scales, the cursor and the keyboard; each part inside draws one layer. */
35
36
  export function ChartRoot(t0) {
36
- const $ = _c(114);
37
+ const $ = _c(120);
37
38
  const {
38
39
  data,
39
40
  x,
@@ -125,14 +126,36 @@ export function ChartRoot(t0) {
125
126
  const points = rows === "points";
126
127
  const band = xScale === "band" && !points;
127
128
  const horizontal = orientation === "horizontal" && band;
128
- const series = horizontal ? new Map([...allSeries].filter(_temp)) : allSeries;
129
- const markers = horizontal ? NO_ENTRIES : allMarkers;
130
- const bands = horizontal ? NO_ENTRIES : allBands;
131
- const dropped = horizontal && (series.size < allSeries.size || allMarkers.size > 0 || allBands.size > 0);
132
- let t16;
129
+ const plane = horizontal ? ROWS : COLUMNS;
130
+ const series = horizontal ? new Map([...allSeries].filter(t16 => {
131
+ const [, entry] = t16;
132
+ return plane.draws(entry.kind);
133
+ })) : allSeries;
133
134
  let t17;
134
- if ($[2] !== band || $[3] !== dropped || $[4] !== orientation) {
135
- t16 = () => {
135
+ if ($[2] !== allMarkers || $[3] !== plane) {
136
+ t17 = plane.draws("marker") ? allMarkers : NO_ENTRIES;
137
+ $[2] = allMarkers;
138
+ $[3] = plane;
139
+ $[4] = t17;
140
+ } else {
141
+ t17 = $[4];
142
+ }
143
+ const markers = t17;
144
+ let t18;
145
+ if ($[5] !== allBands || $[6] !== plane) {
146
+ t18 = plane.draws("band") ? allBands : NO_ENTRIES;
147
+ $[5] = allBands;
148
+ $[6] = plane;
149
+ $[7] = t18;
150
+ } else {
151
+ t18 = $[7];
152
+ }
153
+ const bands = t18;
154
+ const dropped = series.size < allSeries.size || markers.size < allMarkers.size || bands.size < allBands.size;
155
+ let t19;
156
+ let t20;
157
+ if ($[8] !== band || $[9] !== dropped || $[10] !== orientation) {
158
+ t19 = () => {
136
159
  if (orientation === "horizontal" && !band) {
137
160
  warnOnce("Chart.Root: `orientation=\"horizontal\"` takes the buckets of a band scale; this chart stays vertical.");
138
161
  }
@@ -140,99 +163,99 @@ export function ChartRoot(t0) {
140
163
  warnOnce("Chart.Root: a horizontal chart draws `Chart.Bar` only; its lines, areas, points, markers and bands are left out.");
141
164
  }
142
165
  };
143
- t17 = [orientation, band, dropped];
144
- $[2] = band;
145
- $[3] = dropped;
146
- $[4] = orientation;
147
- $[5] = t16;
148
- $[6] = t17;
166
+ t20 = [orientation, band, dropped];
167
+ $[8] = band;
168
+ $[9] = dropped;
169
+ $[10] = orientation;
170
+ $[11] = t19;
171
+ $[12] = t20;
149
172
  } else {
150
- t16 = $[5];
151
- t17 = $[6];
173
+ t19 = $[11];
174
+ t20 = $[12];
152
175
  }
153
- useEffect(t16, t17);
154
- let t18;
155
- if ($[7] !== data || $[8] !== x) {
156
- let t19;
157
- if ($[10] !== x) {
158
- t19 = (row, index) => {
176
+ useEffect(t19, t20);
177
+ let t21;
178
+ if ($[13] !== data || $[14] !== x) {
179
+ let t22;
180
+ if ($[16] !== x) {
181
+ t22 = (row, index) => {
159
182
  const value = readValue(x, row, index);
160
183
  return value === null || value === undefined ? Number.NaN : xOf(value);
161
184
  };
162
- $[10] = x;
163
- $[11] = t19;
185
+ $[16] = x;
186
+ $[17] = t22;
164
187
  } else {
165
- t19 = $[11];
188
+ t22 = $[17];
166
189
  }
167
- t18 = data.map(t19);
168
- $[7] = data;
169
- $[8] = x;
170
- $[9] = t18;
190
+ t21 = data.map(t22);
191
+ $[13] = data;
192
+ $[14] = x;
193
+ $[15] = t21;
171
194
  } else {
172
- t18 = $[9];
195
+ t21 = $[15];
173
196
  }
174
- const xs = t18;
175
- let t19;
176
- if ($[12] !== data || $[13] !== points || $[14] !== rowKey) {
177
- t19 = points ? data.map((row_0, index_0) => rowKey === undefined ? String(index_0) : String(readValue(rowKey, row_0, index_0))) : null;
178
- $[12] = data;
179
- $[13] = points;
180
- $[14] = rowKey;
181
- $[15] = t19;
197
+ const xs = t21;
198
+ let t22;
199
+ if ($[18] !== data || $[19] !== points || $[20] !== rowKey) {
200
+ t22 = points ? data.map((row_0, index_0) => rowKey === undefined ? String(index_0) : String(readValue(rowKey, row_0, index_0))) : null;
201
+ $[18] = data;
202
+ $[19] = points;
203
+ $[20] = rowKey;
204
+ $[21] = t22;
182
205
  } else {
183
- t19 = $[15];
206
+ t22 = $[21];
184
207
  }
185
- const keys = t19;
186
- let t20;
187
- if ($[16] !== data || $[17] !== rowLabel) {
188
- t20 = rowLabel !== undefined ? data.map((row_1, index_1) => String(readValue(rowLabel, row_1, index_1))) : null;
189
- $[16] = data;
190
- $[17] = rowLabel;
191
- $[18] = t20;
208
+ const keys = t22;
209
+ let t23;
210
+ if ($[22] !== data || $[23] !== rowLabel) {
211
+ t23 = rowLabel !== undefined ? data.map((row_1, index_1) => String(readValue(rowLabel, row_1, index_1))) : null;
212
+ $[22] = data;
213
+ $[23] = rowLabel;
214
+ $[24] = t23;
192
215
  } else {
193
- t20 = $[18];
216
+ t23 = $[24];
194
217
  }
195
- const rowLabels = t20;
196
- let t21;
197
- if ($[19] !== band || $[20] !== data || $[21] !== group || $[22] !== points) {
198
- t21 = (band || points) && group !== undefined ? data.map((row_2, index_2) => String(readValue(group, row_2, index_2))) : null;
199
- $[19] = band;
200
- $[20] = data;
201
- $[21] = group;
202
- $[22] = points;
203
- $[23] = t21;
218
+ const rowLabels = t23;
219
+ let t24;
220
+ if ($[25] !== band || $[26] !== data || $[27] !== group || $[28] !== points) {
221
+ t24 = (band || points) && group !== undefined ? data.map((row_2, index_2) => String(readValue(group, row_2, index_2))) : null;
222
+ $[25] = band;
223
+ $[26] = data;
224
+ $[27] = group;
225
+ $[28] = points;
226
+ $[29] = t24;
204
227
  } else {
205
- t21 = $[23];
228
+ t24 = $[29];
206
229
  }
207
- const groupKeys = t21;
208
- let t22;
209
- if ($[24] !== data || $[25] !== groupKeys || $[26] !== groupLabel) {
210
- t22 = groupKeys === null ? null : groupLabel === undefined ? groupKeys : data.map((row_3, index_3) => String(readValue(groupLabel, row_3, index_3)));
211
- $[24] = data;
212
- $[25] = groupKeys;
213
- $[26] = groupLabel;
214
- $[27] = t22;
230
+ const groupKeys = t24;
231
+ let t25;
232
+ if ($[30] !== data || $[31] !== groupKeys || $[32] !== groupLabel) {
233
+ t25 = groupKeys === null ? null : groupLabel === undefined ? groupKeys : data.map((row_3, index_3) => String(readValue(groupLabel, row_3, index_3)));
234
+ $[30] = data;
235
+ $[31] = groupKeys;
236
+ $[32] = groupLabel;
237
+ $[33] = t25;
215
238
  } else {
216
- t22 = $[27];
239
+ t25 = $[33];
217
240
  }
218
- const groupLabels = t22;
219
- let t23;
220
- if ($[28] !== groupKeys || $[29] !== groupLabels || $[30] !== keys || $[31] !== rowLabels || $[32] !== xs) {
221
- t23 = {
241
+ const groupLabels = t25;
242
+ let t26;
243
+ if ($[34] !== groupKeys || $[35] !== groupLabels || $[36] !== keys || $[37] !== rowLabels || $[38] !== xs) {
244
+ t26 = {
222
245
  xs,
223
246
  keys,
224
247
  rowLabels,
225
248
  groupKeys,
226
249
  groupLabels
227
250
  };
228
- $[28] = groupKeys;
229
- $[29] = groupLabels;
230
- $[30] = keys;
231
- $[31] = rowLabels;
232
- $[32] = xs;
233
- $[33] = t23;
251
+ $[34] = groupKeys;
252
+ $[35] = groupLabels;
253
+ $[36] = keys;
254
+ $[37] = rowLabels;
255
+ $[38] = xs;
256
+ $[39] = t26;
234
257
  } else {
235
- t23 = $[33];
258
+ t26 = $[39];
236
259
  }
237
260
  const {
238
261
  xs: xs_0,
@@ -240,7 +263,7 @@ export function ChartRoot(t0) {
240
263
  rowLabels: rowLabels_0,
241
264
  groupKeys: groupKeys_0,
242
265
  groupLabels: groupLabels_0
243
- } = t23;
266
+ } = t26;
244
267
  const leftY = yAxes.get("left");
245
268
  const rightY = yAxes.get("right");
246
269
  const [leftAxis, rightAxis] = useAlignedAxes(chartGroup?.widths ?? null, horizontal ? axes.start ?? 0 : leftY?.width ?? 0, horizontal ? 0 : rightY?.width ?? 0);
@@ -249,39 +272,39 @@ export function ChartRoot(t0) {
249
272
  const inset = band || bucketStep > 0 ? 0 : INSET;
250
273
  const marginLeft = margin.left ?? inset;
251
274
  const marginRight = margin.right ?? inset;
252
- let t24;
253
- if ($[34] !== band || $[35] !== groupGap || $[36] !== groupKeys_0 || $[37] !== horizontal || $[38] !== marginLeft || $[39] !== marginRight || $[40] !== minBucketWidth || $[41] !== room || $[42] !== rowHeight || $[43] !== xs_0.length) {
254
- t24 = horizontal ? bandLayout(xs_0.length, groupKeys_0, 0, rowHeight, groupGap) : band ? bandLayout(xs_0.length, groupKeys_0, Math.max(0, room - marginLeft - marginRight), minBucketWidth, groupGap) : null;
255
- $[34] = band;
256
- $[35] = groupGap;
257
- $[36] = groupKeys_0;
258
- $[37] = horizontal;
259
- $[38] = marginLeft;
260
- $[39] = marginRight;
261
- $[40] = minBucketWidth;
262
- $[41] = room;
263
- $[42] = rowHeight;
264
- $[43] = xs_0.length;
265
- $[44] = t24;
275
+ let t27;
276
+ if ($[40] !== band || $[41] !== groupGap || $[42] !== groupKeys_0 || $[43] !== horizontal || $[44] !== marginLeft || $[45] !== marginRight || $[46] !== minBucketWidth || $[47] !== room || $[48] !== rowHeight || $[49] !== xs_0.length) {
277
+ t27 = horizontal ? bandLayout(xs_0.length, groupKeys_0, 0, rowHeight, groupGap) : band ? bandLayout(xs_0.length, groupKeys_0, Math.max(0, room - marginLeft - marginRight), minBucketWidth, groupGap) : null;
278
+ $[40] = band;
279
+ $[41] = groupGap;
280
+ $[42] = groupKeys_0;
281
+ $[43] = horizontal;
282
+ $[44] = marginLeft;
283
+ $[45] = marginRight;
284
+ $[46] = minBucketWidth;
285
+ $[47] = room;
286
+ $[48] = rowHeight;
287
+ $[49] = xs_0.length;
288
+ $[50] = t27;
266
289
  } else {
267
- t24 = $[44];
290
+ t27 = $[50];
268
291
  }
269
- const layout = t24;
292
+ const layout = t27;
270
293
  const width = layout === null || horizontal ? room : Math.max(room, Math.ceil(layout.width + marginLeft + marginRight));
271
294
  const scrolls = layout !== null && width > room;
272
295
  const overhang = scrolls ? leftAxis : 0;
273
- let t25;
274
- if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
275
- t25 = {
296
+ let t28;
297
+ if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
298
+ t28 = {
276
299
  axis: "x"
277
300
  };
278
- $[45] = t25;
301
+ $[51] = t28;
279
302
  } else {
280
- t25 = $[45];
303
+ t28 = $[51];
281
304
  }
282
- const scrollbars = useOverlayScrollbars(scrolls ? scrollBox : null, t25);
305
+ const scrollbars = useOverlayScrollbars(scrolls ? scrollBox : null, t28);
283
306
  const xRows = [...xAxes.values()];
284
- const valueRoom = horizontal ? Math.max(0, ...[...series.values()].map(_temp2)) : 0;
307
+ const valueRoom = horizontal ? Math.max(0, ...[...series.values()].map(_temp)) : 0;
285
308
  const titleRoom = leftY?.top ?? rightY?.top ?? 0;
286
309
  let top;
287
310
  let bottom;
@@ -292,8 +315,8 @@ export function ChartRoot(t0) {
292
315
  height = bottom + (margin.bottom ?? 0) + (yAxes.size > 0 ? X_AXIS_GAP + VALUE_AXIS_LINE : 0);
293
316
  } else {
294
317
  height = boxHeight;
295
- bottom = height - (xRows.length === 0 ? margin.bottom ?? 0 : (margin.bottom ?? 4) + X_AXIS_GAP + xRows.reduce(_temp3, 0));
296
- top = Math.max(margin.top ?? 8, leftY?.top ?? 0, rightY?.top ?? 0, [...series.values()].some(_temp4) ? VALUE_LABEL_ROOM : 0);
318
+ bottom = height - (xRows.length === 0 ? margin.bottom ?? 0 : (margin.bottom ?? 4) + X_AXIS_GAP + xRows.reduce(_temp2, 0));
319
+ top = Math.max(margin.top ?? 8, leftY?.top ?? 0, rightY?.top ?? 0, [...series.values()].some(_temp3) ? VALUE_LABEL_ROOM : 0);
297
320
  }
298
321
  const right = width - marginRight - (axes.end ?? 0) - valueRoom;
299
322
  const plot = {
@@ -307,9 +330,9 @@ export function ChartRoot(t0) {
307
330
  const valueRange = horizontal ? [plot.left, plot.right] : [plot.bottom, plot.top];
308
331
  const continuousKind = xScale === "band" ? "linear" : xScale;
309
332
  const continuous = band ? null : points ? pointXScale(continuousKind, xs_0, [plot.left, plot.right], xOptions) : continuousXScale(continuousKind, xs_0, [plot.left, plot.right], bucketStep, xOptions);
310
- const stackInput = [...series].map(_temp5);
333
+ const stackInput = [...series].map(_temp4);
311
334
  const stacked = stackSeries(stackInput, xs_0.length);
312
- const ruleValues = [...rules.values()].map(_temp6);
335
+ const ruleValues = [...rules.values()].map(_temp5);
313
336
  const yOptions = ruleValues.length === 0 ? y : {
314
337
  ...y,
315
338
  include: [...(y.include ?? []), ...ruleValues]
@@ -347,7 +370,7 @@ export function ChartRoot(t0) {
347
370
  count: ids_0.length
348
371
  }));
349
372
  }
350
- const placing = points ? [...series.values()].find(_temp7) : undefined;
373
+ const placing = points ? [...series.values()].find(_temp6) : undefined;
351
374
  const pointGroups = [];
352
375
  const groupIndexes = [];
353
376
  if (points) {
@@ -382,10 +405,10 @@ export function ChartRoot(t0) {
382
405
  });
383
406
  return [left, pixel_0];
384
407
  });
385
- const readable = [...series].filter((t26, index_7, all) => {
386
- const [, entry_6] = t26;
387
- return !points || all.findIndex(t27 => {
388
- const [, other] = t27;
408
+ const readable = [...series].filter((t29, index_7, all) => {
409
+ const [, entry_6] = t29;
410
+ return !points || all.findIndex(t30 => {
411
+ const [, other] = t30;
389
412
  return other.label === entry_6.label;
390
413
  }) === index_7;
391
414
  });
@@ -422,7 +445,7 @@ export function ChartRoot(t0) {
422
445
  return typeof value_2 === "number" ? continuous.at(value_2) : null;
423
446
  };
424
447
  const span = continuous === null ? 0 : continuous.domain[1] - continuous.domain[0];
425
- const rowFormats = xRows.flatMap(_temp8).toReversed();
448
+ const rowFormats = xRows.flatMap(_temp7).toReversed();
426
449
  const formatX = value_3 => {
427
450
  if (rowFormats.length > 0) {
428
451
  return rowFormats.map(format_0 => format_0(value_3)).join(", ");
@@ -491,9 +514,9 @@ export function ChartRoot(t0) {
491
514
  const keyIndex = indexAt(keyX);
492
515
  const from_0 = keyIndex >= 0 ? keyIndex : activeIndex;
493
516
  const ownsCursor = controlled || sharedCursor === null || sharedCursor.owner === id;
494
- let t28;
495
- if ($[46] !== controlled || $[47] !== id || $[48] !== onActiveXChange || $[49] !== sharedCursor) {
496
- t28 = value_5 => {
517
+ let t31;
518
+ if ($[52] !== controlled || $[53] !== id || $[54] !== onActiveXChange || $[55] !== sharedCursor) {
519
+ t31 = value_5 => {
497
520
  if (!controlled) {
498
521
  if (sharedCursor !== null) {
499
522
  sharedCursor.setX(value_5, id);
@@ -503,45 +526,45 @@ export function ChartRoot(t0) {
503
526
  }
504
527
  onActiveXChange?.(value_5);
505
528
  };
506
- $[46] = controlled;
507
- $[47] = id;
508
- $[48] = onActiveXChange;
509
- $[49] = sharedCursor;
510
- $[50] = t28;
529
+ $[52] = controlled;
530
+ $[53] = id;
531
+ $[54] = onActiveXChange;
532
+ $[55] = sharedCursor;
533
+ $[56] = t31;
511
534
  } else {
512
- t28 = $[50];
535
+ t31 = $[56];
513
536
  }
514
- const setActiveX = t28;
515
- let t29;
516
- if ($[51] !== selected) {
517
- t29 = new Set((selected ?? []).map(String));
518
- $[51] = selected;
519
- $[52] = t29;
537
+ const setActiveX = t31;
538
+ let t32;
539
+ if ($[57] !== selected) {
540
+ t32 = new Set((selected ?? []).map(String));
541
+ $[57] = selected;
542
+ $[58] = t32;
520
543
  } else {
521
- t29 = $[52];
544
+ t32 = $[58];
522
545
  }
523
- const picked = t29;
524
- let t30;
525
- if ($[53] !== picked) {
526
- t30 = key_0 => picked.has(String(key_0));
527
- $[53] = picked;
528
- $[54] = t30;
546
+ const picked = t32;
547
+ let t33;
548
+ if ($[59] !== picked) {
549
+ t33 = key_0 => picked.has(String(key_0));
550
+ $[59] = picked;
551
+ $[60] = t33;
529
552
  } else {
530
- t30 = $[54];
553
+ t33 = $[60];
531
554
  }
532
- const selectedRows = (keys_0 ?? xs_0).map(t30);
533
- let t31;
534
- if ($[55] !== dimmed) {
535
- t31 = (row_6, index_16) => dimmed?.(row_6, index_16) ?? false;
536
- $[55] = dimmed;
537
- $[56] = t31;
555
+ const selectedRows = (keys_0 ?? xs_0).map(t33);
556
+ let t34;
557
+ if ($[61] !== dimmed) {
558
+ t34 = (row_6, index_16) => dimmed?.(row_6, index_16) ?? false;
559
+ $[61] = dimmed;
560
+ $[62] = t34;
538
561
  } else {
539
- t31 = $[56];
562
+ t34 = $[62];
540
563
  }
541
- const dimmedRows = data.map(t31);
542
- const dimmedGroups = new Set(pointGroups.filter(run => run.indexes.every(index_17 => dimmedRows[index_17])).map(_temp9));
564
+ const dimmedRows = data.map(t34);
565
+ const dimmedGroups = new Set(pointGroups.filter(run => run.indexes.every(index_17 => dimmedRows[index_17])).map(_temp8));
543
566
  const anyPicked = selectedRows.some(Boolean);
544
- const columnDim = [...series.values()].find(_temp0)?.dimOpacity ?? null;
567
+ const columnDim = [...series.values()].find(_temp9)?.dimOpacity ?? null;
545
568
  const labelFocus = xs_0.map((__1, index_18) => {
546
569
  if (index_18 === activeIndex || selectedRows[index_18]) {
547
570
  return "strong";
@@ -549,31 +572,31 @@ export function ChartRoot(t0) {
549
572
  return dimmedRows[index_18] || anyPicked ? "dim" : null;
550
573
  });
551
574
  const describe = index_19 => {
552
- const parts = (points ? [groupLabels_0?.[index_19], rowLabels_0?.[index_19], xValueOf(index_19)] : [groupLabels_0?.[index_19], rowLabels_0?.[index_19] ?? xValueOf(index_19)]).filter(_temp1);
575
+ const parts = (points ? [groupLabels_0?.[index_19], rowLabels_0?.[index_19], xValueOf(index_19)] : [groupLabels_0?.[index_19], rowLabels_0?.[index_19] ?? xValueOf(index_19)]).filter(_temp0);
553
576
  for (const [, entry_8] of readable) {
554
577
  const value_6 = entry_8.values[index_19];
555
578
  if (value_6 !== null && value_6 !== undefined) {
556
579
  parts.push(`${entry_8.label} ${formatY(value_6)}`);
557
580
  }
558
581
  }
559
- return [...parts, ...notesAt(index_19).map(_temp10)].join(", ");
582
+ return [...parts, ...notesAt(index_19).map(_temp1)].join(", ");
560
583
  };
561
- let t32;
562
- let t33;
563
- if ($[57] !== data || $[58] !== x) {
564
- t32 = () => {
584
+ let t35;
585
+ let t36;
586
+ if ($[63] !== data || $[64] !== x) {
587
+ t35 = () => {
565
588
  warnMissingKey(x, data, "Chart.Root");
566
589
  };
567
- t33 = [x, data];
568
- $[57] = data;
569
- $[58] = x;
570
- $[59] = t32;
571
- $[60] = t33;
590
+ t36 = [x, data];
591
+ $[63] = data;
592
+ $[64] = x;
593
+ $[65] = t35;
594
+ $[66] = t36;
572
595
  } else {
573
- t32 = $[59];
574
- t33 = $[60];
596
+ t35 = $[65];
597
+ t36 = $[66];
575
598
  }
576
- useEffect(t32, t33);
599
+ useEffect(t35, t36);
577
600
  const indexAtPointer = e => {
578
601
  const box = e.currentTarget.getBoundingClientRect();
579
602
  const pixel_1 = horizontal ? e.clientY - box.top : e.clientX - box.left;
@@ -609,28 +632,28 @@ export function ChartRoot(t0) {
609
632
  }
610
633
  };
611
634
  const pressable = interactive && onActivate !== undefined && (layout !== null || points);
612
- let t34;
613
- if ($[61] !== data || $[62] !== onActivate || $[63] !== pressable) {
614
- t34 = index_24 => {
635
+ let t37;
636
+ if ($[67] !== data || $[68] !== onActivate || $[69] !== pressable) {
637
+ t37 = index_24 => {
615
638
  if (pressable && index_24 >= 0) {
616
639
  onActivate(data[index_24], index_24);
617
640
  }
618
641
  };
619
- $[61] = data;
620
- $[62] = onActivate;
621
- $[63] = pressable;
622
- $[64] = t34;
642
+ $[67] = data;
643
+ $[68] = onActivate;
644
+ $[69] = pressable;
645
+ $[70] = t37;
623
646
  } else {
624
- t34 = $[64];
647
+ t37 = $[70];
625
648
  }
626
- const activate = t34;
649
+ const activate = t37;
627
650
  const onKeyDown = e_1 => {
628
651
  if (pressable && from_0 >= 0 && (e_1.key === "Enter" || e_1.key === " ")) {
629
652
  e_1.preventDefault();
630
653
  activate(from_0);
631
654
  return;
632
655
  }
633
- const groupStarts = layout?.groups.map(_temp11) ?? [];
656
+ const groupStarts = layout?.groups.map(_temp10) ?? [];
634
657
  const target = keys_0 === null ? moveIndex(e_1.key, from_0, xs_0.length, groupStarts, horizontal ? "rows" : "columns") : movePoint(pointGroups.map(run_2 => run_2.indexes.filter(index_25 => positions[index_25] !== null)), from_0, e_1.key);
635
658
  if (target === undefined) {
636
659
  return;
@@ -667,6 +690,7 @@ export function ChartRoot(t0) {
667
690
  band: layout,
668
691
  continuous,
669
692
  horizontal,
693
+ plane,
670
694
  valueRoom,
671
695
  y: scaleY,
672
696
  yStep,
@@ -723,46 +747,46 @@ export function ChartRoot(t0) {
723
747
  halo: surface === "raised" ? "var(--surface-raised)" : "var(--surface)"
724
748
  };
725
749
  const ruleText = rules.size === 0 ? null : `${[...rules.values()].map(rule_0 => `${rule_0.label} ${formatY(rule_0.value)}`).join(", ")}.`;
726
- let t35;
727
- if ($[65] !== horizontal || $[66] !== points || $[67] !== t) {
728
- t35 = points ? t("keyboard.points") : horizontal ? t("keyboard.rows") : t("keyboard.move");
729
- $[65] = horizontal;
730
- $[66] = points;
731
- $[67] = t;
732
- $[68] = t35;
750
+ let t38;
751
+ if ($[71] !== horizontal || $[72] !== points || $[73] !== t) {
752
+ t38 = points ? t("keyboard.points") : horizontal ? t("keyboard.rows") : t("keyboard.move");
753
+ $[71] = horizontal;
754
+ $[72] = points;
755
+ $[73] = t;
756
+ $[74] = t38;
733
757
  } else {
734
- t35 = $[68];
758
+ t38 = $[74];
735
759
  }
736
- let t36;
737
- if ($[69] !== layout || $[70] !== t) {
738
- t36 = layout !== null && layout.groups.length > 0 ? t("keyboard.groups") : null;
739
- $[69] = layout;
740
- $[70] = t;
741
- $[71] = t36;
760
+ let t39;
761
+ if ($[75] !== layout || $[76] !== t) {
762
+ t39 = layout !== null && layout.groups.length > 0 ? t("keyboard.groups") : null;
763
+ $[75] = layout;
764
+ $[76] = t;
765
+ $[77] = t39;
742
766
  } else {
743
- t36 = $[71];
767
+ t39 = $[77];
744
768
  }
745
- let t37;
746
- if ($[72] !== pressable || $[73] !== t) {
747
- t37 = pressable ? t("keyboard.activate") : null;
748
- $[72] = pressable;
749
- $[73] = t;
750
- $[74] = t37;
769
+ let t40;
770
+ if ($[78] !== pressable || $[79] !== t) {
771
+ t40 = pressable ? t("keyboard.activate") : null;
772
+ $[78] = pressable;
773
+ $[79] = t;
774
+ $[80] = t40;
751
775
  } else {
752
- t37 = $[74];
776
+ t40 = $[80];
753
777
  }
754
- let t38;
755
- if ($[75] !== ruleText || $[76] !== t35 || $[77] !== t36 || $[78] !== t37) {
756
- t38 = [ruleText, t35, t36, t37].filter(Boolean);
757
- $[75] = ruleText;
758
- $[76] = t35;
759
- $[77] = t36;
760
- $[78] = t37;
761
- $[79] = t38;
778
+ let t41;
779
+ if ($[81] !== ruleText || $[82] !== t38 || $[83] !== t39 || $[84] !== t40) {
780
+ t41 = [ruleText, t38, t39, t40].filter(Boolean);
781
+ $[81] = ruleText;
782
+ $[82] = t38;
783
+ $[83] = t39;
784
+ $[84] = t40;
785
+ $[85] = t41;
762
786
  } else {
763
- t38 = $[79];
787
+ t41 = $[85];
764
788
  }
765
- const hint = t38.join(" ");
789
+ const hint = t41.join(" ");
766
790
  const highlighted = layout === null ? [] : xs_0.flatMap((__3, index_26) => cursor === "full" && index_26 === activeIndex || selectedRows[index_26] ? [index_26] : []);
767
791
  const bucketBox = (index_27, pressing) => {
768
792
  const start = Math.round(bucketStart + (layout?.lefts[index_27] ?? 0));
@@ -787,201 +811,201 @@ export function ChartRoot(t0) {
787
811
  height: pressing ? height - plot.top : plot.height
788
812
  };
789
813
  };
790
- let t39;
791
- if ($[80] !== keyX || $[81] !== setActiveX) {
792
- t39 = () => setActiveX(keyX);
793
- $[80] = keyX;
794
- $[81] = setActiveX;
795
- $[82] = t39;
814
+ let t42;
815
+ if ($[86] !== keyX || $[87] !== setActiveX) {
816
+ t42 = () => setActiveX(keyX);
817
+ $[86] = keyX;
818
+ $[87] = setActiveX;
819
+ $[88] = t42;
796
820
  } else {
797
- t39 = $[82];
821
+ t42 = $[88];
798
822
  }
799
823
  const pointer = {
800
824
  onPointerMove,
801
- onPointerLeave: t39,
825
+ onPointerLeave: t42,
802
826
  onClick: pressable ? e_2 => activate(indexAtPointer(e_2)) : undefined
803
827
  };
804
- const t40 = grow && "h-full min-h-0";
805
- let t41;
806
- if ($[83] !== className || $[84] !== t40) {
807
- t41 = clsx("flex min-w-0 flex-col gap-3", t40, className);
808
- $[83] = className;
809
- $[84] = t40;
810
- $[85] = t41;
828
+ const t43 = grow && "h-full min-h-0";
829
+ let t44;
830
+ if ($[89] !== className || $[90] !== t43) {
831
+ t44 = clsx("flex min-w-0 flex-col gap-3", t43, className);
832
+ $[89] = className;
833
+ $[90] = t43;
834
+ $[91] = t44;
811
835
  } else {
812
- t41 = $[85];
836
+ t44 = $[91];
813
837
  }
814
- let t42;
815
- if ($[86] === Symbol.for("react.memo_cache_sentinel")) {
816
- t42 = /*#__PURE__*/_jsx("div", {
838
+ let t45;
839
+ if ($[92] === Symbol.for("react.memo_cache_sentinel")) {
840
+ t45 = /*#__PURE__*/_jsx("div", {
817
841
  ref: setLegendSlot,
818
842
  className: "empty:hidden"
819
843
  });
820
- $[86] = t42;
844
+ $[92] = t45;
821
845
  } else {
822
- t42 = $[86];
846
+ t45 = $[92];
823
847
  }
824
- const t43 = grow && !horizontal && "min-h-0 flex-1";
825
- const t44 = horizontal && pressable && "cursor-pointer";
826
- let t45;
827
- if ($[87] !== t43 || $[88] !== t44) {
828
- t45 = clsx("focus-ring-within relative flex rounded-md", t43, t44);
829
- $[87] = t43;
830
- $[88] = t44;
831
- $[89] = t45;
848
+ const t46 = grow && !horizontal && "min-h-0 flex-1";
849
+ const t47 = horizontal && pressable && "cursor-pointer";
850
+ let t48;
851
+ if ($[93] !== t46 || $[94] !== t47) {
852
+ t48 = clsx("focus-ring-within relative flex rounded-md", t46, t47);
853
+ $[93] = t46;
854
+ $[94] = t47;
855
+ $[95] = t48;
832
856
  } else {
833
- t45 = $[89];
857
+ t48 = $[95];
834
858
  }
835
- let t46;
836
- if ($[90] === Symbol.for("react.memo_cache_sentinel")) {
837
- t46 = {
859
+ let t49;
860
+ if ($[96] === Symbol.for("react.memo_cache_sentinel")) {
861
+ t49 = {
838
862
  outlineOffset: 4
839
863
  };
840
- $[90] = t46;
864
+ $[96] = t49;
841
865
  } else {
842
- t46 = $[90];
866
+ t49 = $[96];
843
867
  }
844
- let t47;
845
- if ($[91] === Symbol.for("react.memo_cache_sentinel")) {
846
- t47 = node => {
868
+ let t50;
869
+ if ($[97] === Symbol.for("react.memo_cache_sentinel")) {
870
+ t50 = node => {
847
871
  scroller.current = node;
848
872
  setScrollBox(node);
849
873
  };
850
- $[91] = t47;
874
+ $[97] = t50;
851
875
  } else {
852
- t47 = $[91];
876
+ t50 = $[97];
853
877
  }
854
- const t48 = scrolls ? "overflow-x-auto overflow-y-hidden overscroll-x-contain" : "overflow-visible";
855
- let t49;
856
- if ($[92] !== t48) {
857
- t49 = clsx("min-w-0 flex-1", t48);
858
- $[92] = t48;
859
- $[93] = t49;
878
+ const t51 = scrolls ? "overflow-x-auto overflow-y-hidden overscroll-x-contain" : "overflow-visible";
879
+ let t52;
880
+ if ($[98] !== t51) {
881
+ t52 = clsx("min-w-0 flex-1", t51);
882
+ $[98] = t51;
883
+ $[99] = t52;
860
884
  } else {
861
- t49 = $[93];
885
+ t52 = $[99];
862
886
  }
863
- let t50;
864
- if ($[94] !== overhang || $[95] !== scroll) {
865
- t50 = overhang > 0 ? {
887
+ let t53;
888
+ if ($[100] !== overhang || $[101] !== scroll) {
889
+ t53 = overhang > 0 ? {
866
890
  marginLeft: -overhang,
867
891
  paddingLeft: overhang,
868
892
  clipPath: scroll > 0 ? `inset(0 0 0 ${overhang}px)` : undefined
869
893
  } : undefined;
870
- $[94] = overhang;
871
- $[95] = scroll;
872
- $[96] = t50;
894
+ $[100] = overhang;
895
+ $[101] = scroll;
896
+ $[102] = t53;
873
897
  } else {
874
- t50 = $[96];
898
+ t53 = $[102];
875
899
  }
876
- let t51;
877
- if ($[97] === Symbol.for("react.memo_cache_sentinel")) {
878
- t51 = e_3 => setScroll(e_3.currentTarget.scrollLeft);
879
- $[97] = t51;
900
+ let t54;
901
+ if ($[103] === Symbol.for("react.memo_cache_sentinel")) {
902
+ t54 = e_3 => setScroll(e_3.currentTarget.scrollLeft);
903
+ $[103] = t54;
880
904
  } else {
881
- t51 = $[97];
905
+ t54 = $[103];
882
906
  }
883
- const t52 = height;
884
- let t53;
885
- if ($[98] !== interactive || $[99] !== t) {
886
- t53 = interactive ? t("chart") : undefined;
887
- $[98] = interactive;
888
- $[99] = t;
889
- $[100] = t53;
907
+ const t55 = height;
908
+ let t56;
909
+ if ($[104] !== interactive || $[105] !== t) {
910
+ t56 = interactive ? t("chart") : undefined;
911
+ $[104] = interactive;
912
+ $[105] = t;
913
+ $[106] = t56;
890
914
  } else {
891
- t53 = $[100];
915
+ t56 = $[106];
892
916
  }
893
- const t54 = pressable && "cursor-pointer";
894
- let t55;
895
- if ($[101] !== t54) {
896
- t55 = clsx("block overflow-visible outline-none", t54);
897
- $[101] = t54;
898
- $[102] = t55;
917
+ const t57 = pressable && "cursor-pointer";
918
+ let t58;
919
+ if ($[107] !== t57) {
920
+ t58 = clsx("block overflow-visible outline-none", t57);
921
+ $[107] = t57;
922
+ $[108] = t58;
899
923
  } else {
900
- t55 = $[102];
924
+ t58 = $[108];
901
925
  }
902
- let t56;
903
- if ($[103] === Symbol.for("react.memo_cache_sentinel")) {
904
- t56 = /*#__PURE__*/_jsx("g", {
926
+ let t59;
927
+ if ($[109] === Symbol.for("react.memo_cache_sentinel")) {
928
+ t59 = /*#__PURE__*/_jsx("g", {
905
929
  ref: setRulesSlot,
906
930
  tabIndex: -1
907
931
  });
908
- $[103] = t56;
932
+ $[109] = t59;
909
933
  } else {
910
- t56 = $[103];
934
+ t59 = $[109];
911
935
  }
912
- let t57;
913
- if ($[104] !== measureGroups) {
914
- t57 = node_0 => {
936
+ let t60;
937
+ if ($[110] !== measureGroups) {
938
+ t60 = node_0 => {
915
939
  setGroupsSlot(node_0);
916
940
  measureGroups(node_0);
917
941
  };
918
- $[104] = measureGroups;
919
- $[105] = t57;
942
+ $[110] = measureGroups;
943
+ $[111] = t60;
920
944
  } else {
921
- t57 = $[105];
945
+ t60 = $[111];
922
946
  }
923
- let t58;
924
- if ($[106] !== width) {
925
- t58 = {
947
+ let t61;
948
+ if ($[112] !== width) {
949
+ t61 = {
926
950
  width
927
951
  };
928
- $[106] = width;
929
- $[107] = t58;
952
+ $[112] = width;
953
+ $[113] = t61;
930
954
  } else {
931
- t58 = $[107];
955
+ t61 = $[113];
932
956
  }
933
- let t59;
934
- if ($[108] !== t57 || $[109] !== t58) {
935
- t59 = /*#__PURE__*/_jsx("div", {
936
- ref: t57,
957
+ let t62;
958
+ if ($[114] !== t60 || $[115] !== t61) {
959
+ t62 = /*#__PURE__*/_jsx("div", {
960
+ ref: t60,
937
961
  className: "empty:hidden",
938
- style: t58
962
+ style: t61
939
963
  });
940
- $[108] = t57;
941
- $[109] = t58;
942
- $[110] = t59;
964
+ $[114] = t60;
965
+ $[115] = t61;
966
+ $[116] = t62;
943
967
  } else {
944
- t59 = $[110];
968
+ t62 = $[116];
945
969
  }
946
- let t60;
947
- if ($[111] === Symbol.for("react.memo_cache_sentinel")) {
948
- t60 = /*#__PURE__*/_jsx("g", {
970
+ let t63;
971
+ if ($[117] === Symbol.for("react.memo_cache_sentinel")) {
972
+ t63 = /*#__PURE__*/_jsx("g", {
949
973
  ref: setRightSlot,
950
974
  tabIndex: -1
951
975
  });
952
- $[111] = t60;
976
+ $[117] = t63;
953
977
  } else {
954
- t60 = $[111];
978
+ t63 = $[117];
955
979
  }
956
- let t61;
957
- if ($[112] === Symbol.for("react.memo_cache_sentinel")) {
958
- t61 = /*#__PURE__*/_jsx("div", {
980
+ let t64;
981
+ if ($[118] === Symbol.for("react.memo_cache_sentinel")) {
982
+ t64 = /*#__PURE__*/_jsx("div", {
959
983
  ref: setTooltipSlot,
960
984
  className: "pointer-events-none absolute inset-0"
961
985
  });
962
- $[112] = t61;
986
+ $[118] = t64;
963
987
  } else {
964
- t61 = $[112];
988
+ t64 = $[118];
965
989
  }
966
- let t62;
967
- if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
968
- t62 = /*#__PURE__*/_jsx("div", {
990
+ let t65;
991
+ if ($[119] === Symbol.for("react.memo_cache_sentinel")) {
992
+ t65 = /*#__PURE__*/_jsx("div", {
969
993
  ref: setTableSlot,
970
994
  className: "empty:hidden"
971
995
  });
972
- $[113] = t62;
996
+ $[119] = t65;
973
997
  } else {
974
- t62 = $[113];
998
+ t65 = $[119];
975
999
  }
976
1000
  return /*#__PURE__*/_jsx(ChartContext, {
977
1001
  value: context,
978
1002
  children: /*#__PURE__*/_jsxs("div", {
979
1003
  ref: ref,
980
- className: t41,
981
- children: [t42, /*#__PURE__*/_jsxs("div", {
1004
+ className: t44,
1005
+ children: [t45, /*#__PURE__*/_jsxs("div", {
982
1006
  ref: measure,
983
- className: t45,
984
- style: t46,
1007
+ className: t48,
1008
+ style: t49,
985
1009
  ...(horizontal ? pointer : {}),
986
1010
  children: [horizontal ? /*#__PURE__*/_jsx("div", {
987
1011
  ref: setRowsSlot,
@@ -1003,20 +1027,20 @@ export function ChartRoot(t0) {
1003
1027
  }), /*#__PURE__*/_jsxs("div", {
1004
1028
  className: "relative flex min-w-0 flex-1",
1005
1029
  children: [/*#__PURE__*/_jsxs("div", {
1006
- ref: t47,
1007
- className: t49,
1008
- style: t50,
1009
- onScroll: t51,
1030
+ ref: t50,
1031
+ className: t52,
1032
+ style: t53,
1033
+ onScroll: t54,
1010
1034
  children: [/*#__PURE__*/_jsxs("svg", {
1011
1035
  width: width,
1012
- height: t52,
1036
+ height: t55,
1013
1037
  role: interactive ? "group" : "img",
1014
1038
  tabIndex: interactive ? 0 : undefined,
1015
- "aria-roledescription": t53,
1039
+ "aria-roledescription": t56,
1016
1040
  "aria-label": label,
1017
1041
  "aria-describedby": interactive ? `${id}-hint` : undefined,
1018
1042
  "aria-activedescendant": pressable && from_0 >= 0 ? `${id}-${from_0}` : undefined,
1019
- className: t55,
1043
+ className: t58,
1020
1044
  ...(horizontal ? {} : pointer),
1021
1045
  onKeyDown: interactive ? onKeyDown : undefined,
1022
1046
  onBlur: () => {
@@ -1029,7 +1053,7 @@ export function ChartRoot(t0) {
1029
1053
  children: [layout !== null && highlighted.map(index_28 => /*#__PURE__*/_jsx("rect", {
1030
1054
  ...bucketBox(index_28, false),
1031
1055
  className: "fill-surface-hover"
1032
- }, index_28)), children, t56, continuous !== null && !points && activeIndex >= 0 && cursor !== "none" && /*#__PURE__*/_jsx(Crosshair, {
1056
+ }, index_28)), children, t59, continuous !== null && !points && activeIndex >= 0 && cursor !== "none" && /*#__PURE__*/_jsx(Crosshair, {
1033
1057
  context: context,
1034
1058
  dots: cursor === "full"
1035
1059
  }), points && /*#__PURE__*/_jsx(Guides, {
@@ -1058,16 +1082,16 @@ export function ChartRoot(t0) {
1058
1082
  className: "fill-text-faint text-xs",
1059
1083
  children: t("noData")
1060
1084
  })]
1061
- }), t59]
1085
+ }), t62]
1062
1086
  }), scrollbars]
1063
1087
  }), /*#__PURE__*/_jsx("svg", {
1064
1088
  width: rightAxis,
1065
1089
  height: height,
1066
1090
  "aria-hidden": true,
1067
1091
  className: "shrink-0 overflow-visible",
1068
- children: t60
1069
- }), t61]
1070
- }), t62, interactive && /*#__PURE__*/_jsxs(_Fragment, {
1092
+ children: t63
1093
+ }), t64]
1094
+ }), t65, interactive && /*#__PURE__*/_jsxs(_Fragment, {
1071
1095
  children: [/*#__PURE__*/_jsx("p", {
1072
1096
  id: `${id}-hint`,
1073
1097
  className: "sr-only",
@@ -1082,31 +1106,31 @@ export function ChartRoot(t0) {
1082
1106
  });
1083
1107
  }
1084
1108
  /* The line at the cursor and a dot where it crosses each line and area. */
1085
- function _temp11(run_1) {
1109
+ function _temp10(run_1) {
1086
1110
  return run_1.first;
1087
1111
  }
1088
- function _temp10(note) {
1112
+ function _temp1(note) {
1089
1113
  return note.detail === null ? note.label : `${note.label}, ${note.detail}`;
1090
1114
  }
1091
- function _temp1(part) {
1115
+ function _temp0(part) {
1092
1116
  return part !== undefined;
1093
1117
  }
1094
- function _temp0(entry_7) {
1118
+ function _temp9(entry_7) {
1095
1119
  return entry_7.kind === "bar";
1096
1120
  }
1097
- function _temp9(run_0) {
1121
+ function _temp8(run_0) {
1098
1122
  return run_0.key;
1099
1123
  }
1100
- function _temp8(row_5) {
1124
+ function _temp7(row_5) {
1101
1125
  return row_5.format === undefined ? [] : [row_5.format];
1102
1126
  }
1103
- function _temp7(entry_5) {
1127
+ function _temp6(entry_5) {
1104
1128
  return entry_5.kind === "point" || entry_5.kind === "line";
1105
1129
  }
1106
- function _temp6(rule) {
1130
+ function _temp5(rule) {
1107
1131
  return rule.value;
1108
1132
  }
1109
- function _temp5(t0) {
1133
+ function _temp4(t0) {
1110
1134
  const [seriesId, entry_2] = t0;
1111
1135
  return {
1112
1136
  id: seriesId,
@@ -1114,19 +1138,15 @@ function _temp5(t0) {
1114
1138
  stack: entry_2.stack
1115
1139
  };
1116
1140
  }
1117
- function _temp4(entry_1) {
1141
+ function _temp3(entry_1) {
1118
1142
  return entry_1.valueLabels;
1119
1143
  }
1120
- function _temp3(sum, row_4) {
1144
+ function _temp2(sum, row_4) {
1121
1145
  return sum + row_4.room;
1122
1146
  }
1123
- function _temp2(entry_0) {
1147
+ function _temp(entry_0) {
1124
1148
  return entry_0.endRoom ?? 0;
1125
1149
  }
1126
- function _temp(t0) {
1127
- const [, entry] = t0;
1128
- return entry.kind === "bar";
1129
- }
1130
1150
  function Crosshair(t0) {
1131
1151
  const $ = _c(19);
1132
1152
  const {
@@ -1236,7 +1256,7 @@ function Guides(t0) {
1236
1256
  } = context;
1237
1257
  let t1;
1238
1258
  if ($[0] !== activeIndex || $[1] !== selected) {
1239
- t1 = new Set([activeIndex, ...selected.flatMap(_temp12)]);
1259
+ t1 = new Set([activeIndex, ...selected.flatMap(_temp11)]);
1240
1260
  $[0] = activeIndex;
1241
1261
  $[1] = selected;
1242
1262
  $[2] = t1;
@@ -1266,7 +1286,7 @@ function Guides(t0) {
1266
1286
  if ($[8] !== context.halo || $[9] !== data || $[10] !== formatX || $[11] !== formatY || $[12] !== plot || $[13] !== positions || $[14] !== series || $[15] !== shown || $[16] !== xs) {
1267
1287
  t5 = Symbol.for("react.early_return_sentinel");
1268
1288
  bb0: {
1269
- const placing = [...series.values()].find(_temp13);
1289
+ const placing = [...series.values()].find(_temp12);
1270
1290
  if (shown.length === 0 || placing === undefined || data.length === 0) {
1271
1291
  t5 = null;
1272
1292
  break bb0;
@@ -1331,9 +1351,9 @@ function Guides(t0) {
1331
1351
  }
1332
1352
  return t4;
1333
1353
  }
1334
- function _temp13(entry) {
1354
+ function _temp12(entry) {
1335
1355
  return entry.kind === "point" || entry.kind === "line";
1336
1356
  }
1337
- function _temp12(picked, index) {
1357
+ function _temp11(picked, index) {
1338
1358
  return picked ? [index] : [];
1339
1359
  }