@tekkare/auriga 0.2.179 → 0.2.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -231,8 +231,8 @@ export default defineComponent({
|
|
|
231
231
|
returnValue = new Intl.NumberFormat("fr-FR").format(value).replace(",", ".");
|
|
232
232
|
}
|
|
233
233
|
if (hasPercentages) {
|
|
234
|
-
if (opt.dataPointIndex > 0 && seriesData[opt.seriesIndex]
|
|
235
|
-
const previousVal = seriesData[opt.seriesIndex]
|
|
234
|
+
if (opt.dataPointIndex > 0 && seriesData[opt.seriesIndex]?.data[opt.dataPointIndex - 1] !== null && seriesData[opt.seriesIndex]?.data[opt.dataPointIndex] !== null) {
|
|
235
|
+
const previousVal = seriesData[opt.seriesIndex]?.data[opt.dataPointIndex - 1];
|
|
236
236
|
let percentageValue = (value - previousVal) / previousVal * 100;
|
|
237
237
|
if (percentageValue > 0 && percentageValue !== Infinity) {
|
|
238
238
|
percentageValue = new Intl.NumberFormat("fr-FR").format(Number(percentageValue.toFixed(1))).replace(",", ".");
|
|
@@ -243,7 +243,7 @@ export default defineComponent({
|
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
if (seriesData[opt.seriesIndex]
|
|
246
|
+
if (seriesData[opt.seriesIndex]?.data[opt.dataPointIndex] !== null) {
|
|
247
247
|
return returnValue;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -348,7 +348,7 @@ export default defineComponent({
|
|
|
348
348
|
returnValue = new Intl.NumberFormat("fr-FR").format(value);
|
|
349
349
|
}
|
|
350
350
|
if (hasPercentages) {
|
|
351
|
-
const seriesTotal = seriesData[opt.seriesIndex]
|
|
351
|
+
const seriesTotal = seriesData[opt.seriesIndex]?.data?.reduce(
|
|
352
352
|
(a, b) => a + b,
|
|
353
353
|
0
|
|
354
354
|
);
|
|
@@ -425,7 +425,7 @@ export default defineComponent({
|
|
|
425
425
|
returnValue = new Intl.NumberFormat("fr-FR").format(value);
|
|
426
426
|
}
|
|
427
427
|
if (hasPercentages && value !== null) {
|
|
428
|
-
let seriesTotal = seriesData[opt.seriesIndex]
|
|
428
|
+
let seriesTotal = seriesData[opt.seriesIndex]?.data?.reduce(
|
|
429
429
|
(a, b) => a + b,
|
|
430
430
|
0
|
|
431
431
|
);
|
|
@@ -591,7 +591,7 @@ export default defineComponent({
|
|
|
591
591
|
} else {
|
|
592
592
|
let defaultDataLabelFormatter = {
|
|
593
593
|
formatter(value, opt) {
|
|
594
|
-
let dataValue = seriesData[opt.seriesIndex]
|
|
594
|
+
let dataValue = seriesData[opt.seriesIndex]?.data[opt.dataPointIndex];
|
|
595
595
|
let returnValue = dataValue;
|
|
596
596
|
if (compactMode) {
|
|
597
597
|
returnValue = new Intl.NumberFormat("en-US", {
|
|
@@ -655,7 +655,7 @@ export default defineComponent({
|
|
|
655
655
|
returnValue = new Intl.NumberFormat("fr-FR").format(value);
|
|
656
656
|
}
|
|
657
657
|
if (hasPercentages) {
|
|
658
|
-
let seriesTotal = seriesData[opt.seriesIndex]
|
|
658
|
+
let seriesTotal = seriesData[opt.seriesIndex]?.data?.reduce(
|
|
659
659
|
(a, b) => a + b,
|
|
660
660
|
0
|
|
661
661
|
);
|