@oliasoft-open-source/charts-library 3.5.3-beta-3 → 3.5.3-beta-5
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 +13 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22275,9 +22275,12 @@ const initialState = ({ options, persistenceId }) => {
|
|
|
22275
22275
|
} = options;
|
|
22276
22276
|
const getStateAxesByType = (axisType, customAxesRange2) => {
|
|
22277
22277
|
var _a2, _b2, _c2, _d2, _e2;
|
|
22278
|
+
console.log("axisType", axisType);
|
|
22279
|
+
console.log("axes", axes);
|
|
22278
22280
|
if (!axes[axisType]) {
|
|
22279
22281
|
return [];
|
|
22280
22282
|
}
|
|
22283
|
+
console.log("getStateAxesByType");
|
|
22281
22284
|
if (((_a2 = axes[axisType]) == null ? void 0 : _a2.length) > 1) {
|
|
22282
22285
|
return axes[axisType].map(
|
|
22283
22286
|
(axisObj, index2) => {
|
|
@@ -22300,6 +22303,7 @@ const initialState = ({ options, persistenceId }) => {
|
|
|
22300
22303
|
const customMin = (_b2 = customAxesRange2 == null ? void 0 : customAxesRange2[id]) == null ? void 0 : _b2.min;
|
|
22301
22304
|
const customMax = (_c2 = customAxesRange2 == null ? void 0 : customAxesRange2[id]) == null ? void 0 : _c2.max;
|
|
22302
22305
|
const unit = (_e2 = (_d2 = axes == null ? void 0 : axes[id]) == null ? void 0 : _d2[0]) == null ? void 0 : _e2.unit;
|
|
22306
|
+
console.log("id", id);
|
|
22303
22307
|
return [
|
|
22304
22308
|
{
|
|
22305
22309
|
id,
|
|
@@ -23711,9 +23715,9 @@ const useChartFunctions = ({
|
|
|
23711
23715
|
const onResetAxes = useCallback(() => {
|
|
23712
23716
|
dispatch({ type: RESET_AXES_RANGES });
|
|
23713
23717
|
}, []);
|
|
23714
|
-
const onUpdateAxes =
|
|
23718
|
+
const onUpdateAxes = ({ axes: axes2 }) => {
|
|
23715
23719
|
dispatch({ type: UPDATE_AXES_RANGES, payload: { axes: axes2 } });
|
|
23716
|
-
}
|
|
23720
|
+
};
|
|
23717
23721
|
return {
|
|
23718
23722
|
legendClick,
|
|
23719
23723
|
resetZoom: resetZoom2,
|
|
@@ -25265,7 +25269,7 @@ const useChartOptions = ({
|
|
|
25265
25269
|
);
|
|
25266
25270
|
const scales = useMemo(
|
|
25267
25271
|
() => autoScale(options, state, generatedDatasets, chartRef),
|
|
25268
|
-
[options, state, generatedDatasets]
|
|
25272
|
+
[options, state, generatedDatasets, chartRef]
|
|
25269
25273
|
);
|
|
25270
25274
|
const dragData = useMemo(
|
|
25271
25275
|
() => enableDragPoints && getDraggableData(options),
|
|
@@ -25348,7 +25352,7 @@ const useChartOptions = ({
|
|
|
25348
25352
|
plugins,
|
|
25349
25353
|
events: Object.values(Events)
|
|
25350
25354
|
}),
|
|
25351
|
-
[state, options]
|
|
25355
|
+
[state, options, chartRef]
|
|
25352
25356
|
);
|
|
25353
25357
|
};
|
|
25354
25358
|
const useChartPlugins = ({ options, resetZoom: resetZoom2 }) => {
|
|
@@ -25429,8 +25433,8 @@ const useUpdateAxesRanges = (range, dispatch) => {
|
|
|
25429
25433
|
min: min ?? 0,
|
|
25430
25434
|
max: max ?? 0
|
|
25431
25435
|
})) : null;
|
|
25432
|
-
console.log(axes);
|
|
25433
25436
|
if (!isEqual(axes, prevAxes.current) && axes !== null) {
|
|
25437
|
+
console.log("WRONG");
|
|
25434
25438
|
dispatch({
|
|
25435
25439
|
type: UPDATE_AXES_RANGES,
|
|
25436
25440
|
payload: { axes }
|
|
@@ -25699,12 +25703,9 @@ const LineChart = (props) => {
|
|
|
25699
25703
|
},
|
|
25700
25704
|
initialState
|
|
25701
25705
|
);
|
|
25702
|
-
const generatedDatasets =
|
|
25703
|
-
datasets,
|
|
25704
|
-
|
|
25705
|
-
options,
|
|
25706
|
-
translations
|
|
25707
|
-
);
|
|
25706
|
+
const generatedDatasets = useMemo(() => {
|
|
25707
|
+
return generateLineChartDatasets(datasets, state, options, translations);
|
|
25708
|
+
}, [state.lineEnabled, state.pointsEnabled, axes, annotations, graph]);
|
|
25708
25709
|
useChartState({
|
|
25709
25710
|
chartRef,
|
|
25710
25711
|
options,
|
|
@@ -25730,7 +25731,7 @@ const LineChart = (props) => {
|
|
|
25730
25731
|
const usePlugins = useChartPlugins({ options, resetZoom: resetZoom2 });
|
|
25731
25732
|
console.log("State", state);
|
|
25732
25733
|
console.log("Dataset", generatedDatasets);
|
|
25733
|
-
console.log("Options",
|
|
25734
|
+
console.log("Options", useOptions);
|
|
25734
25735
|
return /* @__PURE__ */ jsxs(
|
|
25735
25736
|
"div",
|
|
25736
25737
|
{
|