@oliasoft-open-source/charts-library 3.2.3 → 3.2.4
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 +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -32870,16 +32870,17 @@ const formatAxisLabelNumbers = (tickValue, ticks, locale = "en-gb") => {
|
|
|
32870
32870
|
Math.abs(ticks[0].value),
|
|
32871
32871
|
Math.abs(ticks[ticks.length - 1].value)
|
|
32872
32872
|
);
|
|
32873
|
-
if (maxTick < 1e-4 || maxTick >
|
|
32873
|
+
if (maxTick < 1e-4 || maxTick > 1e7) {
|
|
32874
32874
|
notation = "scientific";
|
|
32875
32875
|
}
|
|
32876
32876
|
delta = calculateDelta(tickValue, ticks);
|
|
32877
32877
|
}
|
|
32878
32878
|
const logDelta = Math.log10(Math.abs(delta));
|
|
32879
32879
|
const numDecimal = isNaN(logDelta) ? 1 : Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);
|
|
32880
|
+
const roundScientificCoefficient = numDecimal === 0 ? 1 : numDecimal;
|
|
32880
32881
|
return displayNumber(round$2(tickValue, numDecimal), {
|
|
32881
32882
|
scientific: notation === "scientific",
|
|
32882
|
-
|
|
32883
|
+
roundScientificCoefficient
|
|
32883
32884
|
});
|
|
32884
32885
|
};
|
|
32885
32886
|
const getLineChartAxis = (options, axisType, state, currentScales, i2 = 0) => {
|