@oliasoft-open-source/charts-library 4.1.8 → 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 +5 -6
- package/dist/index.js.map +1 -1
- package/dist/src/components/bar-chart/bar-chart.stories.d.ts +19 -0
- package/dist/src/components/bar-chart/utils/get-bar-chart-tooltips.d.ts +1 -1
- package/dist/src/components/common/common.interface.d.ts +1 -0
- package/dist/src/components/common/helpers/get-chart-annotation.d.ts +1 -0
- package/dist/src/components/line-chart/line-chart.stories.d.ts +1 -0
- package/package.json +1 -1
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
|
|
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";
|
|
@@ -24604,6 +24604,7 @@ const generateLineChartDatasets = (datasets, state, options, { label }) => {
|
|
|
24604
24604
|
const borderDash = ANNOTATION_DASH;
|
|
24605
24605
|
const borderWidth = BORDER_WIDTH.INITIAL;
|
|
24606
24606
|
return {
|
|
24607
|
+
...annotation2,
|
|
24607
24608
|
isAnnotation: true,
|
|
24608
24609
|
annotationType: annotation2.type,
|
|
24609
24610
|
label: annotation2.label,
|
|
@@ -39310,10 +39311,8 @@ const getBarChartToolTips = (options) => {
|
|
|
39310
39311
|
const labels = getTooltipLabels(tooltipItem.dataset);
|
|
39311
39312
|
const { valueUnit, valueAxisLabel } = labels;
|
|
39312
39313
|
const getTooltipItemValue = () => {
|
|
39313
|
-
const
|
|
39314
|
-
const
|
|
39315
|
-
const labelNumber = toNum(formattedValueWithDotSeparator);
|
|
39316
|
-
const labelNumberFormatted = customFormatNumber2(labelNumber);
|
|
39314
|
+
const tooltipValue = tooltipItem == null ? void 0 : tooltipItem.raw;
|
|
39315
|
+
const labelNumberFormatted = typeof tooltipValue === "number" ? customFormatNumber2(tooltipValue) : "";
|
|
39317
39316
|
let tooltipItemValue2 = "";
|
|
39318
39317
|
if (typeof tooltipItem.raw === "number") {
|
|
39319
39318
|
tooltipItemValue2 = labelNumberFormatted;
|
|
@@ -39327,7 +39326,7 @@ const getBarChartToolTips = (options) => {
|
|
|
39327
39326
|
);
|
|
39328
39327
|
}
|
|
39329
39328
|
if (typeof tooltipItem.raw === "object") {
|
|
39330
|
-
tooltipItemValue2 =
|
|
39329
|
+
tooltipItemValue2 = labelNumberFormatted;
|
|
39331
39330
|
}
|
|
39332
39331
|
return tooltipItemValue2;
|
|
39333
39332
|
};
|