@oliasoft-open-source/charts-library 3.1.0 → 3.2.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 +7 -9
- package/dist/index.js.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31208,7 +31208,7 @@ const isGreaterThanMin = (value, min) => {
|
|
|
31208
31208
|
return value === void 0 || min === void 0 || Number(value) > Number(min);
|
|
31209
31209
|
};
|
|
31210
31210
|
const generateAxisId = (axisType, index2 = 0, hasMultiAxes = false) => {
|
|
31211
|
-
const i2 = hasMultiAxes ? index2 + 1 : "";
|
|
31211
|
+
const i2 = hasMultiAxes && index2 !== 0 ? index2 + 1 : "";
|
|
31212
31212
|
return `${axisType}${i2}`;
|
|
31213
31213
|
};
|
|
31214
31214
|
const getAxisTypeFromKey = (string) => {
|
|
@@ -33167,11 +33167,7 @@ const generateAnnotations = (options, state) => {
|
|
|
33167
33167
|
if (!((_a2 = state == null ? void 0 : state.showAnnotationLineIndex) == null ? void 0 : _a2.includes(i2))) {
|
|
33168
33168
|
return { ...acc };
|
|
33169
33169
|
}
|
|
33170
|
-
const
|
|
33171
|
-
var _a3;
|
|
33172
|
-
const axisType = curr.annotationAxis;
|
|
33173
|
-
return ((_a3 = options.axes[axisType]) == null ? void 0 : _a3.length) > 1 ? `${axisType}1` : axisType;
|
|
33174
|
-
};
|
|
33170
|
+
const scaleID = (curr == null ? void 0 : curr.annotationAxis) ?? void 0;
|
|
33175
33171
|
const color2 = (curr == null ? void 0 : curr.color) || COLORS[i2];
|
|
33176
33172
|
const type = (curr == null ? void 0 : curr.type) || "line";
|
|
33177
33173
|
const adjustScaleRange2 = curr == null ? void 0 : curr.adjustScaleRange;
|
|
@@ -33201,7 +33197,7 @@ const generateAnnotations = (options, state) => {
|
|
|
33201
33197
|
const annotation2 = {
|
|
33202
33198
|
...curr,
|
|
33203
33199
|
id: `${curr == null ? void 0 : curr.label}-${curr == null ? void 0 : curr.value}-${i2}`,
|
|
33204
|
-
scaleID
|
|
33200
|
+
scaleID,
|
|
33205
33201
|
label,
|
|
33206
33202
|
backgroundColor: color2,
|
|
33207
33203
|
borderColor,
|
|
@@ -34608,8 +34604,9 @@ const getBarChartAxes = (chart2, axisType) => {
|
|
|
34608
34604
|
const color2 = curr.color || COLORS[i2] || generateRandomColor$1(COLORS);
|
|
34609
34605
|
axisData.color = color2;
|
|
34610
34606
|
axisData.position = curr.position || getAxisPosition(axisType, i2);
|
|
34611
|
-
const axis = getBarChartAxis(chart2, axisType, axisData
|
|
34612
|
-
|
|
34607
|
+
const axis = getBarChartAxis(chart2, axisType, axisData);
|
|
34608
|
+
const axisId = i2 === 0 ? axisType : `${axisType}${i2 + 1}`;
|
|
34609
|
+
return { ...acc, [axisId]: axis };
|
|
34613
34610
|
}, {});
|
|
34614
34611
|
return axes;
|
|
34615
34612
|
};
|
|
@@ -34897,6 +34894,7 @@ export {
|
|
|
34897
34894
|
ScatterChart,
|
|
34898
34895
|
initializeLineChart
|
|
34899
34896
|
};
|
|
34897
|
+
//# sourceMappingURL=index.js.map
|
|
34900
34898
|
(function() {
|
|
34901
34899
|
"use strict";
|
|
34902
34900
|
try {
|