@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.
- package/components/digi-bar-chart.js +57 -212
- package/components/digi-chart-line.js +1 -1
- package/components/{p-a47b6b5c.js → p-f9a1a787.js} +1 -1
- package/dist/cjs/digi-bar-chart_27.cjs.entry.js +56 -211
- package/dist/collection/components/_chart/bar-chart/bar-chart.js +56 -211
- package/dist/collection/design-tokens/components/_logo.variables.scss +16 -19
- package/dist/digi-arbetsformedlingen/design-tokens/components/_logo.variables.scss +19 -16
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/p-3e51b8bc.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-ccf78233.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-a47b6b5c.js → p-f9a1a787.js} +1 -1
- package/dist/esm/digi-bar-chart_27.entry.js +57 -212
- package/dist/esm/digi-chart-line.entry.js +1 -1
- package/dist/esm/{linear-0246aaea.js → linear-78b9219d.js} +1 -1
- package/hydrate/index.js +56 -211
- package/hydrate/index.mjs +56 -211
- package/package.json +1 -1
- package/dist/digi-arbetsformedlingen/p-0030ed70.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-10dd9a49.entry.js +0 -1
package/hydrate/index.mjs
CHANGED
|
@@ -35809,8 +35809,6 @@ class barChart {
|
|
|
35809
35809
|
// Resizing chart while loading
|
|
35810
35810
|
this.loadingResize = () => {
|
|
35811
35811
|
const newHeight = this.setDims();
|
|
35812
|
-
this.setMargins(true);
|
|
35813
|
-
this.svg.attr('width', this.dims.width).attr('height', this.dims.height);
|
|
35814
35812
|
this.barChartContainer.attr('transform', `translate(${this.margin.left + this.tickPadding + this.yTickSize},0)`);
|
|
35815
35813
|
this.margin.right =
|
|
35816
35814
|
this.getTextSize(this.xScale.domain()[1].toLocaleString()) / 2 +
|
|
@@ -35835,10 +35833,8 @@ class barChart {
|
|
|
35835
35833
|
0,
|
|
35836
35834
|
this.dims.width - this.margin.right - this.margin.left
|
|
35837
35835
|
]);
|
|
35838
|
-
this.barSelection
|
|
35839
|
-
.attr('x', this.xFunction)
|
|
35840
|
-
.attr('width', this.widthFunction);
|
|
35841
35836
|
this.setValueTicks();
|
|
35837
|
+
this.adjustBarSize();
|
|
35842
35838
|
};
|
|
35843
35839
|
this.highlightBarGroup = (_event, datum) => {
|
|
35844
35840
|
if (typeof datum === 'string') {
|
|
@@ -35949,189 +35945,33 @@ class barChart {
|
|
|
35949
35945
|
return 'barGroup' + key.replace(/[^A-Z0-9]+/gi, '');
|
|
35950
35946
|
};
|
|
35951
35947
|
this.updateBars = (fromLoading) => {
|
|
35952
|
-
this.barChartContainer
|
|
35948
|
+
this.barSelection = this.barChartContainer.select('.interactiveElements')
|
|
35953
35949
|
.selectAll('.barGroup')
|
|
35954
35950
|
.data(this.mappedData)
|
|
35955
|
-
.join(
|
|
35956
|
-
|
|
35957
|
-
|
|
35958
|
-
|
|
35959
|
-
|
|
35960
|
-
|
|
35961
|
-
|
|
35962
|
-
|
|
35963
|
-
|
|
35964
|
-
|
|
35965
|
-
|
|
35966
|
-
|
|
35967
|
-
|
|
35968
|
-
|
|
35969
|
-
|
|
35970
|
-
|
|
35971
|
-
|
|
35972
|
-
|
|
35973
|
-
|
|
35974
|
-
|
|
35975
|
-
|
|
35976
|
-
|
|
35977
|
-
|
|
35978
|
-
|
|
35979
|
-
.on('mouseenter', this.hover)
|
|
35980
|
-
.on('mouseleave', this.hoverOut)
|
|
35981
|
-
.on('click', this.openTooltip)
|
|
35982
|
-
.transition()
|
|
35983
|
-
.duration(this.defaultDuration)
|
|
35984
|
-
.ease(polyInOut)
|
|
35985
|
-
.attr('width', this.widthFunction)
|
|
35986
|
-
.attr('y', this.yFunction)
|
|
35987
|
-
.attr('height', this.heightFunction)
|
|
35988
|
-
.attr('fill', '#00005a');
|
|
35989
|
-
if (!((_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.valueLabels))
|
|
35990
|
-
return tempSelection;
|
|
35991
|
-
tempSelection
|
|
35992
|
-
.append('text')
|
|
35993
|
-
.text((d) => d.value.toLocaleString())
|
|
35994
|
-
.attr('class', 'barText')
|
|
35995
|
-
.attr('font-size', this.fontSize)
|
|
35996
|
-
.attr('font-weight', '600')
|
|
35997
|
-
.attr('text-anchor', 'end')
|
|
35998
|
-
.style('pointer-events', 'none')
|
|
35999
|
-
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
36000
|
-
? this.yScale(d.key) + this.yScale.bandwidth() / 2
|
|
36001
|
-
: this.dims.height - this.margin.bottom)
|
|
36002
|
-
.attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
36003
|
-
? 2
|
|
36004
|
-
: this.xScale(d.key) + this.xScale.bandwidth() / 2)
|
|
36005
|
-
.transition()
|
|
36006
|
-
.duration(this.defaultDuration)
|
|
36007
|
-
.ease(polyInOut)
|
|
36008
|
-
.attr('font-size', this.fontSize)
|
|
36009
|
-
.attr('font-weight', '600')
|
|
36010
|
-
.attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
36011
|
-
? this.xScale(d.value)
|
|
36012
|
-
: this.xScale(d.key) + this.xScale.bandwidth() / 2)
|
|
36013
|
-
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
36014
|
-
? this.yScale(d.key) + this.yScale.bandwidth() / 2
|
|
36015
|
-
: this.yScale(d.value))
|
|
36016
|
-
.attr('text-anchor', (d) => {
|
|
36017
|
-
if (this.afVariation === BarChartVariation.Vertical)
|
|
36018
|
-
return 'middle';
|
|
36019
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
36020
|
-
? 'start'
|
|
36021
|
-
: 'end';
|
|
36022
|
-
})
|
|
36023
|
-
.attr('dx', (d) => {
|
|
36024
|
-
if (this.afVariation === BarChartVariation.Horizontal)
|
|
36025
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
36026
|
-
? this.tickPadding
|
|
36027
|
-
: -this.tickPadding;
|
|
36028
|
-
return 0;
|
|
36029
|
-
})
|
|
36030
|
-
.attr('fill', (d) => {
|
|
36031
|
-
if (this.afVariation === BarChartVariation.Vertical)
|
|
36032
|
-
return 'black';
|
|
36033
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
36034
|
-
? 'black'
|
|
36035
|
-
: 'white';
|
|
36036
|
-
})
|
|
36037
|
-
.attr('dy', () => this.afVariation == BarChartVariation.Horizontal
|
|
36038
|
-
? '0.35em'
|
|
36039
|
-
: '-0.25em')
|
|
36040
|
-
.style('pointer-events', 'none')
|
|
36041
|
-
.attrTween('text', (d, i, nodelist) => {
|
|
36042
|
-
const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
|
|
36043
|
-
? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
|
|
36044
|
-
: 0;
|
|
36045
|
-
const interpolatedValue = interpolate$1(oldnum, d.value);
|
|
36046
|
-
return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
|
|
36047
|
-
});
|
|
36048
|
-
return tempSelection;
|
|
36049
|
-
}, (update) => {
|
|
36050
|
-
// Update ids to bars
|
|
36051
|
-
update.attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
|
|
36052
|
-
// Mouse interaction to updated loading bars
|
|
36053
|
-
if (fromLoading) {
|
|
36054
|
-
update
|
|
36055
|
-
.select('rect')
|
|
36056
|
-
.on('mouseenter', this.hover)
|
|
36057
|
-
.on('mouseleave', this.hoverOut)
|
|
36058
|
-
.on('click', this.openTooltip)
|
|
36059
|
-
.attr('x', this.xFunction)
|
|
36060
|
-
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
36061
|
-
? this.yScale(d.key)
|
|
36062
|
-
: this.dims.height - this.margin.bottom)
|
|
36063
|
-
.attr('width', this.widthFunction)
|
|
36064
|
-
.attr('height', () => this.afVariation === BarChartVariation.Horizontal
|
|
36065
|
-
? this.yScale.bandwidth()
|
|
36066
|
-
: 0)
|
|
36067
|
-
.attr('fill', '#00005a')
|
|
36068
|
-
.transition()
|
|
36069
|
-
.duration(this.defaultDuration)
|
|
36070
|
-
.ease(polyInOut)
|
|
36071
|
-
.attr('y', this.yFunction)
|
|
36072
|
-
.attr('height', this.heightFunction)
|
|
36073
|
-
.on('end', () => this.barChartObserver.observe(this.chartDiv)); // Reset barchartObserver
|
|
36074
|
-
}
|
|
36075
|
-
else {
|
|
36076
|
-
update
|
|
36077
|
-
.select('rect')
|
|
36078
|
-
.transition()
|
|
36079
|
-
.duration(this.defaultDuration)
|
|
36080
|
-
.ease(polyInOut)
|
|
36081
|
-
.attr('x', this.xFunction)
|
|
36082
|
-
.attr('y', this.yFunction)
|
|
36083
|
-
.attr('width', this.widthFunction)
|
|
36084
|
-
.attr('height', this.heightFunction)
|
|
36085
|
-
.attr('fill', '#00005a');
|
|
36086
|
-
}
|
|
36087
|
-
return update
|
|
36088
|
-
.select('text')
|
|
36089
|
-
.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'; })
|
|
36090
|
-
.transition()
|
|
36091
|
-
.duration(this.defaultDuration)
|
|
36092
|
-
.ease(polyInOut)
|
|
36093
|
-
.attr('font-size', this.fontSize)
|
|
36094
|
-
.attr('font-weight', '600')
|
|
36095
|
-
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
36096
|
-
? this.yScale(d.key) + this.yScale.bandwidth() / 2
|
|
36097
|
-
: this.yScale(d.value))
|
|
36098
|
-
.attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
36099
|
-
? this.xScale(d.value)
|
|
36100
|
-
: this.xScale(d.key) + this.xScale.bandwidth() / 2)
|
|
36101
|
-
.attr('text-anchor', (d) => {
|
|
36102
|
-
if (this.afVariation === BarChartVariation.Vertical)
|
|
36103
|
-
return 'middle';
|
|
36104
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
36105
|
-
? 'start'
|
|
36106
|
-
: 'end';
|
|
36107
|
-
})
|
|
36108
|
-
.attr('dx', (d) => {
|
|
36109
|
-
if (this.afVariation === BarChartVariation.Horizontal)
|
|
36110
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
36111
|
-
? this.tickPadding
|
|
36112
|
-
: -this.tickPadding;
|
|
36113
|
-
return 0;
|
|
36114
|
-
})
|
|
36115
|
-
.attr('fill', (d) => {
|
|
36116
|
-
if (this.afVariation === BarChartVariation.Vertical)
|
|
36117
|
-
return 'black';
|
|
36118
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
36119
|
-
? 'black'
|
|
36120
|
-
: 'white';
|
|
36121
|
-
})
|
|
36122
|
-
.attr('dy', () => this.afVariation == BarChartVariation.Horizontal
|
|
36123
|
-
? '0.35em'
|
|
36124
|
-
: '-0.25em')
|
|
36125
|
-
.style('pointer-events', 'none')
|
|
36126
|
-
.attrTween('text', (d, i, nodelist) => {
|
|
36127
|
-
const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
|
|
36128
|
-
? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
|
|
36129
|
-
: 0;
|
|
36130
|
-
const interpolatedValue = interpolate$1(oldnum, d.value);
|
|
36131
|
-
return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
|
|
36132
|
-
});
|
|
36133
|
-
}, (exit) => exit.remove());
|
|
36134
|
-
this.barSelection = this.barChartContainer.selectAll('rect');
|
|
35951
|
+
.join('g')
|
|
35952
|
+
.attr('class', 'barGroup')
|
|
35953
|
+
.attr('id', (d) => this.barGroupID(d.key));
|
|
35954
|
+
this.barSelection.selectAll('.bar')
|
|
35955
|
+
.data((d) => {
|
|
35956
|
+
return d.series;
|
|
35957
|
+
})
|
|
35958
|
+
.join('rect')
|
|
35959
|
+
.attr('class', 'bar')
|
|
35960
|
+
.style('cursor', 'pointer')
|
|
35961
|
+
.attr('x', this.xFunction)
|
|
35962
|
+
.attr('y', this.yFunction)
|
|
35963
|
+
.attr('ry', 4)
|
|
35964
|
+
.attr('rx', 4)
|
|
35965
|
+
.attr('width', this.widthFunction)
|
|
35966
|
+
.attr('height', this.heightFunction)
|
|
35967
|
+
.attr('fill', (d) => this.colorFunction(d.serie))
|
|
35968
|
+
.on('mouseenter', this.hover)
|
|
35969
|
+
.on('mouseleave', this.hoverOut)
|
|
35970
|
+
.on('click', this.openTooltip);
|
|
35971
|
+
if (fromLoading) {
|
|
35972
|
+
this.initLegend();
|
|
35973
|
+
}
|
|
35974
|
+
this.barSelection = this.barChartContainer.selectAll('.barGroup');
|
|
36135
35975
|
this.textSelection = this.barChartContainer.selectAll('.barText');
|
|
36136
35976
|
};
|
|
36137
35977
|
// Setting position of text according to bar size
|
|
@@ -36170,7 +36010,7 @@ class barChart {
|
|
|
36170
36010
|
};
|
|
36171
36011
|
this.reshapeData = () => {
|
|
36172
36012
|
const toReturn = [];
|
|
36173
|
-
if (
|
|
36013
|
+
if (!this.chartData) {
|
|
36174
36014
|
this.placeholderTicks.forEach((key) => {
|
|
36175
36015
|
const tick = { key: key, series: [] };
|
|
36176
36016
|
tick.series.push({
|
|
@@ -36545,11 +36385,11 @@ class barChart {
|
|
|
36545
36385
|
.html((d) => {
|
|
36546
36386
|
return `<span>${d.serie}: <b style="font-weight:600;">${d.value.toLocaleString(undefined, this.numberFormat)}</b></span>`;
|
|
36547
36387
|
});
|
|
36548
|
-
this.tooltip.style('
|
|
36388
|
+
this.tooltip.style('display', null);
|
|
36549
36389
|
this.positionTooltip(this.tooltipData);
|
|
36550
36390
|
};
|
|
36551
36391
|
this.closeTooltip = () => {
|
|
36552
|
-
this.tooltip.style('
|
|
36392
|
+
this.tooltip.style('display', 'none');
|
|
36553
36393
|
};
|
|
36554
36394
|
// Positions tooltip in horizontal mode
|
|
36555
36395
|
this.positionTooltip = (data) => {
|
|
@@ -36688,12 +36528,13 @@ class barChart {
|
|
|
36688
36528
|
this.afChartData = undefined;
|
|
36689
36529
|
}
|
|
36690
36530
|
afChartDataUpdate(data) {
|
|
36691
|
-
if (typeof data
|
|
36692
|
-
|
|
36693
|
-
|
|
36694
|
-
|
|
36695
|
-
|
|
36531
|
+
if (typeof data === 'string' && Object.keys(JSON.parse(data)).length > 0 || Object.keys(data).length > 0) {
|
|
36532
|
+
if (typeof data != 'string')
|
|
36533
|
+
this.chartData = data;
|
|
36534
|
+
else
|
|
36535
|
+
this.chartData = JSON.parse(data);
|
|
36696
36536
|
this.series = this.chartData.data.series.map(serie => serie.title);
|
|
36537
|
+
}
|
|
36697
36538
|
this.mappedData = this.reshapeData();
|
|
36698
36539
|
// checking for width of each tick
|
|
36699
36540
|
this.mappedData.forEach((elem) => {
|
|
@@ -36784,7 +36625,7 @@ class barChart {
|
|
|
36784
36625
|
// Getting handle for tooltip
|
|
36785
36626
|
this.tooltip = select('#' + this.afId);
|
|
36786
36627
|
this.tooltip.select('.tooltipClose').on('click', this.closeTooltip);
|
|
36787
|
-
|
|
36628
|
+
this.tooltip.selectAll('.tooltipHeading').remove();
|
|
36788
36629
|
this.tooltip
|
|
36789
36630
|
.select('.tooltipHead')
|
|
36790
36631
|
.insert('h' + (parseInt(this.afHeadingLevel.replace(/\D/g, '')) + 1), ':first-child') // increment heading level by one
|
|
@@ -36792,7 +36633,7 @@ class barChart {
|
|
|
36792
36633
|
.style('font-size', '1rem')
|
|
36793
36634
|
.style('margin', '0 0.75rem 0.25rem 0 ')
|
|
36794
36635
|
.style('font-weight', '500');
|
|
36795
|
-
this.tooltip.style('
|
|
36636
|
+
this.tooltip.style('display', 'none');
|
|
36796
36637
|
}
|
|
36797
36638
|
initEmpty() {
|
|
36798
36639
|
select(this.chartDiv).select('.chartSVG').remove();
|
|
@@ -36812,20 +36653,20 @@ class barChart {
|
|
|
36812
36653
|
.attr('role', 'img')
|
|
36813
36654
|
.attr('aria-label', this.chartData && this.chartData.title
|
|
36814
36655
|
? 'Stapeldiagram om ' + this.chartData.title.toLowerCase()
|
|
36815
|
-
: 'Stapeldiagram');
|
|
36656
|
+
: 'Stapeldiagram').attr('style', 'display: flex;min-width: 0;width: 100%;height: auto;');
|
|
36816
36657
|
// Hide unusable components
|
|
36817
36658
|
select(this.titleDiv)
|
|
36818
|
-
.
|
|
36659
|
+
.append(this.afHeadingLevel)
|
|
36660
|
+
.attr('class', 'loadingHeader')
|
|
36819
36661
|
.html(`${_t.loading}...`);
|
|
36820
36662
|
this.initYAxis(true);
|
|
36821
36663
|
this.initXAxis(true);
|
|
36822
36664
|
this.tooltip = select('#' + this.afId);
|
|
36823
|
-
this.tooltip.style('
|
|
36665
|
+
this.tooltip.style('display', 'none');
|
|
36824
36666
|
this.loadingState(true);
|
|
36825
36667
|
}
|
|
36826
36668
|
loadingState(empty) {
|
|
36827
36669
|
this.loading = true;
|
|
36828
|
-
console.log('loading!');
|
|
36829
36670
|
// close potentially open tooltip
|
|
36830
36671
|
if (this.tooltip)
|
|
36831
36672
|
this.closeTooltip();
|
|
@@ -36865,14 +36706,17 @@ class barChart {
|
|
|
36865
36706
|
this.xAxisHandle.attr('transform', `translate(0,${this.dims.height - this.margin.bottom})`);
|
|
36866
36707
|
}
|
|
36867
36708
|
const animateBars = () => {
|
|
36868
|
-
this.barChartContainer.selectAll('.
|
|
36709
|
+
this.barChartContainer.selectAll('.interactiveElements').remove();
|
|
36869
36710
|
this.barSelection = this.barChartContainer
|
|
36711
|
+
.append('g')
|
|
36712
|
+
.attr('class', 'interactiveElements')
|
|
36713
|
+
.style('isolation', 'isolate')
|
|
36870
36714
|
.selectAll('barGroup')
|
|
36871
36715
|
.data(this.mappedData)
|
|
36872
36716
|
.join('g')
|
|
36873
36717
|
.attr('class', 'barGroup')
|
|
36874
|
-
.attr('id', (d) =>
|
|
36875
|
-
this.barSelection.selectAll('
|
|
36718
|
+
.attr('id', (d) => this.barGroupID(d.key));
|
|
36719
|
+
this.barSelection.selectAll('bar')
|
|
36876
36720
|
.data((d) => {
|
|
36877
36721
|
return d.series;
|
|
36878
36722
|
})
|
|
@@ -36894,7 +36738,7 @@ class barChart {
|
|
|
36894
36738
|
.attr('y', this.yFunction)
|
|
36895
36739
|
.attr('height', this.heightFunction);
|
|
36896
36740
|
this.barChartContainer.selectAll('.bar')
|
|
36897
|
-
.transition()
|
|
36741
|
+
.transition('animateBar')
|
|
36898
36742
|
.duration(400)
|
|
36899
36743
|
.ease(linear$1)
|
|
36900
36744
|
.delay((...[, i]) => i * 150 + 400)
|
|
@@ -36909,8 +36753,8 @@ class barChart {
|
|
|
36909
36753
|
};
|
|
36910
36754
|
const flattenBars = () => {
|
|
36911
36755
|
this.barChartContainer
|
|
36912
|
-
.selectAll('
|
|
36913
|
-
.transition()
|
|
36756
|
+
.selectAll('.bar')
|
|
36757
|
+
.transition('animateBar')
|
|
36914
36758
|
.duration(200)
|
|
36915
36759
|
.ease(linear$1)
|
|
36916
36760
|
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
@@ -37146,10 +36990,11 @@ class barChart {
|
|
|
37146
36990
|
]);
|
|
37147
36991
|
this.setNamedTicks(true);
|
|
37148
36992
|
// Stop animation
|
|
37149
|
-
this.
|
|
36993
|
+
this.barChartContainer.selectAll('.barGroup').on('end', null);
|
|
36994
|
+
select(this.titleDiv).select('.loadingHeader').remove();
|
|
37150
36995
|
this.loading = false;
|
|
37151
|
-
this.
|
|
37152
|
-
|
|
36996
|
+
this.barChartContainer.selectAll('.bar').interrupt('animateBar');
|
|
36997
|
+
this.barChartContainer.selectAll('.bar').transition()
|
|
37153
36998
|
.duration(this.defaultDuration)
|
|
37154
36999
|
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
37155
37000
|
? this.yScale(d.key)
|
|
@@ -37219,7 +37064,7 @@ class barChart {
|
|
|
37219
37064
|
this.averageLine();
|
|
37220
37065
|
this.adjustBarSize();
|
|
37221
37066
|
this.adjustBarText();
|
|
37222
|
-
if (this.tooltip.style('
|
|
37067
|
+
if (this.tooltip.style('display') !== 'none')
|
|
37223
37068
|
this.positionTooltip(this.tooltipData);
|
|
37224
37069
|
}
|
|
37225
37070
|
// Returns the longest text from an array of strings
|
|
@@ -37339,7 +37184,7 @@ class barChart {
|
|
|
37339
37184
|
<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>`;
|
|
37340
37185
|
}
|
|
37341
37186
|
}
|
|
37342
|
-
return (hAsync(Host, { key: '
|
|
37187
|
+
return (hAsync(Host, { key: '2e011f2838668e9d58a6b4442e2832b6e1bac21b', ref: (el) => (this.host = el) }, hAsync("svg", { key: 'a91c7bc7ed311fd10f0014d382daf46d97524087', xmlns: "http://www.w3.org/2000/svg", width: "0", height: "0" }, hAsync("defs", { key: 'b28ad4ff2f0029eecd3a7b220d97ae81c646f6d0' }, hAsync("pattern", { key: '2bb838607089932d089c05fdb568e06782cd6ef6', id: "prognosis", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: '4eca3d7dbb9cd2d47bc6367a8f07808ba3767902', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar(this.colorPalettes[0]), "stroke-width": "8" })), hAsync("pattern", { key: '87585e674cc45c2496650eb5309f4eee34f89b3a', id: "prognosisInactive", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: '42bfe1a59192f618e60486105e919b2569fef753', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar('--digi--color--background--secondary-accent'), "stroke-width": "8" })), hAsync("pattern", { key: '2ab36682ad76783cda635db815fc9f5f542fab21', id: "prognosisHighlight", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: 'd5b93bf96f259cdf093a3e61c38ef61bbfd565ba', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.adjustColor(this.colorFunction(0), 50), "stroke-width": "8" })))), hAsync("div", { key: 'f94c18afa372d176500c2d3844212df29c83f16b', class: "topWrapper", ref: (el) => (this.titleDiv = el) }, hAsync("digi-typography", { key: '68dca23f7fd92f024f0b3d7eebc7b7214e636090', class: "chartTitle", innerHTML: heading }), hAsync("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() : ''}` }, hAsync("digi-icon-table", { key: '36d1e6f12b90215ba6ce00b814573616772820e7', slot: "icon" }), "Visa tabell"), hAsync("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() : ''}` }, hAsync("digi-icon-chart", { key: 'ba94cf5a4ad7e4272d78f1965cd63eee99eb9f8f', slot: "icon" }), "Visa diagram"), hAsync("div", { key: 'be79a632683428a30d01a96bf41f1e446b019061', class: "scChartStatus", role: "status", ref: (el) => (this.status = el) })), hAsync("div", { key: 'd3644914ab02ae8cb8a054a1d4c90dc854fdaede', class: "svgWrap", ref: (el) => (this.chartDiv = el) }, hAsync("div", { key: '6cb1113d71b8cd9ec156d351dc4ea402cdf3f372', class: "chartTooltip", id: this.afId }, hAsync("div", { key: '0c601e94970dd3563bec5bfe070a3e02fd339124', class: "tooltipHead" }, hAsync("digi-icon-x", { key: 'a478d1013f6630767b03029f4491222bc35dc118', class: "tooltipClose" })), hAsync("div", { key: '04de1b3898023ef79ec8c69e501d107d8039351d', class: "tooltipBody" }), this.afVariation === BarChartVariation.Horizontal ? (hAsync("digi-icon-caret-up", { class: "caret" })) : (hAsync("digi-icon-caret-down", { class: "caret" })))), hAsync("div", { key: '335550b9c1d64cadc9d72b14af008a2cffcfe58e', class: "legendWrap", ref: (el) => (this.legendDiv = el) }, hAsync("div", { key: '1bd30ebd1a5c1c6342f102f7adc131c6f85bc8d8', class: "legend" })), hAsync("div", { key: '69ddb91b0befa23212d518c27ed018f8c8912c06', class: "table", ref: (el) => (this.tableDiv = el) }, ' ')));
|
|
37343
37188
|
}
|
|
37344
37189
|
get hostElement() { return getElement(this); }
|
|
37345
37190
|
static get watchers() { return {
|
package/package.json
CHANGED