@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
|
@@ -127,8 +127,6 @@ export class barChart {
|
|
|
127
127
|
// Resizing chart while loading
|
|
128
128
|
this.loadingResize = () => {
|
|
129
129
|
const newHeight = this.setDims();
|
|
130
|
-
this.setMargins(true);
|
|
131
|
-
this.svg.attr('width', this.dims.width).attr('height', this.dims.height);
|
|
132
130
|
this.barChartContainer.attr('transform', `translate(${this.margin.left + this.tickPadding + this.yTickSize},0)`);
|
|
133
131
|
this.margin.right =
|
|
134
132
|
this.getTextSize(this.xScale.domain()[1].toLocaleString()) / 2 +
|
|
@@ -153,10 +151,8 @@ export class barChart {
|
|
|
153
151
|
0,
|
|
154
152
|
this.dims.width - this.margin.right - this.margin.left
|
|
155
153
|
]);
|
|
156
|
-
this.barSelection
|
|
157
|
-
.attr('x', this.xFunction)
|
|
158
|
-
.attr('width', this.widthFunction);
|
|
159
154
|
this.setValueTicks();
|
|
155
|
+
this.adjustBarSize();
|
|
160
156
|
};
|
|
161
157
|
this.highlightBarGroup = (_event, datum) => {
|
|
162
158
|
if (typeof datum === 'string') {
|
|
@@ -271,189 +267,33 @@ export class barChart {
|
|
|
271
267
|
return 'barGroup' + key.replace(/[^A-Z0-9]+/gi, '');
|
|
272
268
|
};
|
|
273
269
|
this.updateBars = (fromLoading) => {
|
|
274
|
-
this.barChartContainer
|
|
270
|
+
this.barSelection = this.barChartContainer.select('.interactiveElements')
|
|
275
271
|
.selectAll('.barGroup')
|
|
276
272
|
.data(this.mappedData)
|
|
277
|
-
.join(
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
.on('mouseenter', this.hover)
|
|
302
|
-
.on('mouseleave', this.hoverOut)
|
|
303
|
-
.on('click', this.openTooltip)
|
|
304
|
-
.transition()
|
|
305
|
-
.duration(this.defaultDuration)
|
|
306
|
-
.ease(d3.easePolyInOut)
|
|
307
|
-
.attr('width', this.widthFunction)
|
|
308
|
-
.attr('y', this.yFunction)
|
|
309
|
-
.attr('height', this.heightFunction)
|
|
310
|
-
.attr('fill', '#00005a');
|
|
311
|
-
if (!((_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.valueLabels))
|
|
312
|
-
return tempSelection;
|
|
313
|
-
tempSelection
|
|
314
|
-
.append('text')
|
|
315
|
-
.text((d) => d.value.toLocaleString())
|
|
316
|
-
.attr('class', 'barText')
|
|
317
|
-
.attr('font-size', this.fontSize)
|
|
318
|
-
.attr('font-weight', '600')
|
|
319
|
-
.attr('text-anchor', 'end')
|
|
320
|
-
.style('pointer-events', 'none')
|
|
321
|
-
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
322
|
-
? this.yScale(d.key) + this.yScale.bandwidth() / 2
|
|
323
|
-
: this.dims.height - this.margin.bottom)
|
|
324
|
-
.attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
325
|
-
? 2
|
|
326
|
-
: this.xScale(d.key) + this.xScale.bandwidth() / 2)
|
|
327
|
-
.transition()
|
|
328
|
-
.duration(this.defaultDuration)
|
|
329
|
-
.ease(d3.easePolyInOut)
|
|
330
|
-
.attr('font-size', this.fontSize)
|
|
331
|
-
.attr('font-weight', '600')
|
|
332
|
-
.attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
333
|
-
? this.xScale(d.value)
|
|
334
|
-
: this.xScale(d.key) + this.xScale.bandwidth() / 2)
|
|
335
|
-
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
336
|
-
? this.yScale(d.key) + this.yScale.bandwidth() / 2
|
|
337
|
-
: this.yScale(d.value))
|
|
338
|
-
.attr('text-anchor', (d) => {
|
|
339
|
-
if (this.afVariation === BarChartVariation.Vertical)
|
|
340
|
-
return 'middle';
|
|
341
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
342
|
-
? 'start'
|
|
343
|
-
: 'end';
|
|
344
|
-
})
|
|
345
|
-
.attr('dx', (d) => {
|
|
346
|
-
if (this.afVariation === BarChartVariation.Horizontal)
|
|
347
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
348
|
-
? this.tickPadding
|
|
349
|
-
: -this.tickPadding;
|
|
350
|
-
return 0;
|
|
351
|
-
})
|
|
352
|
-
.attr('fill', (d) => {
|
|
353
|
-
if (this.afVariation === BarChartVariation.Vertical)
|
|
354
|
-
return 'black';
|
|
355
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
356
|
-
? 'black'
|
|
357
|
-
: 'white';
|
|
358
|
-
})
|
|
359
|
-
.attr('dy', () => this.afVariation == BarChartVariation.Horizontal
|
|
360
|
-
? '0.35em'
|
|
361
|
-
: '-0.25em')
|
|
362
|
-
.style('pointer-events', 'none')
|
|
363
|
-
.attrTween('text', (d, i, nodelist) => {
|
|
364
|
-
const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
|
|
365
|
-
? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
|
|
366
|
-
: 0;
|
|
367
|
-
const interpolatedValue = d3.interpolate(oldnum, d.value);
|
|
368
|
-
return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
|
|
369
|
-
});
|
|
370
|
-
return tempSelection;
|
|
371
|
-
}, (update) => {
|
|
372
|
-
// Update ids to bars
|
|
373
|
-
update.attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
|
|
374
|
-
// Mouse interaction to updated loading bars
|
|
375
|
-
if (fromLoading) {
|
|
376
|
-
update
|
|
377
|
-
.select('rect')
|
|
378
|
-
.on('mouseenter', this.hover)
|
|
379
|
-
.on('mouseleave', this.hoverOut)
|
|
380
|
-
.on('click', this.openTooltip)
|
|
381
|
-
.attr('x', this.xFunction)
|
|
382
|
-
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
383
|
-
? this.yScale(d.key)
|
|
384
|
-
: this.dims.height - this.margin.bottom)
|
|
385
|
-
.attr('width', this.widthFunction)
|
|
386
|
-
.attr('height', () => this.afVariation === BarChartVariation.Horizontal
|
|
387
|
-
? this.yScale.bandwidth()
|
|
388
|
-
: 0)
|
|
389
|
-
.attr('fill', '#00005a')
|
|
390
|
-
.transition()
|
|
391
|
-
.duration(this.defaultDuration)
|
|
392
|
-
.ease(d3.easePolyInOut)
|
|
393
|
-
.attr('y', this.yFunction)
|
|
394
|
-
.attr('height', this.heightFunction)
|
|
395
|
-
.on('end', () => this.barChartObserver.observe(this.chartDiv)); // Reset barchartObserver
|
|
396
|
-
}
|
|
397
|
-
else {
|
|
398
|
-
update
|
|
399
|
-
.select('rect')
|
|
400
|
-
.transition()
|
|
401
|
-
.duration(this.defaultDuration)
|
|
402
|
-
.ease(d3.easePolyInOut)
|
|
403
|
-
.attr('x', this.xFunction)
|
|
404
|
-
.attr('y', this.yFunction)
|
|
405
|
-
.attr('width', this.widthFunction)
|
|
406
|
-
.attr('height', this.heightFunction)
|
|
407
|
-
.attr('fill', '#00005a');
|
|
408
|
-
}
|
|
409
|
-
return update
|
|
410
|
-
.select('text')
|
|
411
|
-
.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'; })
|
|
412
|
-
.transition()
|
|
413
|
-
.duration(this.defaultDuration)
|
|
414
|
-
.ease(d3.easePolyInOut)
|
|
415
|
-
.attr('font-size', this.fontSize)
|
|
416
|
-
.attr('font-weight', '600')
|
|
417
|
-
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
418
|
-
? this.yScale(d.key) + this.yScale.bandwidth() / 2
|
|
419
|
-
: this.yScale(d.value))
|
|
420
|
-
.attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
421
|
-
? this.xScale(d.value)
|
|
422
|
-
: this.xScale(d.key) + this.xScale.bandwidth() / 2)
|
|
423
|
-
.attr('text-anchor', (d) => {
|
|
424
|
-
if (this.afVariation === BarChartVariation.Vertical)
|
|
425
|
-
return 'middle';
|
|
426
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
427
|
-
? 'start'
|
|
428
|
-
: 'end';
|
|
429
|
-
})
|
|
430
|
-
.attr('dx', (d) => {
|
|
431
|
-
if (this.afVariation === BarChartVariation.Horizontal)
|
|
432
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
433
|
-
? this.tickPadding
|
|
434
|
-
: -this.tickPadding;
|
|
435
|
-
return 0;
|
|
436
|
-
})
|
|
437
|
-
.attr('fill', (d) => {
|
|
438
|
-
if (this.afVariation === BarChartVariation.Vertical)
|
|
439
|
-
return 'black';
|
|
440
|
-
return this.xScale(d.value) < d.len + this.tickPadding * 2
|
|
441
|
-
? 'black'
|
|
442
|
-
: 'white';
|
|
443
|
-
})
|
|
444
|
-
.attr('dy', () => this.afVariation == BarChartVariation.Horizontal
|
|
445
|
-
? '0.35em'
|
|
446
|
-
: '-0.25em')
|
|
447
|
-
.style('pointer-events', 'none')
|
|
448
|
-
.attrTween('text', (d, i, nodelist) => {
|
|
449
|
-
const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
|
|
450
|
-
? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
|
|
451
|
-
: 0;
|
|
452
|
-
const interpolatedValue = d3.interpolate(oldnum, d.value);
|
|
453
|
-
return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
|
|
454
|
-
});
|
|
455
|
-
}, (exit) => exit.remove());
|
|
456
|
-
this.barSelection = this.barChartContainer.selectAll('rect');
|
|
273
|
+
.join('g')
|
|
274
|
+
.attr('class', 'barGroup')
|
|
275
|
+
.attr('id', (d) => this.barGroupID(d.key));
|
|
276
|
+
this.barSelection.selectAll('.bar')
|
|
277
|
+
.data((d) => {
|
|
278
|
+
return d.series;
|
|
279
|
+
})
|
|
280
|
+
.join('rect')
|
|
281
|
+
.attr('class', 'bar')
|
|
282
|
+
.style('cursor', 'pointer')
|
|
283
|
+
.attr('x', this.xFunction)
|
|
284
|
+
.attr('y', this.yFunction)
|
|
285
|
+
.attr('ry', 4)
|
|
286
|
+
.attr('rx', 4)
|
|
287
|
+
.attr('width', this.widthFunction)
|
|
288
|
+
.attr('height', this.heightFunction)
|
|
289
|
+
.attr('fill', (d) => this.colorFunction(d.serie))
|
|
290
|
+
.on('mouseenter', this.hover)
|
|
291
|
+
.on('mouseleave', this.hoverOut)
|
|
292
|
+
.on('click', this.openTooltip);
|
|
293
|
+
if (fromLoading) {
|
|
294
|
+
this.initLegend();
|
|
295
|
+
}
|
|
296
|
+
this.barSelection = this.barChartContainer.selectAll('.barGroup');
|
|
457
297
|
this.textSelection = this.barChartContainer.selectAll('.barText');
|
|
458
298
|
};
|
|
459
299
|
// Setting position of text according to bar size
|
|
@@ -492,7 +332,7 @@ export class barChart {
|
|
|
492
332
|
};
|
|
493
333
|
this.reshapeData = () => {
|
|
494
334
|
const toReturn = [];
|
|
495
|
-
if (
|
|
335
|
+
if (!this.chartData) {
|
|
496
336
|
this.placeholderTicks.forEach((key) => {
|
|
497
337
|
const tick = { key: key, series: [] };
|
|
498
338
|
tick.series.push({
|
|
@@ -867,11 +707,11 @@ export class barChart {
|
|
|
867
707
|
.html((d) => {
|
|
868
708
|
return `<span>${d.serie}: <b style="font-weight:600;">${d.value.toLocaleString(undefined, this.numberFormat)}</b></span>`;
|
|
869
709
|
});
|
|
870
|
-
this.tooltip.style('
|
|
710
|
+
this.tooltip.style('display', null);
|
|
871
711
|
this.positionTooltip(this.tooltipData);
|
|
872
712
|
};
|
|
873
713
|
this.closeTooltip = () => {
|
|
874
|
-
this.tooltip.style('
|
|
714
|
+
this.tooltip.style('display', 'none');
|
|
875
715
|
};
|
|
876
716
|
// Positions tooltip in horizontal mode
|
|
877
717
|
this.positionTooltip = (data) => {
|
|
@@ -1010,12 +850,13 @@ export class barChart {
|
|
|
1010
850
|
this.afChartData = undefined;
|
|
1011
851
|
}
|
|
1012
852
|
afChartDataUpdate(data) {
|
|
1013
|
-
if (typeof data
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
853
|
+
if (typeof data === 'string' && Object.keys(JSON.parse(data)).length > 0 || Object.keys(data).length > 0) {
|
|
854
|
+
if (typeof data != 'string')
|
|
855
|
+
this.chartData = data;
|
|
856
|
+
else
|
|
857
|
+
this.chartData = JSON.parse(data);
|
|
1018
858
|
this.series = this.chartData.data.series.map(serie => serie.title);
|
|
859
|
+
}
|
|
1019
860
|
this.mappedData = this.reshapeData();
|
|
1020
861
|
// checking for width of each tick
|
|
1021
862
|
this.mappedData.forEach((elem) => {
|
|
@@ -1108,7 +949,7 @@ export class barChart {
|
|
|
1108
949
|
// Getting handle for tooltip
|
|
1109
950
|
this.tooltip = d3.select('#' + this.afId);
|
|
1110
951
|
this.tooltip.select('.tooltipClose').on('click', this.closeTooltip);
|
|
1111
|
-
|
|
952
|
+
this.tooltip.selectAll('.tooltipHeading').remove();
|
|
1112
953
|
this.tooltip
|
|
1113
954
|
.select('.tooltipHead')
|
|
1114
955
|
.insert('h' + (parseInt(this.afHeadingLevel.replace(/\D/g, '')) + 1), ':first-child') // increment heading level by one
|
|
@@ -1116,7 +957,7 @@ export class barChart {
|
|
|
1116
957
|
.style('font-size', '1rem')
|
|
1117
958
|
.style('margin', '0 0.75rem 0.25rem 0 ')
|
|
1118
959
|
.style('font-weight', '500');
|
|
1119
|
-
this.tooltip.style('
|
|
960
|
+
this.tooltip.style('display', 'none');
|
|
1120
961
|
}
|
|
1121
962
|
initEmpty() {
|
|
1122
963
|
d3.select(this.chartDiv).select('.chartSVG').remove();
|
|
@@ -1138,20 +979,20 @@ export class barChart {
|
|
|
1138
979
|
.attr('role', 'img')
|
|
1139
980
|
.attr('aria-label', this.chartData && this.chartData.title
|
|
1140
981
|
? 'Stapeldiagram om ' + this.chartData.title.toLowerCase()
|
|
1141
|
-
: 'Stapeldiagram');
|
|
982
|
+
: 'Stapeldiagram').attr('style', 'display: flex;min-width: 0;width: 100%;height: auto;');
|
|
1142
983
|
// Hide unusable components
|
|
1143
984
|
d3.select(this.titleDiv)
|
|
1144
|
-
.
|
|
985
|
+
.append(this.afHeadingLevel)
|
|
986
|
+
.attr('class', 'loadingHeader')
|
|
1145
987
|
.html(`${_t.loading}...`);
|
|
1146
988
|
this.initYAxis(true);
|
|
1147
989
|
this.initXAxis(true);
|
|
1148
990
|
this.tooltip = d3.select('#' + this.afId);
|
|
1149
|
-
this.tooltip.style('
|
|
991
|
+
this.tooltip.style('display', 'none');
|
|
1150
992
|
this.loadingState(true);
|
|
1151
993
|
}
|
|
1152
994
|
loadingState(empty) {
|
|
1153
995
|
this.loading = true;
|
|
1154
|
-
console.log('loading!');
|
|
1155
996
|
// close potentially open tooltip
|
|
1156
997
|
if (this.tooltip)
|
|
1157
998
|
this.closeTooltip();
|
|
@@ -1191,14 +1032,17 @@ export class barChart {
|
|
|
1191
1032
|
this.xAxisHandle.attr('transform', `translate(0,${this.dims.height - this.margin.bottom})`);
|
|
1192
1033
|
}
|
|
1193
1034
|
const animateBars = () => {
|
|
1194
|
-
this.barChartContainer.selectAll('.
|
|
1035
|
+
this.barChartContainer.selectAll('.interactiveElements').remove();
|
|
1195
1036
|
this.barSelection = this.barChartContainer
|
|
1037
|
+
.append('g')
|
|
1038
|
+
.attr('class', 'interactiveElements')
|
|
1039
|
+
.style('isolation', 'isolate')
|
|
1196
1040
|
.selectAll('barGroup')
|
|
1197
1041
|
.data(this.mappedData)
|
|
1198
1042
|
.join('g')
|
|
1199
1043
|
.attr('class', 'barGroup')
|
|
1200
|
-
.attr('id', (d) =>
|
|
1201
|
-
this.barSelection.selectAll('
|
|
1044
|
+
.attr('id', (d) => this.barGroupID(d.key));
|
|
1045
|
+
this.barSelection.selectAll('bar')
|
|
1202
1046
|
.data((d) => {
|
|
1203
1047
|
return d.series;
|
|
1204
1048
|
})
|
|
@@ -1220,7 +1064,7 @@ export class barChart {
|
|
|
1220
1064
|
.attr('y', this.yFunction)
|
|
1221
1065
|
.attr('height', this.heightFunction);
|
|
1222
1066
|
this.barChartContainer.selectAll('.bar')
|
|
1223
|
-
.transition()
|
|
1067
|
+
.transition('animateBar')
|
|
1224
1068
|
.duration(400)
|
|
1225
1069
|
.ease(d3.easeLinear)
|
|
1226
1070
|
.delay((...[, i]) => i * 150 + 400)
|
|
@@ -1235,8 +1079,8 @@ export class barChart {
|
|
|
1235
1079
|
};
|
|
1236
1080
|
const flattenBars = () => {
|
|
1237
1081
|
this.barChartContainer
|
|
1238
|
-
.selectAll('
|
|
1239
|
-
.transition()
|
|
1082
|
+
.selectAll('.bar')
|
|
1083
|
+
.transition('animateBar')
|
|
1240
1084
|
.duration(200)
|
|
1241
1085
|
.ease(d3.easeLinear)
|
|
1242
1086
|
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
@@ -1473,10 +1317,11 @@ export class barChart {
|
|
|
1473
1317
|
]);
|
|
1474
1318
|
this.setNamedTicks(true);
|
|
1475
1319
|
// Stop animation
|
|
1476
|
-
this.
|
|
1320
|
+
this.barChartContainer.selectAll('.barGroup').on('end', null);
|
|
1321
|
+
d3.select(this.titleDiv).select('.loadingHeader').remove();
|
|
1477
1322
|
this.loading = false;
|
|
1478
|
-
this.
|
|
1479
|
-
|
|
1323
|
+
this.barChartContainer.selectAll('.bar').interrupt('animateBar');
|
|
1324
|
+
this.barChartContainer.selectAll('.bar').transition()
|
|
1480
1325
|
.duration(this.defaultDuration)
|
|
1481
1326
|
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
1482
1327
|
? this.yScale(d.key)
|
|
@@ -1546,7 +1391,7 @@ export class barChart {
|
|
|
1546
1391
|
this.averageLine();
|
|
1547
1392
|
this.adjustBarSize();
|
|
1548
1393
|
this.adjustBarText();
|
|
1549
|
-
if (this.tooltip.style('
|
|
1394
|
+
if (this.tooltip.style('display') !== 'none')
|
|
1550
1395
|
this.positionTooltip(this.tooltipData);
|
|
1551
1396
|
}
|
|
1552
1397
|
// Returns the longest text from an array of strings
|
|
@@ -1666,7 +1511,7 @@ export class barChart {
|
|
|
1666
1511
|
<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>`;
|
|
1667
1512
|
}
|
|
1668
1513
|
}
|
|
1669
|
-
return (h(Host, { key: '
|
|
1514
|
+
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) }, ' ')));
|
|
1670
1515
|
}
|
|
1671
1516
|
static get is() { return "digi-bar-chart"; }
|
|
1672
1517
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
--digi--logo
|
|
5
|
-
--digi--logo--
|
|
6
|
-
--digi--logo
|
|
7
|
-
--digi--logo
|
|
8
|
-
|
|
9
|
-
--digi--logo
|
|
10
|
-
--digi--logo
|
|
11
|
-
--digi--logo
|
|
12
|
-
--digi--logo
|
|
13
|
-
|
|
14
|
-
--digi--logo
|
|
15
|
-
--digi--logo
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
--digi--logo--color--border--primary: var(--digi--color--text--primary);
|
|
19
|
-
--digi--logo--color--border--secondary: var(--digi--color--text--secondary);
|
|
1
|
+
@mixin digi-title-logo--variables() {
|
|
2
|
+
--digi--title-logo-text-color: var(--digi--color--text--primary);
|
|
3
|
+
--digi--title-logo-font-weight: var(--digi--global--typography--font-weight--bold);
|
|
4
|
+
--digi--title-logo-font-size: var(--digi--typography--title-logo--font-size--mobile);
|
|
5
|
+
--digi--title-logo-font-size-small: var(--digi--global--typography--font-size--large);
|
|
6
|
+
--digi--title-logo-line-height-small: 1.25rem;
|
|
7
|
+
--digi--title-logo-symbol-color: var(--digi--color--logotype-color);
|
|
8
|
+
--digi--title-logo-symbol-width: 36px;
|
|
9
|
+
--digi--title-logo-symbol-height: 36px;
|
|
10
|
+
--digi--title-logo-symbol-width-mobile: 44px;
|
|
11
|
+
--digi--title-logo-symbol-height-mobile: 44px;
|
|
12
|
+
--digi--title-logo-text-height: 40px;
|
|
13
|
+
--digi--title-logo-border-width: var(--digi--global--border-width--base);
|
|
14
|
+
--digi--title-logo-vertical-padding: 1.375rem;
|
|
15
|
+
--digi--title-logo-gap: 9px;
|
|
16
|
+
}color--text--secondary);
|
|
20
17
|
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
--digi--
|
|
5
|
-
--digi--
|
|
6
|
-
--digi--
|
|
7
|
-
--digi--
|
|
8
|
-
|
|
9
|
-
--digi--
|
|
10
|
-
--digi--
|
|
11
|
-
--digi--
|
|
12
|
-
--digi--
|
|
13
|
-
|
|
14
|
-
--digi--
|
|
15
|
-
--digi--
|
|
16
|
-
|
|
1
|
+
@use '../../../../../../styles/src/digi-styles.utils' as *;
|
|
2
|
+
|
|
3
|
+
@mixin digi-logo--variables() {
|
|
4
|
+
--digi--logo--img--min-width: #{rem(256)};
|
|
5
|
+
--digi--logo--img--max-width:#{rem(292)};
|
|
6
|
+
--digi--logo--img--max-width--large: #{rem(368)};
|
|
7
|
+
--digi--logo--img--max-width--system: #{rem(44)};
|
|
8
|
+
|
|
9
|
+
--digi--logo--padding: 1.375rem;
|
|
10
|
+
--digi--logo--padding--wide: var(--digi--gutter--larger);
|
|
11
|
+
--digi--logo--padding--large: var(--digi--gutter--medium);
|
|
12
|
+
--digi--logo--padding--large--wide: var(--digi--gutter--larger);
|
|
13
|
+
|
|
14
|
+
--digi--logo--logotype-color: var(--digi--color--logotype-color);
|
|
15
|
+
--digi--logo--color--primary: var(--digi--color--text--interactive--brand-primary);
|
|
16
|
+
--digi--logo--color--secondary: var(--digi--color--text--secondary);
|
|
17
|
+
|
|
18
|
+
--digi--logo--color--border--primary: var(--digi--color--text--primary);
|
|
19
|
+
--digi--logo--color--border--secondary: var(--digi--color--text--secondary);
|
|
17
20
|
}
|