@oliasoft-open-source/charts-library 4.3.7 → 4.3.8
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/index.js
CHANGED
|
@@ -39819,9 +39819,14 @@ const getBarChartDataLabels = (options) => {
|
|
|
39819
39819
|
dataLabel = Number.isInteger(dataElement) ? dataElement : dataElement.toFixed(2);
|
|
39820
39820
|
}
|
|
39821
39821
|
if (Array.isArray(dataElement)) {
|
|
39822
|
-
|
|
39823
|
-
|
|
39824
|
-
|
|
39822
|
+
if (dataElement.length === 2) {
|
|
39823
|
+
const sum = dataElement[1] - dataElement[0];
|
|
39824
|
+
dataLabel = sum < 0 ? sum : `+${sum}`;
|
|
39825
|
+
} else {
|
|
39826
|
+
dataLabel = dataElement.reduce((acc, curr, i2) => {
|
|
39827
|
+
return i2 === 0 ? `${acc} ${curr}` : `${acc}, ${curr}`;
|
|
39828
|
+
}, "");
|
|
39829
|
+
}
|
|
39825
39830
|
}
|
|
39826
39831
|
return dataLabel;
|
|
39827
39832
|
};
|
|
@@ -39897,8 +39902,7 @@ const getBarChartToolTips = (options) => {
|
|
|
39897
39902
|
},
|
|
39898
39903
|
""
|
|
39899
39904
|
);
|
|
39900
|
-
}
|
|
39901
|
-
if (typeof tooltipItem.raw === "object") {
|
|
39905
|
+
} else if (typeof tooltipItem.raw === "object") {
|
|
39902
39906
|
tooltipItemValue2 = labelNumberFormatted;
|
|
39903
39907
|
}
|
|
39904
39908
|
return tooltipItemValue2;
|