@designsystem-se/af 35.4.1-beta.4 → 35.4.1-beta.6

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.
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, F as Fragment } from './index-148a7577.js';
2
- import { o as ordinal, i as initRange, r as range, s as select, a as axisLeft, l as linear, b as axisBottom, p as polyInOut, c as interpolate, m as max, d as min, e as linear$1 } from './linear-0246aaea.js';
2
+ import { o as ordinal, i as initRange, r as range, s as select, a as axisLeft, l as linear, b as axisBottom, m as max, p as polyInOut, c as min, d as linear$1 } from './linear-78b9219d.js';
3
3
  import { _ as _t } from './text-26e02c8d.js';
4
4
  import { r as randomIdGenerator } from './randomIdGenerator.util-56406f2e.js';
5
5
  import { a as BarChartVariation, H as HeaderCenterContentWidth, L as LayoutBlockContainer, p as LayoutContainerVariation, q as LayoutContainerMaxWidth, r as NavigationVerticalMenuVariation, N as NavigationVerticalMenuActiveIndicatorSize, T as TitleLogoVariation } from './typography-variation.enum-531cdf64.js';
@@ -251,8 +251,6 @@ const barChart = class {
251
251
  // Resizing chart while loading
252
252
  this.loadingResize = () => {
253
253
  const newHeight = this.setDims();
254
- this.setMargins(true);
255
- this.svg.attr('width', this.dims.width).attr('height', this.dims.height);
256
254
  this.barChartContainer.attr('transform', `translate(${this.margin.left + this.tickPadding + this.yTickSize},0)`);
257
255
  this.margin.right =
258
256
  this.getTextSize(this.xScale.domain()[1].toLocaleString()) / 2 +
@@ -277,10 +275,8 @@ const barChart = class {
277
275
  0,
278
276
  this.dims.width - this.margin.right - this.margin.left
279
277
  ]);
280
- this.barSelection
281
- .attr('x', this.xFunction)
282
- .attr('width', this.widthFunction);
283
278
  this.setValueTicks();
279
+ this.adjustBarSize();
284
280
  };
285
281
  this.highlightBarGroup = (_event, datum) => {
286
282
  if (typeof datum === 'string') {
@@ -391,189 +387,33 @@ const barChart = class {
391
387
  return 'barGroup' + key.replace(/[^A-Z0-9]+/gi, '');
392
388
  };
393
389
  this.updateBars = (fromLoading) => {
394
- this.barChartContainer
390
+ this.barSelection = this.barChartContainer.select('.interactiveElements')
395
391
  .selectAll('.barGroup')
396
392
  .data(this.mappedData)
397
- .join((enter) => {
398
- var _a, _b;
399
- const tempSelection = enter
400
- .append('g')
401
- .attr('class', 'barGroup')
402
- .attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
403
- tempSelection
404
- .append('rect')
405
- .attr('class', 'bar')
406
- .style('cursor', 'pointer')
407
- .attr('ry', 4)
408
- .attr('rx', 4)
409
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
410
- ? this.yScale(d.key)
411
- : this.dims.height - this.margin.bottom)
412
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
413
- ? 2
414
- : this.xScale(d.key))
415
- .attr('width', () => this.afVariation === BarChartVariation.Horizontal
416
- ? 0
417
- : this.xScale.bandwidth())
418
- .attr('height', () => this.afVariation === BarChartVariation.Horizontal
419
- ? this.yScale.bandwidth()
420
- : 0)
421
- .on('mouseenter', this.hover)
422
- .on('mouseleave', this.hoverOut)
423
- .on('click', this.openTooltip)
424
- .transition()
425
- .duration(this.defaultDuration)
426
- .ease(polyInOut)
427
- .attr('width', this.widthFunction)
428
- .attr('y', this.yFunction)
429
- .attr('height', this.heightFunction)
430
- .attr('fill', '#00005a');
431
- if (!((_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.valueLabels))
432
- return tempSelection;
433
- tempSelection
434
- .append('text')
435
- .text((d) => d.value.toLocaleString())
436
- .attr('class', 'barText')
437
- .attr('font-size', this.fontSize)
438
- .attr('font-weight', '600')
439
- .attr('text-anchor', 'end')
440
- .style('pointer-events', 'none')
441
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
442
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
443
- : this.dims.height - this.margin.bottom)
444
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
445
- ? 2
446
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
447
- .transition()
448
- .duration(this.defaultDuration)
449
- .ease(polyInOut)
450
- .attr('font-size', this.fontSize)
451
- .attr('font-weight', '600')
452
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
453
- ? this.xScale(d.value)
454
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
455
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
456
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
457
- : this.yScale(d.value))
458
- .attr('text-anchor', (d) => {
459
- if (this.afVariation === BarChartVariation.Vertical)
460
- return 'middle';
461
- return this.xScale(d.value) < d.len + this.tickPadding * 2
462
- ? 'start'
463
- : 'end';
464
- })
465
- .attr('dx', (d) => {
466
- if (this.afVariation === BarChartVariation.Horizontal)
467
- return this.xScale(d.value) < d.len + this.tickPadding * 2
468
- ? this.tickPadding
469
- : -this.tickPadding;
470
- return 0;
471
- })
472
- .attr('fill', (d) => {
473
- if (this.afVariation === BarChartVariation.Vertical)
474
- return 'black';
475
- return this.xScale(d.value) < d.len + this.tickPadding * 2
476
- ? 'black'
477
- : 'white';
478
- })
479
- .attr('dy', () => this.afVariation == BarChartVariation.Horizontal
480
- ? '0.35em'
481
- : '-0.25em')
482
- .style('pointer-events', 'none')
483
- .attrTween('text', (d, i, nodelist) => {
484
- const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
485
- ? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
486
- : 0;
487
- const interpolatedValue = interpolate(oldnum, d.value);
488
- return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
489
- });
490
- return tempSelection;
491
- }, (update) => {
492
- // Update ids to bars
493
- update.attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
494
- // Mouse interaction to updated loading bars
495
- if (fromLoading) {
496
- update
497
- .select('rect')
498
- .on('mouseenter', this.hover)
499
- .on('mouseleave', this.hoverOut)
500
- .on('click', this.openTooltip)
501
- .attr('x', this.xFunction)
502
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
503
- ? this.yScale(d.key)
504
- : this.dims.height - this.margin.bottom)
505
- .attr('width', this.widthFunction)
506
- .attr('height', () => this.afVariation === BarChartVariation.Horizontal
507
- ? this.yScale.bandwidth()
508
- : 0)
509
- .attr('fill', '#00005a')
510
- .transition()
511
- .duration(this.defaultDuration)
512
- .ease(polyInOut)
513
- .attr('y', this.yFunction)
514
- .attr('height', this.heightFunction)
515
- .on('end', () => this.barChartObserver.observe(this.chartDiv)); // Reset barchartObserver
516
- }
517
- else {
518
- update
519
- .select('rect')
520
- .transition()
521
- .duration(this.defaultDuration)
522
- .ease(polyInOut)
523
- .attr('x', this.xFunction)
524
- .attr('y', this.yFunction)
525
- .attr('width', this.widthFunction)
526
- .attr('height', this.heightFunction)
527
- .attr('fill', '#00005a');
528
- }
529
- return update
530
- .select('text')
531
- .style('display', () => { var _a, _b; return ((_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.valueLabels) ? null : 'none'; })
532
- .transition()
533
- .duration(this.defaultDuration)
534
- .ease(polyInOut)
535
- .attr('font-size', this.fontSize)
536
- .attr('font-weight', '600')
537
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
538
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
539
- : this.yScale(d.value))
540
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
541
- ? this.xScale(d.value)
542
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
543
- .attr('text-anchor', (d) => {
544
- if (this.afVariation === BarChartVariation.Vertical)
545
- return 'middle';
546
- return this.xScale(d.value) < d.len + this.tickPadding * 2
547
- ? 'start'
548
- : 'end';
549
- })
550
- .attr('dx', (d) => {
551
- if (this.afVariation === BarChartVariation.Horizontal)
552
- return this.xScale(d.value) < d.len + this.tickPadding * 2
553
- ? this.tickPadding
554
- : -this.tickPadding;
555
- return 0;
556
- })
557
- .attr('fill', (d) => {
558
- if (this.afVariation === BarChartVariation.Vertical)
559
- return 'black';
560
- return this.xScale(d.value) < d.len + this.tickPadding * 2
561
- ? 'black'
562
- : 'white';
563
- })
564
- .attr('dy', () => this.afVariation == BarChartVariation.Horizontal
565
- ? '0.35em'
566
- : '-0.25em')
567
- .style('pointer-events', 'none')
568
- .attrTween('text', (d, i, nodelist) => {
569
- const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
570
- ? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
571
- : 0;
572
- const interpolatedValue = interpolate(oldnum, d.value);
573
- return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
574
- });
575
- }, (exit) => exit.remove());
576
- this.barSelection = this.barChartContainer.selectAll('rect');
393
+ .join('g')
394
+ .attr('class', 'barGroup')
395
+ .attr('id', (d) => this.barGroupID(d.key));
396
+ this.barSelection.selectAll('.bar')
397
+ .data((d) => {
398
+ return d.series;
399
+ })
400
+ .join('rect')
401
+ .attr('class', 'bar')
402
+ .style('cursor', 'pointer')
403
+ .attr('x', this.xFunction)
404
+ .attr('y', this.yFunction)
405
+ .attr('ry', 4)
406
+ .attr('rx', 4)
407
+ .attr('width', this.widthFunction)
408
+ .attr('height', this.heightFunction)
409
+ .attr('fill', (d) => this.colorFunction(d.serie))
410
+ .on('mouseenter', this.hover)
411
+ .on('mouseleave', this.hoverOut)
412
+ .on('click', this.openTooltip);
413
+ if (fromLoading) {
414
+ this.initLegend();
415
+ }
416
+ this.barSelection = this.barChartContainer.selectAll('.barGroup');
577
417
  this.textSelection = this.barChartContainer.selectAll('.barText');
578
418
  };
579
419
  // Setting position of text according to bar size
@@ -612,7 +452,7 @@ const barChart = class {
612
452
  };
613
453
  this.reshapeData = () => {
614
454
  const toReturn = [];
615
- if (this.loading || !this.chartData) {
455
+ if (!this.chartData) {
616
456
  this.placeholderTicks.forEach((key) => {
617
457
  const tick = { key: key, series: [] };
618
458
  tick.series.push({
@@ -987,11 +827,11 @@ const barChart = class {
987
827
  .html((d) => {
988
828
  return `<span>${d.serie}: <b style="font-weight:600;">${d.value.toLocaleString(undefined, this.numberFormat)}</b></span>`;
989
829
  });
990
- this.tooltip.style('visibility', 'visible');
830
+ this.tooltip.style('display', null);
991
831
  this.positionTooltip(this.tooltipData);
992
832
  };
993
833
  this.closeTooltip = () => {
994
- this.tooltip.style('visibility', 'hidden');
834
+ this.tooltip.style('display', 'none');
995
835
  };
996
836
  // Positions tooltip in horizontal mode
997
837
  this.positionTooltip = (data) => {
@@ -1130,12 +970,13 @@ const barChart = class {
1130
970
  this.afChartData = undefined;
1131
971
  }
1132
972
  afChartDataUpdate(data) {
1133
- if (typeof data != 'string')
1134
- this.chartData = data;
1135
- else
1136
- this.chartData = JSON.parse(data);
1137
- if (this.chartData)
973
+ if (typeof data === 'string' && Object.keys(JSON.parse(data)).length > 0 || Object.keys(data).length > 0) {
974
+ if (typeof data != 'string')
975
+ this.chartData = data;
976
+ else
977
+ this.chartData = JSON.parse(data);
1138
978
  this.series = this.chartData.data.series.map(serie => serie.title);
979
+ }
1139
980
  this.mappedData = this.reshapeData();
1140
981
  // checking for width of each tick
1141
982
  this.mappedData.forEach((elem) => {
@@ -1226,7 +1067,7 @@ const barChart = class {
1226
1067
  // Getting handle for tooltip
1227
1068
  this.tooltip = select('#' + this.afId);
1228
1069
  this.tooltip.select('.tooltipClose').on('click', this.closeTooltip);
1229
- // Add heading placeholder for heading
1070
+ this.tooltip.selectAll('.tooltipHeading').remove();
1230
1071
  this.tooltip
1231
1072
  .select('.tooltipHead')
1232
1073
  .insert('h' + (parseInt(this.afHeadingLevel.replace(/\D/g, '')) + 1), ':first-child') // increment heading level by one
@@ -1234,7 +1075,7 @@ const barChart = class {
1234
1075
  .style('font-size', '1rem')
1235
1076
  .style('margin', '0 0.75rem 0.25rem 0 ')
1236
1077
  .style('font-weight', '500');
1237
- this.tooltip.style('visibility', 'hidden');
1078
+ this.tooltip.style('display', 'none');
1238
1079
  }
1239
1080
  initEmpty() {
1240
1081
  select(this.chartDiv).select('.chartSVG').remove();
@@ -1254,20 +1095,20 @@ const barChart = class {
1254
1095
  .attr('role', 'img')
1255
1096
  .attr('aria-label', this.chartData && this.chartData.title
1256
1097
  ? 'Stapeldiagram om ' + this.chartData.title.toLowerCase()
1257
- : 'Stapeldiagram');
1098
+ : 'Stapeldiagram').attr('style', 'display: flex;min-width: 0;width: 100%;height: auto;');
1258
1099
  // Hide unusable components
1259
1100
  select(this.titleDiv)
1260
- .select(this.afHeadingLevel)
1101
+ .append(this.afHeadingLevel)
1102
+ .attr('class', 'loadingHeader')
1261
1103
  .html(`${_t.loading}...`);
1262
1104
  this.initYAxis(true);
1263
1105
  this.initXAxis(true);
1264
1106
  this.tooltip = select('#' + this.afId);
1265
- this.tooltip.style('visibility', 'hidden');
1107
+ this.tooltip.style('display', 'none');
1266
1108
  this.loadingState(true);
1267
1109
  }
1268
1110
  loadingState(empty) {
1269
1111
  this.loading = true;
1270
- console.log('loading!');
1271
1112
  // close potentially open tooltip
1272
1113
  if (this.tooltip)
1273
1114
  this.closeTooltip();
@@ -1307,14 +1148,17 @@ const barChart = class {
1307
1148
  this.xAxisHandle.attr('transform', `translate(0,${this.dims.height - this.margin.bottom})`);
1308
1149
  }
1309
1150
  const animateBars = () => {
1310
- this.barChartContainer.selectAll('.barGroup').remove();
1151
+ this.barChartContainer.selectAll('.interactiveElements').remove();
1311
1152
  this.barSelection = this.barChartContainer
1153
+ .append('g')
1154
+ .attr('class', 'interactiveElements')
1155
+ .style('isolation', 'isolate')
1312
1156
  .selectAll('barGroup')
1313
1157
  .data(this.mappedData)
1314
1158
  .join('g')
1315
1159
  .attr('class', 'barGroup')
1316
- .attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
1317
- this.barSelection.selectAll('.barGroup')
1160
+ .attr('id', (d) => this.barGroupID(d.key));
1161
+ this.barSelection.selectAll('bar')
1318
1162
  .data((d) => {
1319
1163
  return d.series;
1320
1164
  })
@@ -1336,7 +1180,7 @@ const barChart = class {
1336
1180
  .attr('y', this.yFunction)
1337
1181
  .attr('height', this.heightFunction);
1338
1182
  this.barChartContainer.selectAll('.bar')
1339
- .transition()
1183
+ .transition('animateBar')
1340
1184
  .duration(400)
1341
1185
  .ease(linear$1)
1342
1186
  .delay((...[, i]) => i * 150 + 400)
@@ -1351,8 +1195,8 @@ const barChart = class {
1351
1195
  };
1352
1196
  const flattenBars = () => {
1353
1197
  this.barChartContainer
1354
- .selectAll('rect')
1355
- .transition()
1198
+ .selectAll('.bar')
1199
+ .transition('animateBar')
1356
1200
  .duration(200)
1357
1201
  .ease(linear$1)
1358
1202
  .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
@@ -1588,10 +1432,11 @@ const barChart = class {
1588
1432
  ]);
1589
1433
  this.setNamedTicks(true);
1590
1434
  // Stop animation
1591
- this.barSelection.selectAll('.barGroup').on('end', null);
1435
+ this.barChartContainer.selectAll('.barGroup').on('end', null);
1436
+ select(this.titleDiv).select('.loadingHeader').remove();
1592
1437
  this.loading = false;
1593
- this.barSelection
1594
- .transition()
1438
+ this.barChartContainer.selectAll('.bar').interrupt('animateBar');
1439
+ this.barChartContainer.selectAll('.bar').transition()
1595
1440
  .duration(this.defaultDuration)
1596
1441
  .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
1597
1442
  ? this.yScale(d.key)
@@ -1661,7 +1506,7 @@ const barChart = class {
1661
1506
  this.averageLine();
1662
1507
  this.adjustBarSize();
1663
1508
  this.adjustBarText();
1664
- if (this.tooltip.style('visibility') !== 'hidden')
1509
+ if (this.tooltip.style('display') !== 'none')
1665
1510
  this.positionTooltip(this.tooltipData);
1666
1511
  }
1667
1512
  // Returns the longest text from an array of strings
@@ -1781,7 +1626,7 @@ const barChart = class {
1781
1626
  <span style="display:block;margin-top:0.25rem;font-size:0.875rem;color:var(--digi--global--color--neutral--grayscale--darkest-3)">${this.chartData.infoText}</span></p>`;
1782
1627
  }
1783
1628
  }
1784
- return (h(Host, { key: '3b919d1bdd201ddf5e4e5e2955190ed34c5aced3', ref: (el) => (this.host = el) }, h("svg", { key: '380b1d30cc3c7a71bf05fa4cdf4bb00def16b090', xmlns: "http://www.w3.org/2000/svg", width: "0", height: "0" }, h("defs", { key: 'd39cde898124df9b34b994d0105fcc28e486a8f4' }, h("pattern", { key: '20d0ffdfa0e5310cad77ec994bf963f600de7b69', id: "prognosis", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: '17d98e16afa2c42146a22a441d3dd0922ae767f5', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar(this.colorPalettes[0]), "stroke-width": "8" })), h("pattern", { key: '3dfdebb12e5f2eba8b216acd4ff846e82615ed66', id: "prognosisInactive", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: 'df76dde74f8e49e600f97b81c0c50e97147b9626', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar('--digi--color--background--secondary-accent'), "stroke-width": "8" })), h("pattern", { key: '1d7a87ca509e067288af063e406d98962639560c', id: "prognosisHighlight", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: '1c9618f2b783704cc0ceab0c38d8b525b9fdc520', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.adjustColor(this.colorFunction(0), 50), "stroke-width": "8" })))), h("div", { key: '5217e3c1b3063bcb77fee7bebf631296ea95ab6b', class: "topWrapper", ref: (el) => (this.titleDiv = el) }, h("digi-typography", { key: '904c16605d7947862bbf77b7f5dcbf581284ef97', class: "chartTitle", innerHTML: heading }), h("digi-button", { key: 'e285bef2d76e214a5615d4cee157bde5061e472a', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${((_b = this.chartData) === null || _b === void 0 ? void 0 : _b.title) ? (_c = this.chartData) === null || _c === void 0 ? void 0 : _c.title.toLowerCase() : ''}` }, h("digi-icon-table", { key: '2b278678de6fc8feda2f02c494c6e0dc76d1b3bb', slot: "icon" }), "Visa tabell"), h("digi-button", { key: '85aa9d581cdf8332b87eebb80df10e2e654ec81e', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${((_d = this.chartData) === null || _d === void 0 ? void 0 : _d.title) ? (_e = this.chartData) === null || _e === void 0 ? void 0 : _e.title.toLowerCase() : ''}` }, h("digi-icon-chart", { key: 'e4396b006704ebd6ffad155ebb4be3ae7abaf5d0', slot: "icon" }), "Visa diagram"), h("div", { key: '6c8a51169075d49b9da6f0158042c06e5d38a6e2', class: "scChartStatus", role: "status", ref: (el) => (this.status = el) })), h("div", { key: '8b0b7b63ba4f8b428f6d728d48cdc05ae791a605', class: "svgWrap", ref: (el) => (this.chartDiv = el) }, h("div", { key: 'fadf084df0bfcd6f39831b92983091e6c0fefbd0', class: "chartTooltip", id: this.afId }, h("div", { key: '3a0258527320c1719bffec8c221bc9884d77ee1f', class: "tooltipHead" }, h("digi-icon-x", { key: 'b1013c82580116f7806b2bf31b08eea205a47db1', class: "tooltipClose" })), h("div", { key: 'e98e704c7f03fe0e0c1a90a9088f2962b9661a5c', class: "tooltipBody" }), this.afVariation === BarChartVariation.Horizontal ? (h("digi-icon-caret-up", { class: "caret" })) : (h("digi-icon-caret-down", { class: "caret" })))), h("div", { key: '56da797be96540039f52ae28a2bf250d46f47f12', class: "legendWrap", ref: (el) => (this.legendDiv = el) }, h("div", { key: '3f3621240d161083d114df5d02a550d1f06613fa', class: "legend" })), h("div", { key: '427754c0a4b58f1cb334e89960d60c4ef22284f4', class: "table", ref: (el) => (this.tableDiv = el) }, ' ')));
1629
+ return (h(Host, { key: '2e011f2838668e9d58a6b4442e2832b6e1bac21b', ref: (el) => (this.host = el) }, h("svg", { key: 'a91c7bc7ed311fd10f0014d382daf46d97524087', xmlns: "http://www.w3.org/2000/svg", width: "0", height: "0" }, h("defs", { key: 'b28ad4ff2f0029eecd3a7b220d97ae81c646f6d0' }, h("pattern", { key: '2bb838607089932d089c05fdb568e06782cd6ef6', id: "prognosis", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: '4eca3d7dbb9cd2d47bc6367a8f07808ba3767902', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar(this.colorPalettes[0]), "stroke-width": "8" })), h("pattern", { key: '87585e674cc45c2496650eb5309f4eee34f89b3a', id: "prognosisInactive", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: '42bfe1a59192f618e60486105e919b2569fef753', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar('--digi--color--background--secondary-accent'), "stroke-width": "8" })), h("pattern", { key: '2ab36682ad76783cda635db815fc9f5f542fab21', id: "prognosisHighlight", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("line", { key: 'd5b93bf96f259cdf093a3e61c38ef61bbfd565ba', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.adjustColor(this.colorFunction(0), 50), "stroke-width": "8" })))), h("div", { key: 'f94c18afa372d176500c2d3844212df29c83f16b', class: "topWrapper", ref: (el) => (this.titleDiv = el) }, h("digi-typography", { key: '68dca23f7fd92f024f0b3d7eebc7b7214e636090', class: "chartTitle", innerHTML: heading }), h("digi-button", { key: '98d6ade579584a998a1d3e246168f42b19bd277f', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${((_b = this.chartData) === null || _b === void 0 ? void 0 : _b.title) ? (_c = this.chartData) === null || _c === void 0 ? void 0 : _c.title.toLowerCase() : ''}` }, h("digi-icon-table", { key: '36d1e6f12b90215ba6ce00b814573616772820e7', slot: "icon" }), "Visa tabell"), h("digi-button", { key: 'c94200814deba4524301e7f2c07ad57e94b6381d', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${((_d = this.chartData) === null || _d === void 0 ? void 0 : _d.title) ? (_e = this.chartData) === null || _e === void 0 ? void 0 : _e.title.toLowerCase() : ''}` }, h("digi-icon-chart", { key: 'ba94cf5a4ad7e4272d78f1965cd63eee99eb9f8f', slot: "icon" }), "Visa diagram"), h("div", { key: 'be79a632683428a30d01a96bf41f1e446b019061', class: "scChartStatus", role: "status", ref: (el) => (this.status = el) })), h("div", { key: 'd3644914ab02ae8cb8a054a1d4c90dc854fdaede', class: "svgWrap", ref: (el) => (this.chartDiv = el) }, h("div", { key: '6cb1113d71b8cd9ec156d351dc4ea402cdf3f372', class: "chartTooltip", id: this.afId }, h("div", { key: '0c601e94970dd3563bec5bfe070a3e02fd339124', class: "tooltipHead" }, h("digi-icon-x", { key: 'a478d1013f6630767b03029f4491222bc35dc118', class: "tooltipClose" })), h("div", { key: '04de1b3898023ef79ec8c69e501d107d8039351d', class: "tooltipBody" }), this.afVariation === BarChartVariation.Horizontal ? (h("digi-icon-caret-up", { class: "caret" })) : (h("digi-icon-caret-down", { class: "caret" })))), h("div", { key: '335550b9c1d64cadc9d72b14af008a2cffcfe58e', class: "legendWrap", ref: (el) => (this.legendDiv = el) }, h("div", { key: '1bd30ebd1a5c1c6342f102f7adc131c6f85bc8d8', class: "legend" })), h("div", { key: '69ddb91b0befa23212d518c27ed018f8c8912c06', class: "table", ref: (el) => (this.tableDiv = el) }, ' ')));
1785
1630
  }
1786
1631
  get hostElement() { return getElement(this); }
1787
1632
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-148a7577.js';
2
2
  import { _ as _t } from './text-26e02c8d.js';
3
- import { s as select, f as dispatch, r as range, a as axisLeft, g as formatLocale, p as polyInOut, b as axisBottom, l as linear, m as max, d as min, o as ordinal, c as interpolate, e as linear$1 } from './linear-0246aaea.js';
3
+ import { s as select, e as dispatch, r as range, a as axisLeft, f as formatLocale, p as polyInOut, b as axisBottom, l as linear, m as max, c as min, o as ordinal, g as interpolate, d as linear$1 } from './linear-78b9219d.js';
4
4
  import { r as randomIdGenerator } from './randomIdGenerator.util-56406f2e.js';
5
5
 
6
6
  function sourceEvent(event) {
@@ -3719,4 +3719,4 @@ function linear() {
3719
3719
  return linearish(scale);
3720
3720
  }
3721
3721
 
3722
- export { axisLeft as a, axisBottom as b, interpolate$1 as c, min as d, linear$1 as e, dispatch as f, formatLocale as g, initRange as i, linear as l, max as m, ordinal as o, polyInOut as p, range as r, select as s };
3722
+ export { axisLeft as a, axisBottom as b, min as c, linear$1 as d, dispatch as e, formatLocale as f, interpolate$1 as g, initRange as i, linear as l, max as m, ordinal as o, polyInOut as p, range as r, select as s };