@oliasoft-open-source/charts-library 3.3.0 → 3.3.2

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
@@ -14,6 +14,7 @@ import { Icon, Tooltip as Tooltip$2, Button, Flex, Text, Menu, Popover, Field, I
14
14
  import PropTypes from "prop-types";
15
15
  import { debounce as debounce$3, isEqual } from "lodash";
16
16
  import { jsx as jsx$1 } from "react/jsx-runtime.js";
17
+ import { roundNumberToPrecision } from "@oliasoft-open-source/units/dist/rounding/rounding";
17
18
  /*!
18
19
  * @kurkle/color v0.3.2
19
20
  * https://github.com/kurkle/color#readme
@@ -38546,7 +38547,8 @@ const PieChart = (props) => {
38546
38547
  const value = tooltipItem.dataset.data[dataIndex];
38547
38548
  const labelValue = typeof value === "object" ? `${value.value || ""} ${options.tooltip.showLabelsInTooltips && value.label ? "(" + value.label + ")" : ""}` : value;
38548
38549
  const unit = (data == null ? void 0 : data.yUnit) ? `[${data == null ? void 0 : data.yUnit}]` : "";
38549
- return `${dataLabel} ${labelValue} ${unit}`;
38550
+ const formattedValue = Math.abs(labelValue) < 1 ? roundNumberToPrecision(labelValue, { n: 3 }) : round$2(labelValue, 3);
38551
+ return `${dataLabel} ${formattedValue} ${unit}`;
38550
38552
  }
38551
38553
  }
38552
38554
  };
@@ -38591,6 +38593,8 @@ const PieChart = (props) => {
38591
38593
  }
38592
38594
  },
38593
38595
  plugins: {
38596
+ annotation: false,
38597
+ // Disable globally-registered annotation plugin
38594
38598
  title: getTitle2(),
38595
38599
  datalabels: getDatalabels(),
38596
38600
  // zoom: {