@oliasoft-open-source/charts-library 4.1.9 → 4.1.10

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
@@ -8,7 +8,7 @@ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
8
8
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
9
9
  import React, { forwardRef, useRef, useEffect, createContext as createContext$2, memo, useLayoutEffect, useState, useCallback, useMemo, isValidElement, cloneElement, useContext, useReducer } from "react";
10
10
  import { produce } from "immer";
11
- import { round as round$2, displayNumber, isCloseTo, roundByMagnitude, toNum } from "@oliasoft-open-source/units";
11
+ import { round as round$2, displayNumber, isCloseTo, roundByMagnitude } 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
14
  import { isEmpty, isArray as isArray$2, some, has, cloneDeep, defaultTo, findIndex, set as set$2, debounce as debounce$3, map as map$3, find, get as get$1, values } from "lodash";
@@ -39311,10 +39311,8 @@ const getBarChartToolTips = (options) => {
39311
39311
  const labels = getTooltipLabels(tooltipItem.dataset);
39312
39312
  const { valueUnit, valueAxisLabel } = labels;
39313
39313
  const getTooltipItemValue = () => {
39314
- const { formattedValue } = tooltipItem;
39315
- const formattedValueWithDotSeparator = formattedValue.replace(",", ".");
39316
- const labelNumber = toNum(formattedValueWithDotSeparator);
39317
- const labelNumberFormatted = customFormatNumber2(labelNumber);
39314
+ const tooltipValue = tooltipItem == null ? void 0 : tooltipItem.raw;
39315
+ const labelNumberFormatted = typeof tooltipValue === "number" ? customFormatNumber2(tooltipValue) : "";
39318
39316
  let tooltipItemValue2 = "";
39319
39317
  if (typeof tooltipItem.raw === "number") {
39320
39318
  tooltipItemValue2 = labelNumberFormatted;
@@ -39328,7 +39326,7 @@ const getBarChartToolTips = (options) => {
39328
39326
  );
39329
39327
  }
39330
39328
  if (typeof tooltipItem.raw === "object") {
39331
- tooltipItemValue2 = formattedValue;
39329
+ tooltipItemValue2 = labelNumberFormatted;
39332
39330
  }
39333
39331
  return tooltipItemValue2;
39334
39332
  };