@oliasoft-open-source/charts-library 3.7.2-beta-1 → 3.7.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 CHANGED
@@ -11,7 +11,7 @@ import { produce } from "immer";
11
11
  import { round as round$2, displayNumber, isCloseTo, roundByMagnitude, toNum } from "@oliasoft-open-source/units";
12
12
  import cx from "classnames";
13
13
  import { Icon, Tooltip as Tooltip$2, Button, Flex, Text, Menu, Popover, Field, InputGroup, NumberInput, InputGroupAddon, Select, ButtonGroup, Spacer, Portal } from "@oliasoft-open-source/react-ui-library";
14
- import { isEmpty, isArray as isArray$2, some, has, debounce as debounce$3, isEqual } from "lodash";
14
+ import { isEmpty, isArray as isArray$2, some, has, debounce as debounce$3 } from "lodash";
15
15
  import { roundNumberToPrecision } from "@oliasoft-open-source/units/dist/rounding/rounding";
16
16
  /*!
17
17
  * @kurkle/color v0.3.2
@@ -20349,7 +20349,7 @@ var fastDeepEqual = function equal(a2, b2) {
20349
20349
  }
20350
20350
  return a2 !== a2 && b2 !== b2;
20351
20351
  };
20352
- const equal2 = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqual);
20352
+ const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqual);
20353
20353
  const useIsomorphicLayoutEffect$2 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
20354
20354
  function useCollector(monitor, collect, onUpdate) {
20355
20355
  const [collected, setCollected] = useState(
@@ -20357,7 +20357,7 @@ function useCollector(monitor, collect, onUpdate) {
20357
20357
  );
20358
20358
  const updateCollected = useCallback(() => {
20359
20359
  const nextValue = collect(monitor);
20360
- if (!equal2(collected, nextValue)) {
20360
+ if (!isEqual(collected, nextValue)) {
20361
20361
  setCollected(nextValue);
20362
20362
  if (onUpdate) {
20363
20363
  onUpdate();
@@ -26238,7 +26238,7 @@ const LineChart = (props) => {
26238
26238
  plugins: usePlugins
26239
26239
  }
26240
26240
  ),
26241
- showCustomLegend && /* @__PURE__ */ jsx(
26241
+ showCustomLegend && !!generatedDatasets.length && /* @__PURE__ */ jsx(
26242
26242
  Legend2,
26243
26243
  {
26244
26244
  chartRef,