@cfasim-ui/charts 0.6.3 → 0.6.4

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.
@@ -77,16 +77,16 @@ export interface ChartCommonProps {
77
77
  /** Styling for the chart title. See `TitleStyle`. */
78
78
  titleStyle?: TitleStyle;
79
79
  /**
80
- * ARIA role for the chart's root element. Defaults to `"figure"` when an
81
- * accessible name is present (from `ariaLabel` or `title`), so screen
82
- * readers announce the chart as a labeled figure while its controls (menu,
83
- * download) stay reachable. Pass `"img"` to expose it as a single image
84
- * (which hides the inner controls from assistive tech), or your own role.
80
+ * ARIA role for the chart's `<svg>`. Defaults to `"img"` when an accessible
81
+ * name is present (from `ariaLabel` or `title`), so screen readers announce
82
+ * the chart as a single labeled image instead of exposing the individual
83
+ * marks. The menu and download controls sit outside the `<svg>`, so they
84
+ * stay reachable regardless. Pass your own role to override.
85
85
  */
86
86
  role?: string;
87
87
  /**
88
- * Accessible name for the chart, announced by screen readers via the root
89
- * element's `aria-label`. Defaults to the `title` prop. The individual
88
+ * Accessible name for the chart, announced by screen readers via the
89
+ * `<svg>`'s `aria-label`. Defaults to the `title` prop. The individual
90
90
  * marks aren't exposed to assistive tech, so set this to a short summary of
91
91
  * what the chart shows.
92
92
  */
package/dist/index.css CHANGED
@@ -1,2 +1,2 @@
1
- .chart-menu-trigger-area[data-v-f5743494]{z-index:1;position:absolute;top:.5em;right:.5em}.chart-menu-trigger-area--expanded[data-v-f5743494]{top:1.25em;right:1.25em}.chart-menu-button[data-v-f5743494]{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);width:28px;height:28px;color:var(--color-text-secondary);cursor:pointer;opacity:0;border-radius:.25em;justify-content:center;align-items:center;transition:opacity .15s;display:flex}.chart-menu-button[data-state=open][data-v-f5743494],.chart-close-button[data-v-f5743494]{opacity:1}.chart-menu-button[data-v-f5743494]:hover{background:var(--color-bg-1,#0000000d);color:var(--color-text)}.line-chart-wrapper:hover .chart-menu-button,.bar-chart-wrapper:hover .chart-menu-button,.choropleth-wrapper:hover .chart-menu-button,.line-chart-wrapper:focus-within .chart-menu-button,.bar-chart-wrapper:focus-within .chart-menu-button,.choropleth-wrapper:focus-within .chart-menu-button{opacity:1}.chart-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chart-menu-content{z-index:100;background:var(--color-bg-0);border:1px solid var(--color-border);border-radius:.25em;min-width:140px;padding:.25em;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.chart-menu-item{font-size:var(--font-size-sm);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;border-radius:.25em;outline:none;align-items:center;padding:.375em .5em;display:flex}.chart-menu-item[data-highlighted]{background:var(--color-primary);color:#fff}.line-chart-wrapper[data-v-0cf7b0c7]{width:100%;position:relative}.line-chart-tooltip-label[data-v-0cf7b0c7]{margin-bottom:.25em;font-weight:600}.line-chart-tooltip-row[data-v-0cf7b0c7]{align-items:center;gap:.375em;display:flex}.line-chart-download-link[data-v-0cf7b0c7]{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}.line-chart-tooltip-swatch[data-v-0cf7b0c7]{border-radius:50%;flex-shrink:0;width:.625em;height:.625em;display:inline-block}.line-chart-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.5em;padding:.5em 1em;display:inline-flex}.line-chart-download-button:hover{background:var(--color-bg-1,#0000000d)}.line-chart-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.bar-chart-wrapper[data-v-5f38ef02]{width:100%;position:relative}.bar-chart-tooltip-label[data-v-5f38ef02]{margin-bottom:.25em;font-weight:600}.bar-chart-tooltip-row[data-v-5f38ef02]{align-items:center;gap:.375em;display:flex}.bar-chart-download-link[data-v-5f38ef02]{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}.bar-chart-tooltip-swatch[data-v-5f38ef02]{border-radius:50%;flex-shrink:0;width:.625em;height:.625em;display:inline-block}.bar-chart-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.5em;padding:.5em 1em;display:inline-flex}.bar-chart-download-button:hover{background:var(--color-bg-1,#0000000d)}.bar-chart-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.choropleth-wrapper[data-v-7bd9e073]{--choropleth-legend-bg:var(--color-bg-0,#fff);width:100%;position:relative}.choropleth-wrapper svg[data-v-7bd9e073]{width:100%;height:auto;display:block}.choropleth-wrapper.pannable svg[data-v-7bd9e073]{cursor:grab}.choropleth-wrapper.is-fullscreen svg[data-v-7bd9e073]{flex:auto;width:100%;height:100%;min-height:0}.choropleth-wrapper.pannable svg[data-v-7bd9e073]:active{cursor:grabbing}.state-path[data-v-7bd9e073]{cursor:pointer}.choropleth-reset[data-v-7bd9e073]{font:inherit;color:var(--color-text-secondary,#555);background:var(--color-bg-0,#fff);border:1px solid var(--color-border,#e5e7eb);cursor:pointer;border-radius:4px;padding:4px 10px;font-size:12px;position:absolute;bottom:8px;left:8px;box-shadow:0 1px 2px #0000000d}.choropleth-reset[data-v-7bd9e073]:hover{background:var(--color-bg-1,#f8f9fa);color:var(--color-text,#212529)}.choropleth-header[data-v-7bd9e073]{background:var(--choropleth-legend-bg);color:currentColor;border-radius:4px;flex-direction:column;align-items:center;gap:10px;width:fit-content;margin:0 auto;padding:8px 14px;display:flex}.choropleth-title[data-v-7bd9e073]{white-space:pre-line;font-size:14px;font-weight:600;line-height:1.2}.choropleth-legend[data-v-7bd9e073]{align-items:center;gap:14px;font-size:13px;line-height:1.2;display:flex}.choropleth-legend-title[data-v-7bd9e073]{font-weight:600}.choropleth-legend-item[data-v-7bd9e073]{align-items:center;gap:6px;display:inline-flex}.choropleth-legend-swatch[data-v-7bd9e073]{border-radius:3px;width:12px;height:12px;display:inline-block}.choropleth-legend-continuous[data-v-7bd9e073]{flex-direction:column;width:160px;display:flex}.choropleth-legend-gradient[data-v-7bd9e073]{border-radius:2px;height:12px}.choropleth-legend-ticks[data-v-7bd9e073]{opacity:.7;height:14px;margin-top:4px;font-size:11px;position:relative}.choropleth-legend-ticks>span[data-v-7bd9e073]{position:absolute;transform:translate(-50%)}.chart-tooltip-anchor[data-v-44377f70]{pointer-events:none;width:1px;height:1px;position:absolute}.chart-tooltip-content{z-index:100;background:var(--color-bg-0,#fff);border:1px solid var(--color-border,#e5e7eb);font-size:var(--font-size-sm,.875rem);pointer-events:none;border-radius:.375em;padding:.5em .75em;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.TableOuter[data-v-21721f41]{display:inline-block;position:relative}.TableOuter.full-width[data-v-21721f41]{display:block}.TableWrapper[data-v-21721f41]{font-size:var(--font-size-sm);overflow-x:auto}.Table[data-v-21721f41]{border-collapse:collapse;font-variant-numeric:tabular-nums;border:1px solid var(--color-border);table-layout:fixed;margin:0;display:table}.Table.full-width[data-v-21721f41]{width:100%}.Table tr[data-v-21721f41],.Table th[data-v-21721f41],.Table td[data-v-21721f41]{background:0 0;border:none}.Table th[data-v-21721f41],.Table td[data-v-21721f41]{white-space:nowrap;text-overflow:ellipsis;text-align:left;padding:.75em 1.25em;overflow:hidden}.Table th.cell-wrap[data-v-21721f41],.Table td.cell-wrap[data-v-21721f41]{white-space:normal;text-overflow:clip;overflow:visible}.Table th[data-v-21721f41]{border-bottom:1px solid var(--color-border-header);font-weight:600;position:sticky;top:0}.Table tbody td[data-v-21721f41]{border-bottom:1px solid var(--color-border)}.Table tbody tr:last-child td[data-v-21721f41]{border-bottom:none}.TableOuter[data-v-21721f41] .chart-menu-trigger-area{top:4px;right:4px}.TableOuter[data-v-21721f41] .chart-menu-button{opacity:1}.TableOuter.has-menu .Table thead th[data-v-21721f41]:last-child{padding-right:2.5em}.data-table-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.75em;padding:.5em 1em;display:inline-flex}.data-table-download-button:hover{background:var(--color-bg-1,#0000000d)}.data-table-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.data-table-download-link{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}
1
+ .chart-menu-trigger-area[data-v-f5743494]{z-index:1;position:absolute;top:.5em;right:.5em}.chart-menu-trigger-area--expanded[data-v-f5743494]{top:1.25em;right:1.25em}.chart-menu-button[data-v-f5743494]{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);width:28px;height:28px;color:var(--color-text-secondary);cursor:pointer;opacity:0;border-radius:.25em;justify-content:center;align-items:center;transition:opacity .15s;display:flex}.chart-menu-button[data-state=open][data-v-f5743494],.chart-close-button[data-v-f5743494]{opacity:1}.chart-menu-button[data-v-f5743494]:hover{background:var(--color-bg-1,#0000000d);color:var(--color-text)}.line-chart-wrapper:hover .chart-menu-button,.bar-chart-wrapper:hover .chart-menu-button,.choropleth-wrapper:hover .chart-menu-button,.line-chart-wrapper:focus-within .chart-menu-button,.bar-chart-wrapper:focus-within .chart-menu-button,.choropleth-wrapper:focus-within .chart-menu-button{opacity:1}.chart-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chart-menu-content{z-index:100;background:var(--color-bg-0);border:1px solid var(--color-border);border-radius:.25em;min-width:140px;padding:.25em;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.chart-menu-item{font-size:var(--font-size-sm);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;border-radius:.25em;outline:none;align-items:center;padding:.375em .5em;display:flex}.chart-menu-item[data-highlighted]{background:var(--color-primary);color:#fff}.line-chart-wrapper[data-v-a3132bed]{width:100%;position:relative}.line-chart-tooltip-label[data-v-a3132bed]{margin-bottom:.25em;font-weight:600}.line-chart-tooltip-row[data-v-a3132bed]{align-items:center;gap:.375em;display:flex}.line-chart-download-link[data-v-a3132bed]{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}.line-chart-tooltip-swatch[data-v-a3132bed]{border-radius:50%;flex-shrink:0;width:.625em;height:.625em;display:inline-block}.line-chart-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.5em;padding:.5em 1em;display:inline-flex}.line-chart-download-button:hover{background:var(--color-bg-1,#0000000d)}.line-chart-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.bar-chart-wrapper[data-v-251f7945]{width:100%;position:relative}.bar-chart-tooltip-label[data-v-251f7945]{margin-bottom:.25em;font-weight:600}.bar-chart-tooltip-row[data-v-251f7945]{align-items:center;gap:.375em;display:flex}.bar-chart-download-link[data-v-251f7945]{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}.bar-chart-tooltip-swatch[data-v-251f7945]{border-radius:50%;flex-shrink:0;width:.625em;height:.625em;display:inline-block}.bar-chart-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.5em;padding:.5em 1em;display:inline-flex}.bar-chart-download-button:hover{background:var(--color-bg-1,#0000000d)}.bar-chart-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.choropleth-wrapper[data-v-7bd9e073]{--choropleth-legend-bg:var(--color-bg-0,#fff);width:100%;position:relative}.choropleth-wrapper svg[data-v-7bd9e073]{width:100%;height:auto;display:block}.choropleth-wrapper.pannable svg[data-v-7bd9e073]{cursor:grab}.choropleth-wrapper.is-fullscreen svg[data-v-7bd9e073]{flex:auto;width:100%;height:100%;min-height:0}.choropleth-wrapper.pannable svg[data-v-7bd9e073]:active{cursor:grabbing}.state-path[data-v-7bd9e073]{cursor:pointer}.choropleth-reset[data-v-7bd9e073]{font:inherit;color:var(--color-text-secondary,#555);background:var(--color-bg-0,#fff);border:1px solid var(--color-border,#e5e7eb);cursor:pointer;border-radius:4px;padding:4px 10px;font-size:12px;position:absolute;bottom:8px;left:8px;box-shadow:0 1px 2px #0000000d}.choropleth-reset[data-v-7bd9e073]:hover{background:var(--color-bg-1,#f8f9fa);color:var(--color-text,#212529)}.choropleth-header[data-v-7bd9e073]{background:var(--choropleth-legend-bg);color:currentColor;border-radius:4px;flex-direction:column;align-items:center;gap:10px;width:fit-content;margin:0 auto;padding:8px 14px;display:flex}.choropleth-title[data-v-7bd9e073]{white-space:pre-line;font-size:14px;font-weight:600;line-height:1.2}.choropleth-legend[data-v-7bd9e073]{align-items:center;gap:14px;font-size:13px;line-height:1.2;display:flex}.choropleth-legend-title[data-v-7bd9e073]{font-weight:600}.choropleth-legend-item[data-v-7bd9e073]{align-items:center;gap:6px;display:inline-flex}.choropleth-legend-swatch[data-v-7bd9e073]{border-radius:3px;width:12px;height:12px;display:inline-block}.choropleth-legend-continuous[data-v-7bd9e073]{flex-direction:column;width:160px;display:flex}.choropleth-legend-gradient[data-v-7bd9e073]{border-radius:2px;height:12px}.choropleth-legend-ticks[data-v-7bd9e073]{opacity:.7;height:14px;margin-top:4px;font-size:11px;position:relative}.choropleth-legend-ticks>span[data-v-7bd9e073]{position:absolute;transform:translate(-50%)}.chart-tooltip-anchor[data-v-44377f70]{pointer-events:none;width:1px;height:1px;position:absolute}.chart-tooltip-content{z-index:100;background:var(--color-bg-0,#fff);border:1px solid var(--color-border,#e5e7eb);font-size:var(--font-size-sm,.875rem);pointer-events:none;border-radius:.375em;padding:.5em .75em;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.TableOuter[data-v-21721f41]{display:inline-block;position:relative}.TableOuter.full-width[data-v-21721f41]{display:block}.TableWrapper[data-v-21721f41]{font-size:var(--font-size-sm);overflow-x:auto}.Table[data-v-21721f41]{border-collapse:collapse;font-variant-numeric:tabular-nums;border:1px solid var(--color-border);table-layout:fixed;margin:0;display:table}.Table.full-width[data-v-21721f41]{width:100%}.Table tr[data-v-21721f41],.Table th[data-v-21721f41],.Table td[data-v-21721f41]{background:0 0;border:none}.Table th[data-v-21721f41],.Table td[data-v-21721f41]{white-space:nowrap;text-overflow:ellipsis;text-align:left;padding:.75em 1.25em;overflow:hidden}.Table th.cell-wrap[data-v-21721f41],.Table td.cell-wrap[data-v-21721f41]{white-space:normal;text-overflow:clip;overflow:visible}.Table th[data-v-21721f41]{border-bottom:1px solid var(--color-border-header);font-weight:600;position:sticky;top:0}.Table tbody td[data-v-21721f41]{border-bottom:1px solid var(--color-border)}.Table tbody tr:last-child td[data-v-21721f41]{border-bottom:none}.TableOuter[data-v-21721f41] .chart-menu-trigger-area{top:4px;right:4px}.TableOuter[data-v-21721f41] .chart-menu-button{opacity:1}.TableOuter.has-menu .Table thead th[data-v-21721f41]:last-child{padding-right:2.5em}.data-table-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.75em;padding:.5em 1em;display:inline-flex}.data-table-download-button:hover{background:var(--color-bg-1,#0000000d)}.data-table-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.data-table-download-link{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}
2
2
  /*$vite$:1*/
package/dist/index.js CHANGED
@@ -1261,68 +1261,73 @@ function zt(e, t, n, r) {
1261
1261
  }
1262
1262
  //#endregion
1263
1263
  //#region src/LineChart/LineChart.vue?vue&type=script&setup=true&lang.ts
1264
- var Bt = ["role", "aria-label"], Vt = {
1264
+ var Bt = {
1265
1265
  class: "chart-sr-only",
1266
1266
  "aria-live": "polite"
1267
- }, Ht = ["width", "height"], Ut = [
1267
+ }, Vt = [
1268
+ "width",
1269
+ "height",
1270
+ "role",
1271
+ "aria-label"
1272
+ ], Ht = [
1268
1273
  "x",
1269
1274
  "y",
1270
1275
  "text-anchor",
1271
1276
  "font-size",
1272
1277
  "font-weight",
1273
1278
  "fill"
1274
- ], Wt = ["x", "dy"], Gt = { key: 1 }, Kt = [
1279
+ ], Ut = ["x", "dy"], Wt = { key: 1 }, Gt = [
1275
1280
  "x1",
1276
1281
  "y1",
1277
1282
  "x2",
1278
1283
  "y2",
1279
1284
  "stroke",
1280
1285
  "stroke-dasharray"
1281
- ], qt = [
1286
+ ], Kt = [
1282
1287
  "cx",
1283
1288
  "cy",
1284
1289
  "fill",
1285
1290
  "fill-opacity",
1286
1291
  "stroke"
1287
- ], Jt = [
1292
+ ], qt = [
1288
1293
  "x",
1289
1294
  "y",
1290
1295
  "font-size",
1291
1296
  "fill",
1292
1297
  "font-weight"
1293
- ], Yt = [
1298
+ ], Jt = [
1294
1299
  "x1",
1295
1300
  "y1",
1296
1301
  "x2",
1297
1302
  "y2"
1298
- ], Xt = [
1303
+ ], Yt = [
1299
1304
  "x1",
1300
1305
  "y1",
1301
1306
  "x2",
1302
1307
  "y2"
1303
- ], Zt = [
1308
+ ], Xt = [
1304
1309
  "x1",
1305
1310
  "y1",
1306
1311
  "x2",
1307
1312
  "y2"
1308
- ], Qt = [
1313
+ ], Zt = [
1309
1314
  "x1",
1310
1315
  "y1",
1311
1316
  "x2",
1312
1317
  "y2"
1313
- ], $t = [
1318
+ ], Qt = [
1314
1319
  "x",
1315
1320
  "y",
1316
1321
  "font-size",
1317
1322
  "fill",
1318
1323
  "font-weight",
1319
1324
  "fill-opacity"
1320
- ], en = [
1325
+ ], $t = [
1321
1326
  "transform",
1322
1327
  "font-size",
1323
1328
  "fill",
1324
1329
  "font-weight"
1325
- ], tn = [
1330
+ ], en = [
1326
1331
  "x",
1327
1332
  "y",
1328
1333
  "text-anchor",
@@ -1330,43 +1335,43 @@ var Bt = ["role", "aria-label"], Vt = {
1330
1335
  "fill",
1331
1336
  "font-weight",
1332
1337
  "fill-opacity"
1333
- ], nn = [
1338
+ ], tn = [
1334
1339
  "x",
1335
1340
  "y",
1336
1341
  "font-size",
1337
1342
  "fill",
1338
1343
  "font-weight"
1339
- ], rn = [
1344
+ ], nn = [
1340
1345
  "d",
1341
1346
  "fill",
1342
1347
  "fill-opacity"
1343
- ], an = [
1348
+ ], rn = [
1344
1349
  "d",
1345
1350
  "stroke",
1346
1351
  "stroke-width"
1347
- ], on = [
1352
+ ], an = [
1348
1353
  "d",
1349
1354
  "stroke",
1350
1355
  "stroke-width",
1351
1356
  "stroke-opacity",
1352
1357
  "stroke-dasharray"
1353
- ], sn = [
1358
+ ], on = [
1354
1359
  "cx",
1355
1360
  "cy",
1356
1361
  "r",
1357
1362
  "fill",
1358
1363
  "fill-opacity",
1359
1364
  "stroke"
1360
- ], cn = [
1365
+ ], sn = [
1361
1366
  "d",
1362
1367
  "fill",
1363
1368
  "fill-opacity"
1364
- ], ln = [
1369
+ ], cn = [
1365
1370
  "d",
1366
1371
  "stroke",
1367
1372
  "stroke-width",
1368
1373
  "stroke-dasharray"
1369
- ], un = [
1374
+ ], ln = [
1370
1375
  "x1",
1371
1376
  "y1",
1372
1377
  "x2",
@@ -1374,7 +1379,7 @@ var Bt = ["role", "aria-label"], Vt = {
1374
1379
  "stroke",
1375
1380
  "stroke-width",
1376
1381
  "stroke-dasharray"
1377
- ], dn = [
1382
+ ], un = [
1378
1383
  "x1",
1379
1384
  "y1",
1380
1385
  "x2",
@@ -1382,53 +1387,53 @@ var Bt = ["role", "aria-label"], Vt = {
1382
1387
  "stroke",
1383
1388
  "stroke-width",
1384
1389
  "stroke-dasharray"
1385
- ], fn = [
1390
+ ], dn = [
1386
1391
  "x1",
1387
1392
  "y1",
1388
1393
  "x2",
1389
1394
  "y2"
1390
- ], pn = [
1395
+ ], fn = [
1391
1396
  "x1",
1392
1397
  "y1",
1393
1398
  "x2",
1394
1399
  "y2"
1395
- ], mn = [
1400
+ ], pn = [
1396
1401
  "x1",
1397
1402
  "y1",
1398
1403
  "x2",
1399
1404
  "y2"
1400
- ], hn = [
1405
+ ], mn = [
1401
1406
  "cx",
1402
1407
  "cy",
1403
1408
  "fill"
1404
- ], gn = [
1409
+ ], hn = [
1405
1410
  "x",
1406
1411
  "y",
1407
1412
  "width",
1408
1413
  "height"
1409
- ], _n = [
1414
+ ], gn = [
1410
1415
  "cx",
1411
1416
  "cy",
1412
1417
  "fill",
1413
1418
  "fill-opacity",
1414
1419
  "stroke"
1415
- ], vn = [
1420
+ ], _n = [
1416
1421
  "x",
1417
1422
  "y",
1418
1423
  "font-size",
1419
1424
  "font-weight",
1420
1425
  "fill"
1421
- ], yn = [
1426
+ ], vn = [
1422
1427
  "x",
1423
1428
  "y",
1424
1429
  "font-size",
1425
1430
  "font-weight",
1426
1431
  "fill",
1427
1432
  "fill-opacity"
1428
- ], bn = { class: "line-chart-tooltip" }, xn = {
1433
+ ], yn = { class: "line-chart-tooltip" }, bn = {
1429
1434
  key: 0,
1430
1435
  class: "line-chart-tooltip-label"
1431
- }, Sn = ["href", "download"], Cn = 36, wn = 12, Tn = 7, En = 16, Dn = /* @__PURE__ */ L(/* @__PURE__ */ l({
1436
+ }, xn = ["href", "download"], Sn = 36, Cn = 12, wn = 7, Tn = 16, En = /* @__PURE__ */ L(/* @__PURE__ */ l({
1432
1437
  inheritAttrs: !1,
1433
1438
  __name: "LineChart",
1434
1439
  props: {
@@ -1480,7 +1485,7 @@ var Bt = ["role", "aria-label"], Vt = {
1480
1485
  },
1481
1486
  emits: ["hover"],
1482
1487
  setup(c, { emit: l }) {
1483
- let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "figure" : void 0)), v = l, S = [];
1488
+ let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "img" : void 0)), v = l, S = [];
1484
1489
  function* te(e) {
1485
1490
  if (e.x && e.x.length > 0 && (yield e.x), e.series) for (let t of e.series) t.x && t.x.length > 0 && (yield t.x);
1486
1491
  if (e.areas) for (let t of e.areas) t.x && t.x.length > 0 && (yield t.x);
@@ -1652,7 +1657,7 @@ var Bt = ["role", "aria-label"], Vt = {
1652
1657
  let t = [], n = U.value.left + G.value;
1653
1658
  for (let r of e) {
1654
1659
  if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
1655
- let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * Tn, o = I(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : k.value[r.seriesIndex]?.color ?? "currentColor"), u = V({
1660
+ let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * wn, o = I(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : k.value[r.seriesIndex]?.color ?? "currentColor"), u = V({
1656
1661
  color: l,
1657
1662
  fontWeight: 600,
1658
1663
  ...r.inlineLabelStyle
@@ -1676,7 +1681,7 @@ var Bt = ["role", "aria-label"], Vt = {
1676
1681
  let r = [];
1677
1682
  for (let e of t) {
1678
1683
  let t = e.cx - e.textWidth / 2, n = 0;
1679
- for (; n < r.length && !(t >= r[n] + En);) n++;
1684
+ for (; n < r.length && !(t >= r[n] + Tn);) n++;
1680
1685
  e.row = n;
1681
1686
  let i = e.cx + e.textWidth / 2;
1682
1687
  r[n] = Math.max(r[n] ?? -Infinity, i);
@@ -1686,7 +1691,7 @@ var Bt = ["role", "aria-label"], Vt = {
1686
1691
  extraHeight: 0
1687
1692
  } : {
1688
1693
  labels: t,
1689
- extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Cn + wn
1694
+ extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * Sn + Cn
1690
1695
  };
1691
1696
  }), fe = n(() => {
1692
1697
  let e = [];
@@ -1708,7 +1713,7 @@ var Bt = ["role", "aria-label"], Vt = {
1708
1713
  });
1709
1714
  }
1710
1715
  return e;
1711
- }), L = n(() => fe.value.map((e) => e.label)), me = n(() => Pe.value + de.value.extraHeight), he = n(() => U.value.top + K.value + U.value.bottom + wn), z = n(() => {
1716
+ }), L = n(() => fe.value.map((e) => e.label)), me = n(() => Pe.value + de.value.extraHeight), he = n(() => U.value.top + K.value + U.value.bottom + Cn), z = n(() => {
1712
1717
  let { min: e, max: t } = oe.value, n = (e) => f.yTickFormat === void 0 ? B(e) : ne(e, f.yTickFormat);
1713
1718
  return e === t ? [{
1714
1719
  value: n(e),
@@ -1890,9 +1895,7 @@ var Bt = ["role", "aria-label"], Vt = {
1890
1895
  ref: Me
1891
1896
  }, n.$attrs, {
1892
1897
  class: ["line-chart-wrapper", { "is-fullscreen": C(Je) }],
1893
- style: C(Ye),
1894
- role: g.value || void 0,
1895
- "aria-label": h.value || void 0
1898
+ style: C(Ye)
1896
1899
  }), [
1897
1900
  c.menu ? (_(), r(pe, {
1898
1901
  key: 0,
@@ -1904,12 +1907,14 @@ var Bt = ["role", "aria-label"], Vt = {
1904
1907
  "is-fullscreen",
1905
1908
  "onClose"
1906
1909
  ])) : i("", !0),
1907
- o("div", Vt, x(C(Je) ? "Chart expanded to fill window" : ""), 1),
1910
+ o("div", Bt, x(C(Je) ? "Chart expanded to fill window" : ""), 1),
1908
1911
  (_(), a("svg", {
1909
1912
  ref_key: "svgRef",
1910
1913
  ref: H,
1911
1914
  width: C(Ne),
1912
- height: me.value
1915
+ height: me.value,
1916
+ role: g.value || void 0,
1917
+ "aria-label": h.value || void 0
1913
1918
  }, [
1914
1919
  c.title ? (_(), a("text", {
1915
1920
  key: 0,
@@ -1923,8 +1928,8 @@ var Bt = ["role", "aria-label"], Vt = {
1923
1928
  key: t,
1924
1929
  x: X.value.x,
1925
1930
  dy: t === 0 ? 0 : X.value.lineHeight
1926
- }, x(e), 9, Wt))), 128))], 8, Ut)) : i("", !0),
1927
- Z.value.length > 0 ? (_(), a("g", Gt, [(_(!0), a(e, null, y(Z.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
1931
+ }, x(e), 9, Ut))), 128))], 8, Ht)) : i("", !0),
1932
+ Z.value.length > 0 ? (_(), a("g", Wt, [(_(!0), a(e, null, y(Z.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
1928
1933
  key: 0,
1929
1934
  x1: t.x,
1930
1935
  y1: t.y,
@@ -1933,7 +1938,7 @@ var Bt = ["role", "aria-label"], Vt = {
1933
1938
  stroke: t.color,
1934
1939
  "stroke-width": "2",
1935
1940
  "stroke-dasharray": t.dashed ? "4 2" : void 0
1936
- }, null, 8, Kt)) : (_(), a("circle", {
1941
+ }, null, 8, Gt)) : (_(), a("circle", {
1937
1942
  key: 1,
1938
1943
  cx: t.x + 4,
1939
1944
  cy: t.y,
@@ -1942,13 +1947,13 @@ var Bt = ["role", "aria-label"], Vt = {
1942
1947
  "fill-opacity": t.fillOpacity,
1943
1948
  stroke: t.color,
1944
1949
  "stroke-width": "1.5"
1945
- }, null, 8, qt)), o("text", {
1950
+ }, null, 8, Kt)), o("text", {
1946
1951
  x: t.x + 18,
1947
1952
  y: t.y + 4,
1948
1953
  "font-size": Ze.value.fontSize,
1949
1954
  fill: Ze.value.fill,
1950
1955
  "font-weight": Ze.value.fontWeight
1951
- }, x(t.label), 9, Jt)], 64))), 128))])) : i("", !0),
1956
+ }, x(t.label), 9, qt)], 64))), 128))])) : i("", !0),
1952
1957
  o("line", {
1953
1958
  x1: C(R)(C(U).left),
1954
1959
  y1: C(R)(C(U).top),
@@ -1956,7 +1961,7 @@ var Bt = ["role", "aria-label"], Vt = {
1956
1961
  y2: C(R)(C(U).top + C(K)),
1957
1962
  stroke: "currentColor",
1958
1963
  "stroke-opacity": "0.3"
1959
- }, null, 8, Yt),
1964
+ }, null, 8, Jt),
1960
1965
  o("line", {
1961
1966
  x1: C(R)(C(U).left),
1962
1967
  y1: C(R)(C(U).top + C(K)),
@@ -1964,7 +1969,7 @@ var Bt = ["role", "aria-label"], Vt = {
1964
1969
  y2: C(R)(C(U).top + C(K)),
1965
1970
  stroke: "currentColor",
1966
1971
  "stroke-opacity": "0.3"
1967
- }, null, 8, Xt),
1972
+ }, null, 8, Yt),
1968
1973
  c.yGrid ? (_(!0), a(e, { key: 2 }, y(z.value, (e, t) => (_(), a("line", {
1969
1974
  key: "yg" + t,
1970
1975
  x1: C(U).left,
@@ -1973,7 +1978,7 @@ var Bt = ["role", "aria-label"], Vt = {
1973
1978
  y2: e.y,
1974
1979
  stroke: "currentColor",
1975
1980
  "stroke-opacity": "0.1"
1976
- }, null, 8, Zt))), 128)) : i("", !0),
1981
+ }, null, 8, Xt))), 128)) : i("", !0),
1977
1982
  c.xGrid ? (_(!0), a(e, { key: 3 }, y(Se.value, (e, t) => (_(), a("line", {
1978
1983
  key: "xg" + t,
1979
1984
  x1: e.x,
@@ -1982,7 +1987,7 @@ var Bt = ["role", "aria-label"], Vt = {
1982
1987
  y2: C(U).top + C(K),
1983
1988
  stroke: "currentColor",
1984
1989
  "stroke-opacity": "0.1"
1985
- }, null, 8, Qt))), 128)) : i("", !0),
1990
+ }, null, 8, Zt))), 128)) : i("", !0),
1986
1991
  (_(!0), a(e, null, y(z.value, (e, t) => (_(), a("text", {
1987
1992
  key: "y" + t,
1988
1993
  "data-testid": "y-tick",
@@ -1994,7 +1999,7 @@ var Bt = ["role", "aria-label"], Vt = {
1994
1999
  fill: Y.value.fill,
1995
2000
  "font-weight": Y.value.fontWeight,
1996
2001
  "fill-opacity": Y.value.fillOpacity
1997
- }, x(e.value), 9, $t))), 128)),
2002
+ }, x(e.value), 9, Qt))), 128)),
1998
2003
  c.yLabel ? (_(), a("text", {
1999
2004
  key: 4,
2000
2005
  x: 0,
@@ -2004,7 +2009,7 @@ var Bt = ["role", "aria-label"], Vt = {
2004
2009
  "font-size": J.value.fontSize,
2005
2010
  fill: J.value.fill,
2006
2011
  "font-weight": J.value.fontWeight
2007
- }, x(c.yLabel), 9, en)) : i("", !0),
2012
+ }, x(c.yLabel), 9, $t)) : i("", !0),
2008
2013
  (_(!0), a(e, null, y(Se.value, (e, t) => (_(), a("text", {
2009
2014
  key: "x" + t,
2010
2015
  "data-testid": "x-tick",
@@ -2015,7 +2020,7 @@ var Bt = ["role", "aria-label"], Vt = {
2015
2020
  fill: Y.value.fill,
2016
2021
  "font-weight": Y.value.fontWeight,
2017
2022
  "fill-opacity": Y.value.fillOpacity
2018
- }, x(e.value), 9, tn))), 128)),
2023
+ }, x(e.value), 9, en))), 128)),
2019
2024
  c.xLabel ? (_(), a("text", {
2020
2025
  key: 5,
2021
2026
  x: C(U).left + C(G) / 2,
@@ -2024,7 +2029,7 @@ var Bt = ["role", "aria-label"], Vt = {
2024
2029
  "font-size": J.value.fontSize,
2025
2030
  fill: J.value.fill,
2026
2031
  "font-weight": J.value.fontWeight
2027
- }, x(c.xLabel), 9, nn)) : i("", !0),
2032
+ }, x(c.xLabel), 9, tn)) : i("", !0),
2028
2033
  (_(!0), a(e, null, y(A.value, (e, t) => (_(), a("path", {
2029
2034
  key: "area" + t,
2030
2035
  d: le(e),
@@ -2032,7 +2037,7 @@ var Bt = ["role", "aria-label"], Vt = {
2032
2037
  "fill-opacity": e.opacity ?? .2,
2033
2038
  stroke: "none",
2034
2039
  style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
2035
- }, null, 12, rn))), 128)),
2040
+ }, null, 12, nn))), 128)),
2036
2041
  (_(!0), a(e, null, y(k.value, (t, n) => (_(), a(e, { key: n }, [
2037
2042
  t.line !== !1 && t.outline ? (_(), a("path", {
2038
2043
  key: 0,
@@ -2043,7 +2048,7 @@ var Bt = ["role", "aria-label"], Vt = {
2043
2048
  "stroke-linecap": "round",
2044
2049
  "stroke-linejoin": "round",
2045
2050
  "data-testid": "line-outline"
2046
- }, null, 8, an)) : i("", !0),
2051
+ }, null, 8, rn)) : i("", !0),
2047
2052
  t.line === !1 ? i("", !0) : (_(), a("path", {
2048
2053
  key: 1,
2049
2054
  d: se(t),
@@ -2053,7 +2058,7 @@ var Bt = ["role", "aria-label"], Vt = {
2053
2058
  "stroke-opacity": t.lineOpacity ?? t.opacity ?? c.lineOpacity,
2054
2059
  "stroke-dasharray": t.dashed ? "6 3" : void 0,
2055
2060
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2056
- }, null, 12, on)),
2061
+ }, null, 12, an)),
2057
2062
  t.dots ? (_(!0), a(e, { key: 2 }, y(ce(t), (e, n) => (_(), a("circle", {
2058
2063
  key: n,
2059
2064
  cx: e.x,
@@ -2063,7 +2068,7 @@ var Bt = ["role", "aria-label"], Vt = {
2063
2068
  "fill-opacity": t.dotOpacity ?? t.opacity ?? c.lineOpacity,
2064
2069
  stroke: t.dotStroke ?? "none",
2065
2070
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
2066
- }, null, 12, sn))), 128)) : i("", !0)
2071
+ }, null, 12, on))), 128)) : i("", !0)
2067
2072
  ], 64))), 128)),
2068
2073
  (_(!0), a(e, null, y(c.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
2069
2074
  o("path", {
@@ -2071,7 +2076,7 @@ var Bt = ["role", "aria-label"], Vt = {
2071
2076
  fill: t.color ?? (t.seriesIndex == null ? "#999" : k.value[t.seriesIndex]?.color ?? "currentColor"),
2072
2077
  "fill-opacity": t.opacity ?? .15,
2073
2078
  stroke: "none"
2074
- }, null, 8, cn),
2079
+ }, null, 8, sn),
2075
2080
  t.seriesIndex == null ? i("", !0) : (_(), a("path", {
2076
2081
  key: 0,
2077
2082
  d: ue(t, !1),
@@ -2079,7 +2084,7 @@ var Bt = ["role", "aria-label"], Vt = {
2079
2084
  stroke: t.color ?? k.value[t.seriesIndex]?.color ?? "currentColor",
2080
2085
  "stroke-width": t.strokeWidth ?? 2,
2081
2086
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2082
- }, null, 8, ln)),
2087
+ }, null, 8, cn)),
2083
2088
  t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
2084
2089
  x1: C(R)(I(t, "start")),
2085
2090
  y1: C(U).top,
@@ -2088,7 +2093,7 @@ var Bt = ["role", "aria-label"], Vt = {
2088
2093
  stroke: t.color ?? "#999",
2089
2094
  "stroke-width": t.strokeWidth ?? 2,
2090
2095
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2091
- }, null, 8, un), o("line", {
2096
+ }, null, 8, ln), o("line", {
2092
2097
  x1: C(R)(I(t, "end")),
2093
2098
  y1: C(U).top,
2094
2099
  x2: C(R)(I(t, "end")),
@@ -2096,7 +2101,7 @@ var Bt = ["role", "aria-label"], Vt = {
2096
2101
  stroke: t.color ?? "#999",
2097
2102
  "stroke-width": t.strokeWidth ?? 2,
2098
2103
  "stroke-dasharray": t.dashed ? "6 3" : void 0
2099
- }, null, 8, dn)], 64)) : i("", !0),
2104
+ }, null, 8, un)], 64)) : i("", !0),
2100
2105
  o("line", {
2101
2106
  x1: C(R)(I(t, "start")),
2102
2107
  y1: C(U).top + C(K) - 4,
@@ -2104,7 +2109,7 @@ var Bt = ["role", "aria-label"], Vt = {
2104
2109
  y2: C(U).top + C(K) + 4,
2105
2110
  stroke: "currentColor",
2106
2111
  "stroke-opacity": "0.4"
2107
- }, null, 8, fn),
2112
+ }, null, 8, dn),
2108
2113
  o("line", {
2109
2114
  x1: C(R)(I(t, "end")),
2110
2115
  y1: C(U).top + C(K) - 4,
@@ -2112,7 +2117,7 @@ var Bt = ["role", "aria-label"], Vt = {
2112
2117
  y2: C(U).top + C(K) + 4,
2113
2118
  stroke: "currentColor",
2114
2119
  "stroke-opacity": "0.4"
2115
- }, null, 8, pn)
2120
+ }, null, 8, fn)
2116
2121
  ], 64))), 128)),
2117
2122
  we.value && C(Le) !== null ? (_(), a("line", {
2118
2123
  key: 6,
@@ -2124,7 +2129,7 @@ var Bt = ["role", "aria-label"], Vt = {
2124
2129
  "stroke-opacity": "0.3",
2125
2130
  "stroke-dasharray": "4 2",
2126
2131
  "pointer-events": "none"
2127
- }, null, 8, mn)) : i("", !0),
2132
+ }, null, 8, pn)) : i("", !0),
2128
2133
  (_(!0), a(e, null, y(Oe.value, (e, t) => (_(), a("circle", {
2129
2134
  key: "hd" + t,
2130
2135
  cx: e.x,
@@ -2134,7 +2139,7 @@ var Bt = ["role", "aria-label"], Vt = {
2134
2139
  stroke: "var(--color-bg-0, #fff)",
2135
2140
  "stroke-width": "2",
2136
2141
  "pointer-events": "none"
2137
- }, null, 8, hn))), 128)),
2142
+ }, null, 8, mn))), 128)),
2138
2143
  we.value ? (_(), a("rect", d({
2139
2144
  key: 7,
2140
2145
  x: C(U).left,
@@ -2146,7 +2151,7 @@ var Bt = ["role", "aria-label"], Vt = {
2146
2151
  cursor: "crosshair",
2147
2152
  "touch-action": "pan-y"
2148
2153
  }
2149
- }, ee(C(Be), !0)), null, 16, gn)) : i("", !0),
2154
+ }, ee(C(Be), !0)), null, 16, hn)) : i("", !0),
2150
2155
  c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
2151
2156
  key: 8,
2152
2157
  annotations: c.annotations,
@@ -2156,32 +2161,32 @@ var Bt = ["role", "aria-label"], Vt = {
2156
2161
  (_(!0), a(e, null, y(de.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
2157
2162
  o("circle", {
2158
2163
  cx: e.cx - e.textWidth / 2 - 2,
2159
- cy: he.value + e.row * Cn + 4,
2164
+ cy: he.value + e.row * Sn + 4,
2160
2165
  r: "4",
2161
2166
  fill: e.color,
2162
2167
  "fill-opacity": e.fillOpacity,
2163
2168
  stroke: e.color,
2164
2169
  "stroke-width": "1.5"
2165
- }, null, 8, _n),
2170
+ }, null, 8, gn),
2166
2171
  e.labelText ? (_(), a("text", {
2167
2172
  key: 0,
2168
2173
  x: e.cx - e.textWidth / 2 + 8,
2169
- y: he.value + e.row * Cn + 8,
2174
+ y: he.value + e.row * Sn + 8,
2170
2175
  "font-size": e.labelStyle.fontSize,
2171
2176
  "font-weight": e.labelStyle.fontWeight,
2172
2177
  fill: e.labelStyle.fill
2173
- }, x(e.labelText), 9, vn)) : i("", !0),
2178
+ }, x(e.labelText), 9, _n)) : i("", !0),
2174
2179
  e.descText ? (_(), a("text", {
2175
2180
  key: 1,
2176
2181
  x: e.cx - e.textWidth / 2 + 8,
2177
- y: he.value + e.row * Cn + 22,
2182
+ y: he.value + e.row * Sn + 22,
2178
2183
  "font-size": e.descStyle.fontSize,
2179
2184
  "font-weight": e.descStyle.fontWeight,
2180
2185
  fill: e.descStyle.fill,
2181
2186
  "fill-opacity": e.descStyle.fillOpacity
2182
- }, x(e.descText), 9, yn)) : i("", !0)
2187
+ }, x(e.descText), 9, vn)) : i("", !0)
2183
2188
  ]))), 128))
2184
- ], 8, Ht)),
2189
+ ], 8, Vt)),
2185
2190
  we.value && C(Le) !== null && ke.value ? (_(), a("div", {
2186
2191
  key: 1,
2187
2192
  ref_key: "tooltipRef",
@@ -2195,7 +2200,7 @@ var Bt = ["role", "aria-label"], Vt = {
2195
2200
  transform: C(ze) ? `translate3d(${C(ze).left}px, ${C(ze).top}px, 0) translateY(-50%)` : "translateY(-50%)",
2196
2201
  visibility: C(ze) ? "visible" : "hidden"
2197
2202
  })
2198
- }, [b(n.$slots, "tooltip", p(u(ke.value)), () => [o("div", bn, [ke.value.xLabel ? (_(), a("div", xn, x(ke.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(ke.value.values, (e) => (_(), a("div", {
2203
+ }, [b(n.$slots, "tooltip", p(u(ke.value)), () => [o("div", yn, [ke.value.xLabel ? (_(), a("div", bn, x(ke.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(ke.value.values, (e) => (_(), a("div", {
2199
2204
  key: e.seriesIndex,
2200
2205
  class: "line-chart-tooltip-row"
2201
2206
  }, [o("span", {
@@ -2207,89 +2212,94 @@ var Bt = ["role", "aria-label"], Vt = {
2207
2212
  class: "line-chart-download-link",
2208
2213
  href: C(We),
2209
2214
  download: `${C(qe)()}.csv`
2210
- }, x(C(Ue)), 9, Sn)) : i("", !0),
2215
+ }, x(C(Ue)), 9, xn)) : i("", !0),
2211
2216
  C(Ge) ? (_(), a("button", {
2212
2217
  key: 3,
2213
2218
  type: "button",
2214
2219
  class: "line-chart-download-button",
2215
2220
  onClick: l[0] ||= (...e) => C(Ke) && C(Ke)(...e)
2216
2221
  }, x(C(Ge)), 1)) : i("", !0)
2217
- ], 16, Bt)], 8, ["to", "disabled"]));
2222
+ ], 16)], 8, ["to", "disabled"]));
2218
2223
  }
2219
- }), [["__scopeId", "data-v-0cf7b0c7"]]), On = ["role", "aria-label"], kn = {
2224
+ }), [["__scopeId", "data-v-a3132bed"]]), Dn = {
2220
2225
  class: "chart-sr-only",
2221
2226
  "aria-live": "polite"
2222
- }, An = ["width", "height"], jn = [
2227
+ }, On = [
2228
+ "width",
2229
+ "height",
2230
+ "role",
2231
+ "aria-label"
2232
+ ], kn = [
2223
2233
  "x",
2224
2234
  "y",
2225
2235
  "text-anchor",
2226
2236
  "font-size",
2227
2237
  "font-weight",
2228
2238
  "fill"
2229
- ], Mn = ["x", "dy"], Nn = [
2239
+ ], An = ["x", "dy"], jn = [
2230
2240
  "data-testid",
2231
2241
  "x",
2232
2242
  "y",
2233
2243
  "text-anchor",
2234
2244
  "font-size",
2235
2245
  "fill"
2236
- ], Pn = { key: 1 }, Fn = [
2246
+ ], Mn = { key: 1 }, Nn = [
2237
2247
  "x",
2238
2248
  "y",
2239
2249
  "fill"
2240
- ], In = [
2250
+ ], Pn = [
2241
2251
  "x1",
2242
2252
  "y1",
2243
2253
  "x2",
2244
2254
  "y2",
2245
2255
  "stroke",
2246
2256
  "stroke-dasharray"
2247
- ], Ln = [
2257
+ ], Fn = [
2248
2258
  "x",
2249
2259
  "y",
2250
2260
  "font-size",
2251
2261
  "fill",
2252
2262
  "font-weight"
2253
- ], Rn = [
2263
+ ], In = [
2254
2264
  "x1",
2255
2265
  "y1",
2256
2266
  "x2",
2257
2267
  "y2"
2258
- ], zn = [
2268
+ ], Ln = [
2259
2269
  "x1",
2260
2270
  "y1",
2261
2271
  "x2",
2262
2272
  "y2"
2263
- ], Bn = [
2273
+ ], Rn = [
2264
2274
  "x1",
2265
2275
  "y1",
2266
2276
  "x2",
2267
2277
  "y2"
2268
- ], Vn = [
2278
+ ], zn = [
2269
2279
  "x",
2270
2280
  "y",
2271
2281
  "width",
2272
2282
  "height"
2273
- ], Hn = [
2283
+ ], Bn = [
2274
2284
  "x",
2275
2285
  "y",
2276
2286
  "font-size",
2277
2287
  "fill",
2278
2288
  "font-weight",
2279
2289
  "fill-opacity"
2280
- ], Un = [
2290
+ ], Vn = [
2281
2291
  "x",
2282
2292
  "y",
2283
2293
  "font-size",
2284
2294
  "fill",
2285
2295
  "font-weight",
2286
2296
  "fill-opacity"
2287
- ], Wn = [
2297
+ ], Hn = [
2288
2298
  "transform",
2289
2299
  "font-size",
2290
2300
  "fill",
2291
2301
  "font-weight"
2292
- ], Gn = [
2302
+ ], Un = [
2293
2303
  "x",
2294
2304
  "y",
2295
2305
  "text-anchor",
@@ -2297,7 +2307,7 @@ var Bt = ["role", "aria-label"], Vt = {
2297
2307
  "fill",
2298
2308
  "font-weight",
2299
2309
  "fill-opacity"
2300
- ], Kn = [
2310
+ ], Wn = [
2301
2311
  "x",
2302
2312
  "y",
2303
2313
  "text-anchor",
@@ -2305,13 +2315,13 @@ var Bt = ["role", "aria-label"], Vt = {
2305
2315
  "fill",
2306
2316
  "font-weight",
2307
2317
  "fill-opacity"
2308
- ], qn = [
2318
+ ], Gn = [
2309
2319
  "x",
2310
2320
  "y",
2311
2321
  "font-size",
2312
2322
  "fill",
2313
2323
  "font-weight"
2314
- ], Jn = [
2324
+ ], Kn = [
2315
2325
  "data-category",
2316
2326
  "data-series",
2317
2327
  "x",
@@ -2320,34 +2330,34 @@ var Bt = ["role", "aria-label"], Vt = {
2320
2330
  "height",
2321
2331
  "fill",
2322
2332
  "fill-opacity"
2323
- ], Yn = [
2333
+ ], qn = [
2324
2334
  "x",
2325
2335
  "y",
2326
2336
  "text-anchor",
2327
2337
  "font-size",
2328
2338
  "font-weight",
2329
2339
  "fill"
2330
- ], Xn = [
2340
+ ], Jn = [
2331
2341
  "d",
2332
2342
  "stroke",
2333
2343
  "stroke-width",
2334
2344
  "stroke-opacity",
2335
2345
  "stroke-dasharray"
2336
- ], Zn = [
2346
+ ], Yn = [
2337
2347
  "cx",
2338
2348
  "cy",
2339
2349
  "r",
2340
2350
  "fill",
2341
2351
  "fill-opacity"
2342
- ], Qn = [
2352
+ ], Xn = [
2343
2353
  "x",
2344
2354
  "y",
2345
2355
  "width",
2346
2356
  "height"
2347
- ], $n = { class: "bar-chart-tooltip" }, er = {
2357
+ ], Zn = { class: "bar-chart-tooltip" }, Qn = {
2348
2358
  key: 0,
2349
2359
  class: "bar-chart-tooltip-label"
2350
- }, tr = ["href", "download"], nr = 22, rr = 2, ir = 11, ar = .6, or = 4, sr = 4, cr = /* @__PURE__ */ L(/* @__PURE__ */ l({
2360
+ }, $n = ["href", "download"], er = 22, tr = 2, nr = 11, rr = .6, ir = 4, ar = 4, or = /* @__PURE__ */ L(/* @__PURE__ */ l({
2351
2361
  inheritAttrs: !1,
2352
2362
  __name: "BarChart",
2353
2363
  props: {
@@ -2408,7 +2418,7 @@ var Bt = ["role", "aria-label"], Vt = {
2408
2418
  },
2409
2419
  emits: ["hover"],
2410
2420
  setup(c, { emit: l }) {
2411
- let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "figure" : void 0)), v = l, S = [];
2421
+ let f = c, h = n(() => f.ariaLabel ?? f.title), g = n(() => f.role ?? (h.value ? "img" : void 0)), v = l, S = [];
2412
2422
  function te(e) {
2413
2423
  return {
2414
2424
  data: e.y ?? e.data ?? S,
@@ -2719,7 +2729,7 @@ var Bt = ["role", "aria-label"], Vt = {
2719
2729
  return Math.max(0, Math.min(r - 1, Math.floor(i / j.value)));
2720
2730
  }
2721
2731
  let De = n(() => !!(f.categoryHeader || f.valueHeader)), Oe = n(() => {
2722
- let e = De.value ? nr : 0, t = f.chartPadding;
2732
+ let e = De.value ? er : 0, t = f.chartPadding;
2723
2733
  return e ? t == null ? { top: e } : typeof t == "number" ? {
2724
2734
  top: t + e,
2725
2735
  right: t,
@@ -2754,7 +2764,7 @@ var Bt = ["role", "aria-label"], Vt = {
2754
2764
  }), Ye = n(() => V(f.axisLabelStyle, { fontSize: 13 })), q = n(() => V(f.tickLabelStyle, {
2755
2765
  fontSize: 10,
2756
2766
  fillOpacity: xe
2757
- })), Xe = n(() => V(f.legendStyle, { fontSize: 11 })), J = n(() => f.categoryAlign === "start" && !O.value ? rr : H.value.left), Y = n(() => {
2767
+ })), Xe = n(() => V(f.legendStyle, { fontSize: 11 })), J = n(() => f.categoryAlign === "start" && !O.value ? tr : H.value.left), Y = n(() => {
2758
2768
  let e = f.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? J.value : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
2759
2769
  return {
2760
2770
  lines: (f.title ?? "").split("\n"),
@@ -2824,7 +2834,7 @@ var Bt = ["role", "aria-label"], Vt = {
2824
2834
  align: t.align ?? "center",
2825
2835
  overlap: t.overlap ?? "shift",
2826
2836
  minSize: t.minSize ?? 0,
2827
- fontSize: t.fontSize ?? ir,
2837
+ fontSize: t.fontSize ?? nr,
2828
2838
  fontWeight: t.fontWeight
2829
2839
  };
2830
2840
  });
@@ -2851,10 +2861,10 @@ var Bt = ["role", "aria-label"], Vt = {
2851
2861
  category: E.value[i.categoryIndex] ?? String(i.categoryIndex)
2852
2862
  });
2853
2863
  if (!a) continue;
2854
- let o = t ? i.h : i.w, s = a.length * n * ar, c = o >= s + 2 * or && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
2855
- if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + or, d = u + g, p = "start";
2856
- else if (e.align === "start") u = h + or, d = u + g, p = "start";
2857
- else if (e.align === "end") d = m - or, u = d - g, p = "end";
2864
+ let o = t ? i.h : i.w, s = a.length * n * rr, c = o >= s + 2 * ir && o >= e.minSize, l = e.placement === "inside" ? !0 : e.placement === "outside" ? !1 : c, u, d, f, p = "middle", m = t ? -i.y : i.x + i.w, h = t ? -(i.y + i.h) : i.x, g = t ? n : s;
2865
+ if (f = t ? i.x + i.w / 2 : i.y + i.h / 2, !l) u = m + ir, d = u + g, p = "start";
2866
+ else if (e.align === "start") u = h + ir, d = u + g, p = "start";
2867
+ else if (e.align === "end") d = m - ir, u = d - g, p = "end";
2858
2868
  else {
2859
2869
  let e = (m + h) / 2;
2860
2870
  u = e - g / 2, d = e + g / 2, p = "middle";
@@ -2880,12 +2890,12 @@ var Bt = ["role", "aria-label"], Vt = {
2880
2890
  t.sort((e, t) => e.lo - t.lo);
2881
2891
  let n = -Infinity;
2882
2892
  for (let r of t) {
2883
- if (r.lo < n + sr) {
2893
+ if (r.lo < n + ar) {
2884
2894
  if (e.overlap === "hide") {
2885
2895
  r.hidden = !0;
2886
2896
  continue;
2887
2897
  }
2888
- let t = n + sr - r.lo;
2898
+ let t = n + ar - r.lo;
2889
2899
  r.lo += t, r.hi += t, r.inside = !1, r.svgAnchor = "start";
2890
2900
  }
2891
2901
  if (r.hi > i) {
@@ -2924,11 +2934,11 @@ var Bt = ["role", "aria-label"], Vt = {
2924
2934
  switch (f.categoryAlign ?? "end") {
2925
2935
  case "start": return {
2926
2936
  anchor: "start",
2927
- x: rr
2937
+ x: tr
2928
2938
  };
2929
2939
  case "center": return {
2930
2940
  anchor: "middle",
2931
- x: (rr + e) / 2
2941
+ x: (tr + e) / 2
2932
2942
  };
2933
2943
  default: return {
2934
2944
  anchor: "end",
@@ -2963,9 +2973,7 @@ var Bt = ["role", "aria-label"], Vt = {
2963
2973
  ref: ke
2964
2974
  }, n.$attrs, {
2965
2975
  class: ["bar-chart-wrapper", { "is-fullscreen": C(Ge) }],
2966
- style: C(Ke),
2967
- role: g.value || void 0,
2968
- "aria-label": h.value || void 0
2976
+ style: C(Ke)
2969
2977
  }), [
2970
2978
  c.menu ? (_(), r(pe, {
2971
2979
  key: 0,
@@ -2977,12 +2985,14 @@ var Bt = ["role", "aria-label"], Vt = {
2977
2985
  "is-fullscreen",
2978
2986
  "onClose"
2979
2987
  ])) : i("", !0),
2980
- o("div", kn, x(C(Ge) ? "Chart expanded to fill window" : ""), 1),
2988
+ o("div", Dn, x(C(Ge) ? "Chart expanded to fill window" : ""), 1),
2981
2989
  (_(), a("svg", {
2982
2990
  ref_key: "svgRef",
2983
2991
  ref: Ae,
2984
2992
  width: C(je),
2985
- height: C(Me)
2993
+ height: C(Me),
2994
+ role: g.value || void 0,
2995
+ "aria-label": h.value || void 0
2986
2996
  }, [
2987
2997
  c.title ? (_(), a("text", {
2988
2998
  key: 0,
@@ -2996,7 +3006,7 @@ var Bt = ["role", "aria-label"], Vt = {
2996
3006
  key: t,
2997
3007
  x: Y.value.x,
2998
3008
  dy: t === 0 ? 0 : Y.value.lineHeight
2999
- }, x(e), 9, Mn))), 128))], 8, jn)) : i("", !0),
3009
+ }, x(e), 9, An))), 128))], 8, kn)) : i("", !0),
3000
3010
  (_(!0), a(e, null, y(it.value, (e) => (_(), a("text", {
3001
3011
  key: e.key,
3002
3012
  "data-testid": e.key === "ch" ? "category-header" : "value-header",
@@ -3006,15 +3016,15 @@ var Bt = ["role", "aria-label"], Vt = {
3006
3016
  "font-size": Ye.value.fontSize,
3007
3017
  fill: Ye.value.fill,
3008
3018
  "font-weight": "600"
3009
- }, x(e.text), 9, Nn))), 128)),
3010
- Qe.value.length > 0 ? (_(), a("g", Pn, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3019
+ }, x(e.text), 9, jn))), 128)),
3020
+ Qe.value.length > 0 ? (_(), a("g", Mn, [(_(!0), a(e, null, y(Qe.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
3011
3021
  key: 0,
3012
3022
  x: t.x,
3013
3023
  y: t.y - 5,
3014
3024
  width: "12",
3015
3025
  height: "10",
3016
3026
  fill: t.color
3017
- }, null, 8, Fn)) : (_(), a("line", {
3027
+ }, null, 8, Nn)) : (_(), a("line", {
3018
3028
  key: 1,
3019
3029
  x1: t.x,
3020
3030
  y1: t.y,
@@ -3023,13 +3033,13 @@ var Bt = ["role", "aria-label"], Vt = {
3023
3033
  stroke: t.color,
3024
3034
  "stroke-width": "2",
3025
3035
  "stroke-dasharray": t.dashed ? "4 2" : void 0
3026
- }, null, 8, In)), o("text", {
3036
+ }, null, 8, Pn)), o("text", {
3027
3037
  x: t.x + 18,
3028
3038
  y: t.y + 4,
3029
3039
  "font-size": Xe.value.fontSize,
3030
3040
  fill: Xe.value.fill,
3031
3041
  "font-weight": Xe.value.fontWeight
3032
- }, x(t.label), 9, Ln)], 64))), 128))])) : i("", !0),
3042
+ }, x(t.label), 9, Fn)], 64))), 128))])) : i("", !0),
3033
3043
  !O.value || c.valueAxis ? (_(), a("line", {
3034
3044
  key: 2,
3035
3045
  x1: C(R)(C(H).left),
@@ -3038,7 +3048,7 @@ var Bt = ["role", "aria-label"], Vt = {
3038
3048
  y2: C(R)(C(H).top + C(W)),
3039
3049
  stroke: "currentColor",
3040
3050
  "stroke-opacity": "0.3"
3041
- }, null, 8, Rn)) : i("", !0),
3051
+ }, null, 8, In)) : i("", !0),
3042
3052
  O.value || c.valueAxis ? (_(), a("line", {
3043
3053
  key: 3,
3044
3054
  x1: C(R)(C(H).left),
@@ -3047,7 +3057,7 @@ var Bt = ["role", "aria-label"], Vt = {
3047
3057
  y2: C(R)(C(H).top + C(W)),
3048
3058
  stroke: "currentColor",
3049
3059
  "stroke-opacity": "0.3"
3050
- }, null, 8, zn)) : i("", !0),
3060
+ }, null, 8, Ln)) : i("", !0),
3051
3061
  c.valueGrid && c.valueAxis ? (_(!0), a(e, { key: 4 }, y(he.value, (e, t) => (_(), a("line", {
3052
3062
  key: "vg" + t,
3053
3063
  x1: O.value ? C(H).left : e.pos,
@@ -3056,7 +3066,7 @@ var Bt = ["role", "aria-label"], Vt = {
3056
3066
  y2: O.value ? e.pos : C(H).top + C(W),
3057
3067
  stroke: "currentColor",
3058
3068
  "stroke-opacity": "0.1"
3059
- }, null, 8, Bn))), 128)) : i("", !0),
3069
+ }, null, 8, Rn))), 128)) : i("", !0),
3060
3070
  Z.value && we.value ? (_(), a("rect", {
3061
3071
  key: 5,
3062
3072
  x: Z.value.x,
@@ -3066,7 +3076,7 @@ var Bt = ["role", "aria-label"], Vt = {
3066
3076
  fill: "currentColor",
3067
3077
  "fill-opacity": "0.06",
3068
3078
  "pointer-events": "none"
3069
- }, null, 8, Vn)) : i("", !0),
3079
+ }, null, 8, zn)) : i("", !0),
3070
3080
  c.valueAxis && O.value ? (_(!0), a(e, { key: 6 }, y(he.value, (e, t) => (_(), a("text", {
3071
3081
  key: "vt" + t,
3072
3082
  "data-testid": "value-tick",
@@ -3078,7 +3088,7 @@ var Bt = ["role", "aria-label"], Vt = {
3078
3088
  fill: q.value.fill,
3079
3089
  "font-weight": q.value.fontWeight,
3080
3090
  "fill-opacity": q.value.fillOpacity
3081
- }, x(e.value), 9, Hn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(he.value, (e, t) => (_(), a("text", {
3091
+ }, x(e.value), 9, Bn))), 128)) : c.valueAxis ? (_(!0), a(e, { key: 7 }, y(he.value, (e, t) => (_(), a("text", {
3082
3092
  key: "vt" + t,
3083
3093
  "data-testid": "value-tick",
3084
3094
  x: e.pos,
@@ -3088,7 +3098,7 @@ var Bt = ["role", "aria-label"], Vt = {
3088
3098
  fill: q.value.fill,
3089
3099
  "font-weight": q.value.fontWeight,
3090
3100
  "fill-opacity": q.value.fillOpacity
3091
- }, x(e.value), 9, Un))), 128)) : i("", !0),
3101
+ }, x(e.value), 9, Vn))), 128)) : i("", !0),
3092
3102
  c.yLabel ? (_(), a("text", {
3093
3103
  key: 8,
3094
3104
  x: 0,
@@ -3098,7 +3108,7 @@ var Bt = ["role", "aria-label"], Vt = {
3098
3108
  "font-size": Ye.value.fontSize,
3099
3109
  fill: Ye.value.fill,
3100
3110
  "font-weight": Ye.value.fontWeight
3101
- }, x(c.yLabel), 9, Wn)) : i("", !0),
3111
+ }, x(c.yLabel), 9, Hn)) : i("", !0),
3102
3112
  O.value ? (_(!0), a(e, { key: 9 }, y(z.value, (e, t) => (_(), a("text", {
3103
3113
  key: "ct" + t,
3104
3114
  "data-testid": "category-tick",
@@ -3109,7 +3119,7 @@ var Bt = ["role", "aria-label"], Vt = {
3109
3119
  fill: q.value.fill,
3110
3120
  "font-weight": q.value.fontWeight,
3111
3121
  "fill-opacity": q.value.fillOpacity
3112
- }, x(e.label), 9, Gn))), 128)) : (_(!0), a(e, { key: 10 }, y(z.value, (e, t) => (_(), a("text", {
3122
+ }, x(e.label), 9, Un))), 128)) : (_(!0), a(e, { key: 10 }, y(z.value, (e, t) => (_(), a("text", {
3113
3123
  key: "ct" + t,
3114
3124
  "data-testid": "category-tick",
3115
3125
  x: rt.value.x,
@@ -3120,7 +3130,7 @@ var Bt = ["role", "aria-label"], Vt = {
3120
3130
  fill: q.value.fill,
3121
3131
  "font-weight": q.value.fontWeight,
3122
3132
  "fill-opacity": q.value.fillOpacity
3123
- }, x(e.label), 9, Kn))), 128)),
3133
+ }, x(e.label), 9, Wn))), 128)),
3124
3134
  c.xLabel ? (_(), a("text", {
3125
3135
  key: 11,
3126
3136
  x: C(H).left + C(U) / 2,
@@ -3129,7 +3139,7 @@ var Bt = ["role", "aria-label"], Vt = {
3129
3139
  "font-size": Ye.value.fontSize,
3130
3140
  fill: Ye.value.fill,
3131
3141
  "font-weight": Ye.value.fontWeight
3132
- }, x(c.xLabel), 9, qn)) : i("", !0),
3142
+ }, x(c.xLabel), 9, Gn)) : i("", !0),
3133
3143
  (_(!0), a(e, null, y(F.value, (e, t) => (_(), a("rect", {
3134
3144
  key: "bar" + t,
3135
3145
  "data-testid": "bar",
@@ -3142,7 +3152,7 @@ var Bt = ["role", "aria-label"], Vt = {
3142
3152
  fill: e.color,
3143
3153
  "fill-opacity": e.opacity,
3144
3154
  style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
3145
- }, null, 12, Jn))), 128)),
3155
+ }, null, 12, Kn))), 128)),
3146
3156
  (_(!0), a(e, null, y(nt.value, (e) => (_(), a("text", {
3147
3157
  key: "blbl" + e.key,
3148
3158
  "data-testid": "bar-label",
@@ -3154,7 +3164,7 @@ var Bt = ["role", "aria-label"], Vt = {
3154
3164
  "font-weight": e.fontWeight,
3155
3165
  fill: e.fill,
3156
3166
  "pointer-events": "none"
3157
- }, x(e.text), 9, Yn))), 128)),
3167
+ }, x(e.text), 9, qn))), 128)),
3158
3168
  (_(!0), a(e, null, y(I.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
3159
3169
  key: 0,
3160
3170
  "data-testid": "summary-line",
@@ -3167,7 +3177,7 @@ var Bt = ["role", "aria-label"], Vt = {
3167
3177
  "stroke-linecap": "round",
3168
3178
  "stroke-linejoin": "round",
3169
3179
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3170
- }, null, 12, Xn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3180
+ }, null, 12, Jn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
3171
3181
  key: "sld" + n + "-" + r,
3172
3182
  cx: e.x,
3173
3183
  cy: e.y,
@@ -3175,7 +3185,7 @@ var Bt = ["role", "aria-label"], Vt = {
3175
3185
  fill: t.color,
3176
3186
  "fill-opacity": t.opacity,
3177
3187
  style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
3178
- }, null, 12, Zn))), 128)) : i("", !0)], 64))), 128)),
3188
+ }, null, 12, Yn))), 128)) : i("", !0)], 64))), 128)),
3179
3189
  we.value ? (_(), a("rect", d({
3180
3190
  key: 12,
3181
3191
  x: C(H).left,
@@ -3184,14 +3194,14 @@ var Bt = ["role", "aria-label"], Vt = {
3184
3194
  height: C(W),
3185
3195
  fill: "transparent",
3186
3196
  style: `cursor: crosshair; touch-action: ${O.value ? "pan-y" : "pan-x"}`
3187
- }, ee(C(Le), !0)), null, 16, Qn)) : i("", !0),
3197
+ }, ee(C(Le), !0)), null, 16, Xn)) : i("", !0),
3188
3198
  c.annotations && c.annotations.length > 0 ? (_(), r(C(ot), {
3189
3199
  key: 13,
3190
3200
  annotations: c.annotations,
3191
3201
  project: Te,
3192
3202
  bounds: C(Fe)
3193
3203
  }, null, 8, ["annotations", "bounds"])) : i("", !0)
3194
- ], 8, An)),
3204
+ ], 8, On)),
3195
3205
  we.value && C(G) !== null && X.value ? (_(), a("div", {
3196
3206
  key: 1,
3197
3207
  ref_key: "tooltipRef",
@@ -3205,7 +3215,7 @@ var Bt = ["role", "aria-label"], Vt = {
3205
3215
  transform: C(Ie) ? `translate3d(${C(Ie).left}px, ${C(Ie).top}px, 0) translateY(-50%)` : "translateY(-50%)",
3206
3216
  visibility: C(Ie) ? "visible" : "hidden"
3207
3217
  })
3208
- }, [b(n.$slots, "tooltip", p(u(X.value)), () => [o("div", $n, [Ze.value ? (_(), a("div", er, x(Ze.value), 1)) : i("", !0), (_(!0), a(e, null, y(X.value.values, (e) => (_(), a("div", {
3218
+ }, [b(n.$slots, "tooltip", p(u(X.value)), () => [o("div", Zn, [Ze.value ? (_(), a("div", Qn, x(Ze.value), 1)) : i("", !0), (_(!0), a(e, null, y(X.value.values, (e) => (_(), a("div", {
3209
3219
  key: e.seriesIndex,
3210
3220
  class: "bar-chart-tooltip-row"
3211
3221
  }, [o("span", {
@@ -3217,16 +3227,16 @@ var Bt = ["role", "aria-label"], Vt = {
3217
3227
  class: "bar-chart-download-link",
3218
3228
  href: C(Be),
3219
3229
  download: `${C(We)()}.csv`
3220
- }, x(C(ze)), 9, tr)) : i("", !0),
3230
+ }, x(C(ze)), 9, $n)) : i("", !0),
3221
3231
  C(Ve) ? (_(), a("button", {
3222
3232
  key: 3,
3223
3233
  type: "button",
3224
3234
  class: "bar-chart-download-button",
3225
3235
  onClick: l[0] ||= (...e) => C(He) && C(He)(...e)
3226
3236
  }, x(C(Ve)), 1)) : i("", !0)
3227
- ], 16, On)], 8, ["to", "disabled"]));
3237
+ ], 16)], 8, ["to", "disabled"]));
3228
3238
  }
3229
- }), [["__scopeId", "data-v-5f38ef02"]]), lr = {
3239
+ }), [["__scopeId", "data-v-251f7945"]]), sr = {
3230
3240
  ref: "root",
3231
3241
  class: "chart-tooltip-content",
3232
3242
  style: {
@@ -3238,7 +3248,7 @@ var Bt = ["role", "aria-label"], Vt = {
3238
3248
  "pointer-events": "none",
3239
3249
  transform: "translateY(-50%)"
3240
3250
  }
3241
- }, ur = /* @__PURE__ */ l({
3251
+ }, cr = /* @__PURE__ */ l({
3242
3252
  __name: "ChoroplethTooltip",
3243
3253
  setup(e, { expose: n }) {
3244
3254
  let a = v(null), s = w("root");
@@ -3249,21 +3259,21 @@ var Bt = ["role", "aria-label"], Vt = {
3249
3259
  getEl() {
3250
3260
  return s.value;
3251
3261
  }
3252
- }), (e, n) => (_(), r(t, { to: "body" }, [o("div", lr, [a.value ? b(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3262
+ }), (e, n) => (_(), r(t, { to: "body" }, [o("div", sr, [a.value ? b(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
3253
3263
  }
3254
- }), dr = ["role", "aria-label"], fr = {
3264
+ }), lr = ["role", "aria-label"], ur = {
3255
3265
  class: "chart-sr-only",
3256
3266
  "aria-live": "polite"
3257
- }, pr = {
3267
+ }, dr = {
3258
3268
  key: 1,
3259
3269
  class: "choropleth-header"
3260
- }, mr = {
3270
+ }, fr = {
3261
3271
  key: 0,
3262
3272
  class: "choropleth-legend-title"
3263
- }, hr = {
3273
+ }, pr = {
3264
3274
  key: 2,
3265
3275
  class: "choropleth-legend-continuous"
3266
- }, gr = { class: "choropleth-legend-ticks" }, _r = ["viewBox"], vr = ["innerHTML"], yr = "http://www.w3.org/2000/svg", br = 10, xr = 600, Sr = 450, Cr = 1e3, wr = 12, Tr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3276
+ }, mr = { class: "choropleth-legend-ticks" }, hr = ["viewBox"], gr = ["innerHTML"], _r = "http://www.w3.org/2000/svg", vr = 10, yr = 600, br = 450, xr = 1e3, Sr = 12, Cr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3267
3277
  inheritAttrs: !1,
3268
3278
  __name: "ChoroplethMap",
3269
3279
  props: {
@@ -3439,7 +3449,7 @@ var Bt = ["role", "aria-label"], Vt = {
3439
3449
  let n = t.getBoundingClientRect();
3440
3450
  gt(e, n.left + n.width / 2, n.top + n.height / 2);
3441
3451
  };
3442
- a ? (vt(), i.transition().duration(Sr).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
3452
+ a ? (vt(), i.transition().duration(br).call(V.transform, m).on("end", g)) : (V.transform(i, m), g());
3443
3453
  }
3444
3454
  function K(e) {
3445
3455
  let t = M.value;
@@ -3449,14 +3459,14 @@ var Bt = ["role", "aria-label"], Vt = {
3449
3459
  let r = Xe.value, i = J.value + 1.5;
3450
3460
  for (let { item: n, feature: a, key: o } of e) {
3451
3461
  let e = ge.get(o);
3452
- e || (e = document.createElementNS(yr, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), ge.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), yt(e, n.style);
3462
+ e || (e = document.createElementNS(_r, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), ge.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), yt(e, n.style);
3453
3463
  }
3454
3464
  }
3455
3465
  function Ie() {
3456
3466
  if (!A.value || !V) return;
3457
3467
  Z.value.length > 0 && D("update:focus", null);
3458
3468
  let e = ce(A.value);
3459
- e.interrupt(), vt(), e.transition().duration(Sr).call(V.transform, se);
3469
+ e.interrupt(), vt(), e.transition().duration(br).call(V.transform, se);
3460
3470
  }
3461
3471
  T(() => f.focusZoomLevel, () => {
3462
3472
  V && V.scaleExtent([1, Math.max(12, f.focusZoomLevel)]), W();
@@ -3465,7 +3475,7 @@ var Bt = ["role", "aria-label"], Vt = {
3465
3475
  let e = ce(A.value);
3466
3476
  e.interrupt(), V.transform(e, se);
3467
3477
  });
3468
- let Le = n(() => f.width && f.height ? f.height / f.width : .625), Re = n(() => Cr), ze = n(() => Cr * Le.value), Ve = n(() => {
3478
+ let Le = n(() => f.width && f.height ? f.height / f.width : .625), Re = n(() => xr), ze = n(() => xr * Le.value), Ve = n(() => {
3469
3479
  let e = S(f.topology), t = e?.objects?.states;
3470
3480
  if (!t) return [];
3471
3481
  let n = le(e, t);
@@ -3541,7 +3551,7 @@ var Bt = ["role", "aria-label"], Vt = {
3541
3551
  }), q = n(() => {
3542
3552
  let e = Ue.value;
3543
3553
  if (He.value && e) {
3544
- let t = [[wr, wr], [Re.value - wr, ze.value - wr]], n = ae().fitExtent(t, e), r = oe(n).centroid(e);
3554
+ let t = [[Sr, Sr], [Re.value - Sr, ze.value - Sr]], n = ae().fitExtent(t, e), r = oe(n).centroid(e);
3545
3555
  return Number.isFinite(r[0]) && Number.isFinite(r[1]) ? n : P().fitExtent(t, e);
3546
3556
  }
3547
3557
  return ae().fitExtent([[0, 0], [Re.value, ze.value]], Je.value);
@@ -3766,7 +3776,7 @@ var Bt = ["role", "aria-label"], Vt = {
3766
3776
  let t = De;
3767
3777
  if (De = null, !t || !t.featId || e.touches.length > 0) return;
3768
3778
  let n = e.changedTouches[0];
3769
- if (!n || Math.abs(n.clientX - t.x) > br || Math.abs(n.clientY - t.y) > br || e.timeStamp - t.time > xr) return;
3779
+ if (!n || Math.abs(n.clientX - t.x) > vr || Math.abs(n.clientY - t.y) > vr || e.timeStamp - t.time > yr) return;
3770
3780
  let r = me.get(t.featId);
3771
3781
  r && (e.preventDefault(), wt(r));
3772
3782
  }
@@ -3774,7 +3784,7 @@ var Bt = ["role", "aria-label"], Vt = {
3774
3784
  De = null;
3775
3785
  }
3776
3786
  function jt(e) {
3777
- let t = document.createElementNS(yr, "path");
3787
+ let t = document.createElementNS(_r, "path");
3778
3788
  return e && t.setAttribute("d", e), t;
3779
3789
  }
3780
3790
  function Mt() {
@@ -3787,7 +3797,7 @@ var Bt = ["role", "aria-label"], Vt = {
3787
3797
  for (let e of r) {
3788
3798
  let t = String(e.id), r = dt(e), c = lt(t), l = jt(n(e));
3789
3799
  if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill", ut(t)), l.setAttribute("stroke", i), l.setAttribute("stroke-width", a), l.setAttribute("vector-effect", "non-scaling-stroke"), o) {
3790
- let e = document.createElementNS(yr, "title");
3800
+ let e = document.createElementNS(_r, "title");
3791
3801
  e.textContent = pt(r, c), l.appendChild(e);
3792
3802
  }
3793
3803
  s.appendChild(l), R.set(t, l), me.set(t, {
@@ -3913,8 +3923,8 @@ var Bt = ["role", "aria-label"], Vt = {
3913
3923
  "is-fullscreen",
3914
3924
  "onClose"
3915
3925
  ])) : i("", !0),
3916
- o("div", fr, x(C(Ht).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
3917
- c.title || $.value ? (_(), a("div", pr, [c.title ? (_(), a("div", {
3926
+ o("div", ur, x(C(Ht).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
3927
+ c.title || $.value ? (_(), a("div", dr, [c.title ? (_(), a("div", {
3918
3928
  key: 0,
3919
3929
  class: "choropleth-title",
3920
3930
  style: m(L.value)
@@ -3922,16 +3932,16 @@ var Bt = ["role", "aria-label"], Vt = {
3922
3932
  key: 1,
3923
3933
  class: "choropleth-legend",
3924
3934
  style: m(fe.value)
3925
- }, [c.legendTitle ? (_(), a("span", mr, x(c.legendTitle), 1)) : i("", !0), tt.value || nt.value ? (_(!0), a(e, { key: 1 }, y(Bt.value, (e) => (_(), a("span", {
3935
+ }, [c.legendTitle ? (_(), a("span", fr, x(c.legendTitle), 1)) : i("", !0), tt.value || nt.value ? (_(!0), a(e, { key: 1 }, y(Bt.value, (e) => (_(), a("span", {
3926
3936
  key: e.key,
3927
3937
  class: "choropleth-legend-item"
3928
3938
  }, [o("span", {
3929
3939
  class: "choropleth-legend-swatch",
3930
3940
  style: m({ background: e.color })
3931
- }, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", hr, [o("div", {
3941
+ }, null, 4), s(" " + x(e.label), 1)]))), 128)) : (_(), a("div", pr, [o("div", {
3932
3942
  class: "choropleth-legend-gradient",
3933
3943
  style: m({ background: Vt.value })
3934
- }, null, 4), o("div", gr, [(_(!0), a(e, null, y(zt.value, (e) => (_(), a("span", {
3944
+ }, null, 4), o("div", mr, [(_(!0), a(e, null, y(zt.value, (e) => (_(), a("span", {
3935
3945
  key: e.value,
3936
3946
  style: m({ left: e.pct + "%" })
3937
3947
  }, x(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
@@ -3950,7 +3960,7 @@ var Bt = ["role", "aria-label"], Vt = {
3950
3960
  }, null, 512), o("g", {
3951
3961
  ref_key: "overlayGroupRef",
3952
3962
  ref: M
3953
- }, null, 512)], 512)], 12, _r)),
3963
+ }, null, 512)], 512)], 12, hr)),
3954
3964
  Ce.value ? (_(), a("button", {
3955
3965
  key: 2,
3956
3966
  type: "button",
@@ -3958,7 +3968,7 @@ var Bt = ["role", "aria-label"], Vt = {
3958
3968
  "aria-label": "Reset zoom",
3959
3969
  onClick: Ie
3960
3970
  }, " Reset ")) : i("", !0),
3961
- de.value ? (_(), r(ur, {
3971
+ de.value ? (_(), r(cr, {
3962
3972
  key: 3,
3963
3973
  ref_key: "tooltipChildRef",
3964
3974
  ref: N
@@ -3966,12 +3976,12 @@ var Bt = ["role", "aria-label"], Vt = {
3966
3976
  default: E((t) => [b(n.$slots, "tooltip", p(u(O(t))), () => [c.tooltipFormat ? (_(), a("span", {
3967
3977
  key: 0,
3968
3978
  innerHTML: c.tooltipFormat(t)
3969
- }, null, 8, vr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(ft(t.value)), 1)], 64))], !0)]),
3979
+ }, null, 8, gr)) : t.value == null ? (_(), a(e, { key: 1 }, [s(x(t.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(x(t.name) + ": " + x(ft(t.value)), 1)], 64))], !0)]),
3970
3980
  _: 3
3971
3981
  }, 512)) : i("", !0)
3972
- ], 16, dr)], 8, ["to", "disabled"]));
3982
+ ], 16, lr)], 8, ["to", "disabled"]));
3973
3983
  }
3974
- }), [["__scopeId", "data-v-7bd9e073"]]), Er = /* @__PURE__ */ L(/* @__PURE__ */ l({
3984
+ }), [["__scopeId", "data-v-7bd9e073"]]), wr = /* @__PURE__ */ L(/* @__PURE__ */ l({
3975
3985
  __name: "ChartTooltip",
3976
3986
  props: {
3977
3987
  x: {},
@@ -4022,7 +4032,7 @@ var Bt = ["role", "aria-label"], Vt = {
4022
4032
  _: 3
4023
4033
  }, 8, ["open"])) : i("", !0);
4024
4034
  }
4025
- }), [["__scopeId", "data-v-44377f70"]]), Dr = { class: "TableWrapper" }, Or = ["href", "download"], kr = /* @__PURE__ */ L(/* @__PURE__ */ l({
4035
+ }), [["__scopeId", "data-v-44377f70"]]), Tr = { class: "TableWrapper" }, Er = ["href", "download"], Dr = /* @__PURE__ */ L(/* @__PURE__ */ l({
4026
4036
  __name: "DataTable",
4027
4037
  props: {
4028
4038
  data: {},
@@ -4146,7 +4156,7 @@ var Bt = ["role", "aria-label"], Vt = {
4146
4156
  items: E.value,
4147
4157
  "force-dropdown": ""
4148
4158
  }, null, 8, ["items"])) : i("", !0),
4149
- o("div", Dr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
4159
+ o("div", Tr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
4150
4160
  o("colgroup", null, [(_(!0), a(e, null, y(b.value, (e) => (_(), a("col", {
4151
4161
  key: e.name,
4152
4162
  style: m(u(e.name))
@@ -4172,9 +4182,9 @@ var Bt = ["role", "aria-label"], Vt = {
4172
4182
  class: "data-table-download-link",
4173
4183
  href: O.value,
4174
4184
  download: `${C()}.csv`
4175
- }, x(D.value), 9, Or)) : i("", !0)
4185
+ }, x(D.value), 9, Er)) : i("", !0)
4176
4186
  ], 2));
4177
4187
  }
4178
4188
  }), [["__scopeId", "data-v-21721f41"]]);
4179
4189
  //#endregion
4180
- export { cr as BarChart, Er as ChartTooltip, Tr as ChoroplethMap, kr as DataTable, Dn as LineChart };
4190
+ export { or as BarChart, wr as ChartTooltip, Cr as ChoroplethMap, Dr as DataTable, En as LineChart };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfasim-ui/charts",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "type": "module",
5
5
  "description": "Chart visualization components for cfasim-ui",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "d3-zoom": "^3.0.0",
39
39
  "reka-ui": "^2.9.2",
40
40
  "topojson-client": "^3.1.0",
41
- "@cfasim-ui/shared": "0.6.3"
41
+ "@cfasim-ui/shared": "0.6.4"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "vue": "^3.5.0"