@hitachivantara/uikit-react-viz 3.2.0 → 3.2.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.
@@ -3,6 +3,17 @@ import { HvPlotProps } from "./Plot";
3
3
 
4
4
  export type HvChartClassKey = "root";
5
5
 
6
+ export type TooltipElementObject = {
7
+ color: string;
8
+ name: string;
9
+ value: number | string;
10
+ };
11
+
12
+ export type TooltipDataObject = {
13
+ title: string;
14
+ elements: TooltipElementObject[];
15
+ };
16
+
6
17
  export interface HvChartProps extends StandardProps<HvPlotProps, HvChartClassKey> {
7
18
  /**
8
19
  * An Id passed on to the component
@@ -15,7 +26,7 @@ export interface HvChartProps extends StandardProps<HvPlotProps, HvChartClassKey
15
26
  /**
16
27
  * Custom tooltip element to be displayed
17
28
  */
18
- tooltip?: React.ReactNode;
29
+ tooltip?: (data: TooltipDataObject) => JSX.Element;
19
30
  /**
20
31
  * Defines the X axis title.
21
32
  */
@@ -3,6 +3,17 @@ import { HvPlotProps } from "./Plot";
3
3
 
4
4
  export type HvChartClassKey = "root";
5
5
 
6
+ export type TooltipElementObject = {
7
+ color: string;
8
+ name: string;
9
+ value: number | string;
10
+ };
11
+
12
+ export type TooltipDataObject = {
13
+ title: string;
14
+ elements: TooltipElementObject[];
15
+ };
16
+
6
17
  export interface HvChartProps extends StandardProps<HvPlotProps, HvChartClassKey> {
7
18
  /**
8
19
  * An Id passed on to the component
@@ -15,7 +26,7 @@ export interface HvChartProps extends StandardProps<HvPlotProps, HvChartClassKey
15
26
  /**
16
27
  * Custom tooltip element to be displayed
17
28
  */
18
- tooltip?: React.ReactNode;
29
+ tooltip?: (data: TooltipDataObject) => JSX.Element;
19
30
  /**
20
31
  * Defines the X axis title.
21
32
  */
@@ -3,6 +3,17 @@ import { HvPlotProps } from "./Plot";
3
3
 
4
4
  export type HvChartClassKey = "root";
5
5
 
6
+ export type TooltipElementObject = {
7
+ color: string;
8
+ name: string;
9
+ value: number | string;
10
+ };
11
+
12
+ export type TooltipDataObject = {
13
+ title: string;
14
+ elements: TooltipElementObject[];
15
+ };
16
+
6
17
  export interface HvChartProps extends StandardProps<HvPlotProps, HvChartClassKey> {
7
18
  /**
8
19
  * An Id passed on to the component
@@ -15,7 +26,7 @@ export interface HvChartProps extends StandardProps<HvPlotProps, HvChartClassKey
15
26
  /**
16
27
  * Custom tooltip element to be displayed
17
28
  */
18
- tooltip?: React.ReactNode;
29
+ tooltip?: (data: TooltipDataObject) => JSX.Element;
19
30
  /**
20
31
  * Defines the X axis title.
21
32
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-viz",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "description": "A collection of React visualizations for the Hitachi Vantara's Design System.",
5
5
  "homepage": "https://github.com/lumada-design/hv-uikit-react",
6
6
  "license": "Apache-2.0",
@@ -42,7 +42,7 @@
42
42
  "react-dom": "^16.13.1 || ^17.0.2"
43
43
  },
44
44
  "dependencies": {
45
- "@hitachivantara/uikit-react-core": "^3.75.0",
45
+ "@hitachivantara/uikit-react-core": "^3.75.1",
46
46
  "clsx": "^1.2.1",
47
47
  "lodash": "^4.17.21",
48
48
  "prop-types": "^15.8.1",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "033592c2297f208195c8d817561b11b88c3748da"
62
+ "gitHead": "d8482581ba420ea754437df3a1ce92a6acd3c5ce"
63
63
  }