@oliasoft-open-source/charts-library 3.5.3-beta-4 → 3.5.3-beta-6
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 +12 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22280,6 +22280,7 @@ const initialState = ({ options, persistenceId }) => {
|
|
|
22280
22280
|
if (!axes[axisType]) {
|
|
22281
22281
|
return [];
|
|
22282
22282
|
}
|
|
22283
|
+
console.log("getStateAxesByType");
|
|
22283
22284
|
if (((_a2 = axes[axisType]) == null ? void 0 : _a2.length) > 1) {
|
|
22284
22285
|
return axes[axisType].map(
|
|
22285
22286
|
(axisObj, index2) => {
|
|
@@ -22302,6 +22303,7 @@ const initialState = ({ options, persistenceId }) => {
|
|
|
22302
22303
|
const customMin = (_b2 = customAxesRange2 == null ? void 0 : customAxesRange2[id]) == null ? void 0 : _b2.min;
|
|
22303
22304
|
const customMax = (_c2 = customAxesRange2 == null ? void 0 : customAxesRange2[id]) == null ? void 0 : _c2.max;
|
|
22304
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);
|
|
22305
22307
|
return [
|
|
22306
22308
|
{
|
|
22307
22309
|
id,
|
|
@@ -22316,6 +22318,7 @@ const initialState = ({ options, persistenceId }) => {
|
|
|
22316
22318
|
const xStateAxes = getStateAxesByType(AxisType.X, customAxesRange);
|
|
22317
22319
|
const yStateAxes = getStateAxesByType(AxisType.Y, customAxesRange);
|
|
22318
22320
|
const stateAxes = [...xStateAxes, ...yStateAxes];
|
|
22321
|
+
console.log("stateAxes", stateAxes);
|
|
22319
22322
|
const {
|
|
22320
22323
|
zoomEnabled,
|
|
22321
22324
|
panEnabled,
|
|
@@ -25267,7 +25270,7 @@ const useChartOptions = ({
|
|
|
25267
25270
|
);
|
|
25268
25271
|
const scales = useMemo(
|
|
25269
25272
|
() => autoScale(options, state, generatedDatasets, chartRef),
|
|
25270
|
-
[options, state, generatedDatasets]
|
|
25273
|
+
[options, state, generatedDatasets, chartRef]
|
|
25271
25274
|
);
|
|
25272
25275
|
const dragData = useMemo(
|
|
25273
25276
|
() => enableDragPoints && getDraggableData(options),
|
|
@@ -25350,7 +25353,7 @@ const useChartOptions = ({
|
|
|
25350
25353
|
plugins,
|
|
25351
25354
|
events: Object.values(Events)
|
|
25352
25355
|
}),
|
|
25353
|
-
[state, options]
|
|
25356
|
+
[state, options, chartRef]
|
|
25354
25357
|
);
|
|
25355
25358
|
};
|
|
25356
25359
|
const useChartPlugins = ({ options, resetZoom: resetZoom2 }) => {
|
|
@@ -25432,6 +25435,11 @@ const useUpdateAxesRanges = (range, dispatch) => {
|
|
|
25432
25435
|
max: max ?? 0
|
|
25433
25436
|
})) : null;
|
|
25434
25437
|
if (!isEqual(axes, prevAxes.current) && axes !== null) {
|
|
25438
|
+
console.log("------------");
|
|
25439
|
+
console.log("WRONG");
|
|
25440
|
+
console.log(axes);
|
|
25441
|
+
console.log(prevAxes.current);
|
|
25442
|
+
console.log("------------");
|
|
25435
25443
|
dispatch({
|
|
25436
25444
|
type: UPDATE_AXES_RANGES,
|
|
25437
25445
|
payload: { axes }
|
|
@@ -25444,6 +25452,7 @@ const useSaveInitialAxesRanges = (chartRef, axes, generatedDatasets, dispatch) =
|
|
|
25444
25452
|
const saveInitialAxesRanges = useCallback(() => {
|
|
25445
25453
|
if (chartRef && !isEqual(generatedDatasets, prevGeneratedDatasets.current)) {
|
|
25446
25454
|
const initialAxesRanges = getAxesRangesFromChart(chartRef, axes);
|
|
25455
|
+
console.log("initialAxesRanges", initialAxesRanges);
|
|
25447
25456
|
dispatch({
|
|
25448
25457
|
type: SAVE_INITIAL_AXES_RANGES,
|
|
25449
25458
|
payload: { initialAxesRanges }
|
|
@@ -25727,8 +25736,7 @@ const LineChart = (props) => {
|
|
|
25727
25736
|
});
|
|
25728
25737
|
const usePlugins = useChartPlugins({ options, resetZoom: resetZoom2 });
|
|
25729
25738
|
console.log("State", state);
|
|
25730
|
-
console.log("
|
|
25731
|
-
console.log("Options", options);
|
|
25739
|
+
console.log("options", options);
|
|
25732
25740
|
return /* @__PURE__ */ jsxs(
|
|
25733
25741
|
"div",
|
|
25734
25742
|
{
|