@oliasoft-open-source/charts-library 3.0.3 → 3.0.5-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 +5 -8
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -31214,7 +31214,7 @@ const truncateDecimals = (number, digits) => {
|
|
|
31214
31214
|
return truncatedNum / multiplier;
|
|
31215
31215
|
};
|
|
31216
31216
|
const generateAxisId = (axisType, index2 = 0, hasMultiAxes = false) => {
|
|
31217
|
-
const i2 = hasMultiAxes ? index2 + 1 : "";
|
|
31217
|
+
const i2 = hasMultiAxes && index2 !== 0 ? index2 + 1 : "";
|
|
31218
31218
|
return `${axisType}${i2}`;
|
|
31219
31219
|
};
|
|
31220
31220
|
const getAxisTypeFromKey = (string) => {
|
|
@@ -33145,11 +33145,7 @@ const generateAnnotations = (options, state) => {
|
|
|
33145
33145
|
if (!((_a2 = state == null ? void 0 : state.showAnnotationLineIndex) == null ? void 0 : _a2.includes(i2))) {
|
|
33146
33146
|
return { ...acc };
|
|
33147
33147
|
}
|
|
33148
|
-
const
|
|
33149
|
-
var _a3;
|
|
33150
|
-
const axisType = curr.annotationAxis;
|
|
33151
|
-
return ((_a3 = options.axes[axisType]) == null ? void 0 : _a3.length) > 1 ? `${axisType}1` : axisType;
|
|
33152
|
-
};
|
|
33148
|
+
const scaleID = curr == null ? void 0 : curr.annotationAxis;
|
|
33153
33149
|
const color2 = (curr == null ? void 0 : curr.color) || COLORS[i2];
|
|
33154
33150
|
const type = (curr == null ? void 0 : curr.type) || "line";
|
|
33155
33151
|
const adjustScaleRange2 = curr == null ? void 0 : curr.adjustScaleRange;
|
|
@@ -33179,7 +33175,7 @@ const generateAnnotations = (options, state) => {
|
|
|
33179
33175
|
const annotation2 = {
|
|
33180
33176
|
...curr,
|
|
33181
33177
|
id: `${curr == null ? void 0 : curr.label}-${curr == null ? void 0 : curr.value}-${i2}`,
|
|
33182
|
-
scaleID
|
|
33178
|
+
scaleID,
|
|
33183
33179
|
label,
|
|
33184
33180
|
backgroundColor: color2,
|
|
33185
33181
|
borderColor,
|
|
@@ -34578,7 +34574,8 @@ const getBarChartAxes = (chart2, axisType) => {
|
|
|
34578
34574
|
axisData.color = color2;
|
|
34579
34575
|
axisData.position = curr.position || getAxisPosition(axisType, i2);
|
|
34580
34576
|
const axis = getBarChartAxis(chart2, axisType, axisData);
|
|
34581
|
-
|
|
34577
|
+
const axisId = i2 === 0 ? axisType : `${axisType}${i2 + 1}`;
|
|
34578
|
+
return { ...acc, [axisId]: axis };
|
|
34582
34579
|
}, {});
|
|
34583
34580
|
return axes;
|
|
34584
34581
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/charts-library",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5-beta-1",
|
|
4
4
|
"description": "React Chart Library (based on Chart.js and react-chart-js-2)",
|
|
5
5
|
"homepage": "https://gitlab.com/oliasoft-open-source/charts-library",
|
|
6
6
|
"bugs": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react-icons": "^4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@oliasoft-open-source/react-ui-library": "^3.6.
|
|
52
|
+
"@oliasoft-open-source/react-ui-library": "^3.6.5",
|
|
53
53
|
"@oliasoft-open-source/units": "^v3.0.0",
|
|
54
54
|
"@storybook/addon-actions": "^7.0.18",
|
|
55
55
|
"@storybook/addon-docs": "^7.0.18",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"vitest": "^0.32.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@oliasoft-open-source/react-ui-library": "^3.6.
|
|
95
|
+
"@oliasoft-open-source/react-ui-library": "^3.6.5",
|
|
96
96
|
"@oliasoft-open-source/units": "^v3.0.0",
|
|
97
97
|
"classnames": "^2.3.2",
|
|
98
98
|
"immer": "^10.0.2",
|