@oliasoft-open-source/charts-library 3.4.10-beta-2 → 3.4.10
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
|
@@ -24650,6 +24650,8 @@ const INIT_KEYS = {
|
|
|
24650
24650
|
TRANSLATIONS: "translations",
|
|
24651
24651
|
LANGUAGE_KEY: "languageKey"
|
|
24652
24652
|
};
|
|
24653
|
+
const LOWER_BOUND = 1e-4;
|
|
24654
|
+
const UPPER_BOUND = 1e7;
|
|
24653
24655
|
const generateLineChartDatasets = (datasets, state, options, { label }) => {
|
|
24654
24656
|
const copyDataset = [...datasets];
|
|
24655
24657
|
const { annotations, graph } = options;
|
|
@@ -24747,7 +24749,7 @@ const formatAxisLabelNumbers = (tickValue, ticks, locale = "en-gb") => {
|
|
|
24747
24749
|
Math.abs(ticks[0].value),
|
|
24748
24750
|
Math.abs(ticks[ticks.length - 1].value)
|
|
24749
24751
|
);
|
|
24750
|
-
if (maxTick <
|
|
24752
|
+
if (maxTick < LOWER_BOUND || maxTick > UPPER_BOUND) {
|
|
24751
24753
|
notation = "scientific";
|
|
24752
24754
|
}
|
|
24753
24755
|
delta = calculateDelta$1(tickValue, ticks);
|
|
@@ -25098,8 +25100,8 @@ const getUnitsFromLabel = (label) => {
|
|
|
25098
25100
|
};
|
|
25099
25101
|
const customFormatNumber = (labelNumber) => {
|
|
25100
25102
|
let roundOptions = {};
|
|
25101
|
-
if (Math.abs(labelNumber) <
|
|
25102
|
-
roundOptions = { roundScientificCoefficient:
|
|
25103
|
+
if (Math.abs(labelNumber) < LOWER_BOUND || Math.abs(labelNumber) > UPPER_BOUND) {
|
|
25104
|
+
roundOptions = { roundScientificCoefficient: 3 };
|
|
25103
25105
|
}
|
|
25104
25106
|
return displayNumber(roundByMagnitude(labelNumber), roundOptions);
|
|
25105
25107
|
};
|