@sis-cc/dotstatsuite-components 21.8.0 → 21.10.0
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.
|
@@ -30,7 +30,7 @@ import getISOWeek from "date-fns/get_iso_week";
|
|
|
30
30
|
import makeStyles from "@mui/styles/makeStyles";
|
|
31
31
|
import { useTheme } from "@mui/material/styles";
|
|
32
32
|
const name = "@sis-cc/dotstatsuite-components";
|
|
33
|
-
const version = "21.
|
|
33
|
+
const version = "21.10.0";
|
|
34
34
|
const meta = {
|
|
35
35
|
name,
|
|
36
36
|
version
|
|
@@ -4421,9 +4421,17 @@ const formatValue = (observation, formatAttributesIndexes, attributes) => {
|
|
|
4421
4421
|
const formatSeparator = (value2) => numeral(value2).format(`0,0.[0000000]`);
|
|
4422
4422
|
const formatDecimals = ifElse(
|
|
4423
4423
|
always(isValidNumber$1(decimals)),
|
|
4424
|
-
(
|
|
4425
|
-
|
|
4426
|
-
|
|
4424
|
+
(v) => {
|
|
4425
|
+
const num = Number(v);
|
|
4426
|
+
const isTiny = Math.abs(num) < Math.pow(10, -(decimals ?? 2) + 1);
|
|
4427
|
+
const displayNum = isTiny ? 0 : num;
|
|
4428
|
+
const decimalFormat = ifElse(
|
|
4429
|
+
equals(0),
|
|
4430
|
+
always("0,0"),
|
|
4431
|
+
(d) => `0,0.${join("", times(always("0"), d))}`
|
|
4432
|
+
)(decimals ?? 2);
|
|
4433
|
+
return numeral(displayNum).format(decimalFormat);
|
|
4434
|
+
},
|
|
4427
4435
|
formatSeparator
|
|
4428
4436
|
);
|
|
4429
4437
|
return ifElse(
|
|
@@ -7493,7 +7501,12 @@ const getAxisOptions = (data, type3, options, timeFormats, locale) => {
|
|
|
7493
7501
|
ordinal: { gap: 0.3, padding: 0.3 },
|
|
7494
7502
|
thickness: 0
|
|
7495
7503
|
};
|
|
7496
|
-
const linearProc = (d) =>
|
|
7504
|
+
const linearProc = (d) => {
|
|
7505
|
+
if (Math.abs(d) < 0.01 && d) {
|
|
7506
|
+
return numeral(d).format("0.[00]e+0");
|
|
7507
|
+
}
|
|
7508
|
+
return numeral(d).format("0,0.[00]");
|
|
7509
|
+
};
|
|
7497
7510
|
return pipe(
|
|
7498
7511
|
propOr({}, "axis"),
|
|
7499
7512
|
mergeDeepRight({ x: axis, y: axis }),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sis-cc/dotstatsuite-components",
|
|
3
3
|
"description": "Set components based on React.",
|
|
4
|
-
"version": "21.
|
|
4
|
+
"version": "21.10.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/dotstatsuite-components.js",
|
|
7
7
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@react-hook/size": "^2.1.1",
|
|
30
|
-
"@sis-cc/dotstatsuite-d3-charts": "^10.
|
|
30
|
+
"@sis-cc/dotstatsuite-d3-charts": "^10.2.0",
|
|
31
31
|
"lodash": "^4.17.2",
|
|
32
32
|
"memoizee": "^0.4.4"
|
|
33
33
|
},
|