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