@oliasoft-open-source/charts-library 3.2.2 → 3.2.3-beta-1
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
|
@@ -32862,16 +32862,17 @@ const formatAxisLabelNumbers = (tickValue, ticks, locale = "en-gb") => {
|
|
|
32862
32862
|
Math.abs(ticks[0].value),
|
|
32863
32863
|
Math.abs(ticks[ticks.length - 1].value)
|
|
32864
32864
|
);
|
|
32865
|
-
if (maxTick < 1e-4 || maxTick >
|
|
32865
|
+
if (maxTick < 1e-4 || maxTick > 1e7) {
|
|
32866
32866
|
notation = "scientific";
|
|
32867
32867
|
}
|
|
32868
32868
|
delta = calculateDelta(tickValue, ticks);
|
|
32869
32869
|
}
|
|
32870
32870
|
const logDelta = Math.log10(Math.abs(delta));
|
|
32871
32871
|
const numDecimal = isNaN(logDelta) ? 1 : Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);
|
|
32872
|
+
const roundScientificCoefficient = numDecimal === 0 ? 1 : numDecimal;
|
|
32872
32873
|
return displayNumber(round$2(tickValue, numDecimal), {
|
|
32873
32874
|
scientific: notation === "scientific",
|
|
32874
|
-
|
|
32875
|
+
roundScientificCoefficient
|
|
32875
32876
|
});
|
|
32876
32877
|
};
|
|
32877
32878
|
const getLineChartAxis = (options, axisType, state, currentScales, i2 = 0) => {
|