@oliasoft-open-source/charts-library 3.5.1-beta-5 → 3.5.1-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 CHANGED
@@ -13417,6 +13417,9 @@ const setDefaultTheme = () => {
13417
13417
  defaults$2.color = DEFAULT_COLOR;
13418
13418
  defaults$2.borderColor = BORDER_COLOR;
13419
13419
  };
13420
+ const isNilOrEmpty = (value) => {
13421
+ return value === null || value === void 0 || value === "";
13422
+ };
13420
13423
  const chart$3 = "_chart_1v6ps_1";
13421
13424
  const styles$5 = {
13422
13425
  chart: chart$3
@@ -22204,6 +22207,11 @@ const generateKey = (values) => {
22204
22207
  return key;
22205
22208
  };
22206
22209
  const isPrimitiveValue = (value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null;
22210
+ const isRangeValid = (r2) => {
22211
+ if (!r2)
22212
+ return false;
22213
+ return Object.values(r2).every((value) => !isNilOrEmpty(value));
22214
+ };
22207
22215
  const getChartStateFromStorage = (persistenceId) => {
22208
22216
  if (!persistenceId)
22209
22217
  return null;
@@ -25406,9 +25414,14 @@ const useStoreChartStateInStorage = (memoState, persistenceId) => {
25406
25414
  };
25407
25415
  const useUpdateAxesRanges = (range, dispatch) => {
25408
25416
  const prevRange = useRef(null);
25417
+ console.log("prevRange.current", prevRange.current);
25409
25418
  console.log("Range", range);
25419
+ console.log("is NOT Equal", !isEqual(range, prevRange.current));
25420
+ console.log("range && range.x && range.y", range && range.x && range.y);
25421
+ console.log("isRangeValid", isRangeValid(range));
25410
25422
  const updateAxesRanges = () => {
25411
25423
  console.log(
25424
+ "IF STATEMENT",
25412
25425
  range && range.x && range.y && !isEqual(range, prevRange.current)
25413
25426
  );
25414
25427
  if (range && range.x && range.y && !isEqual(range, prevRange.current)) {
@@ -25459,6 +25472,8 @@ const useChartState = ({
25459
25472
  additionalAxesOptions: { range },
25460
25473
  axes
25461
25474
  } = memoOptions;
25475
+ console.log("state.initialAxesRanges", state == null ? void 0 : state.initialAxesRanges);
25476
+ console.log("memoState.initialAxesRanges", memoState == null ? void 0 : memoState.initialAxesRanges);
25462
25477
  useStoreChartStateInStorage(memoState, persistenceId);
25463
25478
  useToggleCustomLegendVisibility(memoState, memoOptions);
25464
25479
  useUpdateAxesRanges(range, dispatch);