@react-fabric/chart 1.0.0-beta.54 → 1.0.0-beta.57
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/cjs/charts/CountSeries.js +9 -8
- package/dist/cjs/wrapper/ChartContainer.js +5 -5
- package/dist/esm/charts/CountSeries.js +9 -8
- package/dist/esm/wrapper/ChartContainer.js +5 -5
- package/dist/types/charts/CountSeries.d.ts +1 -0
- package/dist/types/charts/Generic.d.ts +12 -37
- package/package.json +3 -3
- package/src/charts/CountSeries.tsx +8 -6
- package/src/charts/Generic.tsx +12 -40
- package/src/wrapper/ChartContainer.tsx +5 -3
|
@@ -16,6 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
var CountSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
17
17
|
var _series = _ref.series,
|
|
18
18
|
title = _ref.title,
|
|
19
|
+
seriesName = _ref.seriesName,
|
|
19
20
|
onExport = _ref.onExport,
|
|
20
21
|
chartTheme = _ref.theme,
|
|
21
22
|
_ref$type = _ref.type,
|
|
@@ -48,7 +49,7 @@ var CountSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
48
49
|
var sorted = _series === null || _series === void 0 ? void 0 : _series.sort(utilities.compareValues("desc", "count"));
|
|
49
50
|
var categoryAxis = Object.assign({}, optionOverride === null || optionOverride === void 0 ? void 0 : optionOverride.xAxis, {
|
|
50
51
|
type: "category",
|
|
51
|
-
name:
|
|
52
|
+
name: seriesName !== null && seriesName !== void 0 ? seriesName : "Count Series",
|
|
52
53
|
nameLocation: "center",
|
|
53
54
|
axisTick: {
|
|
54
55
|
show: false
|
|
@@ -65,18 +66,18 @@ var CountSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
65
66
|
});
|
|
66
67
|
var series = type === "pie" ? [{
|
|
67
68
|
type: "pie",
|
|
68
|
-
name:
|
|
69
|
+
name: seriesName !== null && seriesName !== void 0 ? seriesName : "Count Series",
|
|
69
70
|
data: sorted.map(function (item, index) {
|
|
70
|
-
var _item$
|
|
71
|
+
var _item$name;
|
|
71
72
|
return {
|
|
72
73
|
id: item.id,
|
|
73
74
|
value: item.count,
|
|
74
|
-
name: (_item$
|
|
75
|
+
name: (_item$name = item.name) !== null && _item$name !== void 0 ? _item$name : item.id
|
|
75
76
|
};
|
|
76
77
|
}),
|
|
77
78
|
universalTransition: true
|
|
78
79
|
}] : sorted.map(function (item, index) {
|
|
79
|
-
var _item$
|
|
80
|
+
var _item$name2;
|
|
80
81
|
return {
|
|
81
82
|
id: item.id,
|
|
82
83
|
type: "bar",
|
|
@@ -88,10 +89,10 @@ var CountSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
88
89
|
color: "#fff"
|
|
89
90
|
},
|
|
90
91
|
data: [{
|
|
91
|
-
name:
|
|
92
|
+
name: seriesName !== null && seriesName !== void 0 ? seriesName : "Count Series",
|
|
92
93
|
value: item.count
|
|
93
94
|
}],
|
|
94
|
-
name: (_item$
|
|
95
|
+
name: (_item$name2 = item.name) !== null && _item$name2 !== void 0 ? _item$name2 : item.id,
|
|
95
96
|
universalTransition: true
|
|
96
97
|
};
|
|
97
98
|
});
|
|
@@ -101,7 +102,7 @@ var CountSeriesChart = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
101
102
|
xAxis: type === "pie" ? null : type === "bar" ? valueAxis : categoryAxis,
|
|
102
103
|
yAxis: type === "pie" ? null : type === "bar" ? categoryAxis : valueAxis
|
|
103
104
|
});
|
|
104
|
-
}, [_series,
|
|
105
|
+
}, [_series, seriesName, type, optionOverride], "CountChart options");
|
|
105
106
|
return /*#__PURE__*/jsxRuntime.jsxs(ChartContainer.ChartContainer, {
|
|
106
107
|
title: title,
|
|
107
108
|
onExport: onExport,
|
|
@@ -41,8 +41,6 @@ var defaultOptions = {
|
|
|
41
41
|
},
|
|
42
42
|
tooltip: {
|
|
43
43
|
trigger: "item",
|
|
44
|
-
confine: true,
|
|
45
|
-
position: "top",
|
|
46
44
|
appendToBody: true
|
|
47
45
|
},
|
|
48
46
|
legend: {
|
|
@@ -128,9 +126,11 @@ var ChartContainer = /*#__PURE__*/react.memo(function (_ref2) {
|
|
|
128
126
|
return toolboxOptions(dataTableRenderer);
|
|
129
127
|
}, [dataTableRenderer]);
|
|
130
128
|
react.useEffect(function () {
|
|
131
|
-
chartRef === null || chartRef === void 0 || chartRef.setOption(_objectSpread(_objectSpread({}, defaultOptions), {}, {
|
|
129
|
+
chartRef === null || chartRef === void 0 || chartRef.setOption(_objectSpread(_objectSpread(_objectSpread({}, defaultOptions), {}, {
|
|
132
130
|
toolbox: toolbox
|
|
133
|
-
}, options),
|
|
131
|
+
}, options), {}, {
|
|
132
|
+
tooltip: _objectSpread(_objectSpread({}, defaultOptions.tooltip), options.tooltip)
|
|
133
|
+
}), true);
|
|
134
134
|
}, [options, chartRef]);
|
|
135
135
|
var handleExport = react.useCallback(function () {
|
|
136
136
|
var image = chartRef === null || chartRef === void 0 ? void 0 : chartRef.getDataURL({
|
|
@@ -145,7 +145,7 @@ var ChartContainer = /*#__PURE__*/react.memo(function (_ref2) {
|
|
|
145
145
|
return /*#__PURE__*/jsxRuntime.jsxs(react.Fragment, {
|
|
146
146
|
children: [/*#__PURE__*/jsxRuntime.jsxs(ChartToolbar.ChartToolbar, {
|
|
147
147
|
children: [title && /*#__PURE__*/jsxRuntime.jsx(core.Title, {
|
|
148
|
-
className: "flex-
|
|
148
|
+
className: "flex-1 px-2 py-1 text-dimmed",
|
|
149
149
|
children: title
|
|
150
150
|
}), children, onExport && /*#__PURE__*/jsxRuntime.jsx(core.Button, {
|
|
151
151
|
size: "sm",
|
|
@@ -16,6 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
var CountSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
17
17
|
var _series = _ref.series,
|
|
18
18
|
title = _ref.title,
|
|
19
|
+
seriesName = _ref.seriesName,
|
|
19
20
|
onExport = _ref.onExport,
|
|
20
21
|
chartTheme = _ref.theme,
|
|
21
22
|
_ref$type = _ref.type,
|
|
@@ -48,7 +49,7 @@ var CountSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
48
49
|
var sorted = _series === null || _series === void 0 ? void 0 : _series.sort(compareValues("desc", "count"));
|
|
49
50
|
var categoryAxis = Object.assign({}, optionOverride === null || optionOverride === void 0 ? void 0 : optionOverride.xAxis, {
|
|
50
51
|
type: "category",
|
|
51
|
-
name:
|
|
52
|
+
name: seriesName !== null && seriesName !== void 0 ? seriesName : "Count Series",
|
|
52
53
|
nameLocation: "center",
|
|
53
54
|
axisTick: {
|
|
54
55
|
show: false
|
|
@@ -65,18 +66,18 @@ var CountSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
65
66
|
});
|
|
66
67
|
var series = type === "pie" ? [{
|
|
67
68
|
type: "pie",
|
|
68
|
-
name:
|
|
69
|
+
name: seriesName !== null && seriesName !== void 0 ? seriesName : "Count Series",
|
|
69
70
|
data: sorted.map(function (item, index) {
|
|
70
|
-
var _item$
|
|
71
|
+
var _item$name;
|
|
71
72
|
return {
|
|
72
73
|
id: item.id,
|
|
73
74
|
value: item.count,
|
|
74
|
-
name: (_item$
|
|
75
|
+
name: (_item$name = item.name) !== null && _item$name !== void 0 ? _item$name : item.id
|
|
75
76
|
};
|
|
76
77
|
}),
|
|
77
78
|
universalTransition: true
|
|
78
79
|
}] : sorted.map(function (item, index) {
|
|
79
|
-
var _item$
|
|
80
|
+
var _item$name2;
|
|
80
81
|
return {
|
|
81
82
|
id: item.id,
|
|
82
83
|
type: "bar",
|
|
@@ -88,10 +89,10 @@ var CountSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
88
89
|
color: "#fff"
|
|
89
90
|
},
|
|
90
91
|
data: [{
|
|
91
|
-
name:
|
|
92
|
+
name: seriesName !== null && seriesName !== void 0 ? seriesName : "Count Series",
|
|
92
93
|
value: item.count
|
|
93
94
|
}],
|
|
94
|
-
name: (_item$
|
|
95
|
+
name: (_item$name2 = item.name) !== null && _item$name2 !== void 0 ? _item$name2 : item.id,
|
|
95
96
|
universalTransition: true
|
|
96
97
|
};
|
|
97
98
|
});
|
|
@@ -101,7 +102,7 @@ var CountSeriesChart = /*#__PURE__*/memo(function (_ref) {
|
|
|
101
102
|
xAxis: type === "pie" ? null : type === "bar" ? valueAxis : categoryAxis,
|
|
102
103
|
yAxis: type === "pie" ? null : type === "bar" ? categoryAxis : valueAxis
|
|
103
104
|
});
|
|
104
|
-
}, [_series,
|
|
105
|
+
}, [_series, seriesName, type, optionOverride], "CountChart options");
|
|
105
106
|
return /*#__PURE__*/jsxs(ChartContainer, {
|
|
106
107
|
title: title,
|
|
107
108
|
onExport: onExport,
|
|
@@ -22,8 +22,6 @@ var defaultOptions = {
|
|
|
22
22
|
},
|
|
23
23
|
tooltip: {
|
|
24
24
|
trigger: "item",
|
|
25
|
-
confine: true,
|
|
26
|
-
position: "top",
|
|
27
25
|
appendToBody: true
|
|
28
26
|
},
|
|
29
27
|
legend: {
|
|
@@ -109,9 +107,11 @@ var ChartContainer = /*#__PURE__*/memo(function (_ref2) {
|
|
|
109
107
|
return toolboxOptions(dataTableRenderer);
|
|
110
108
|
}, [dataTableRenderer]);
|
|
111
109
|
useEffect(function () {
|
|
112
|
-
chartRef === null || chartRef === void 0 || chartRef.setOption(_objectSpread(_objectSpread({}, defaultOptions), {}, {
|
|
110
|
+
chartRef === null || chartRef === void 0 || chartRef.setOption(_objectSpread(_objectSpread(_objectSpread({}, defaultOptions), {}, {
|
|
113
111
|
toolbox: toolbox
|
|
114
|
-
}, options),
|
|
112
|
+
}, options), {}, {
|
|
113
|
+
tooltip: _objectSpread(_objectSpread({}, defaultOptions.tooltip), options.tooltip)
|
|
114
|
+
}), true);
|
|
115
115
|
}, [options, chartRef]);
|
|
116
116
|
var handleExport = useCallback(function () {
|
|
117
117
|
var image = chartRef === null || chartRef === void 0 ? void 0 : chartRef.getDataURL({
|
|
@@ -126,7 +126,7 @@ var ChartContainer = /*#__PURE__*/memo(function (_ref2) {
|
|
|
126
126
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
127
127
|
children: [/*#__PURE__*/jsxs(ChartToolbar, {
|
|
128
128
|
children: [title && /*#__PURE__*/jsx(Title, {
|
|
129
|
-
className: "flex-
|
|
129
|
+
className: "flex-1 px-2 py-1 text-dimmed",
|
|
130
130
|
children: title
|
|
131
131
|
}), children, onExport && /*#__PURE__*/jsx(Button, {
|
|
132
132
|
size: "sm",
|
|
@@ -1,48 +1,23 @@
|
|
|
1
1
|
import { type EChartOption, type EChartsType } from "echarts";
|
|
2
2
|
import { type FC, type Ref } from "react";
|
|
3
|
-
import {
|
|
4
|
-
export interface GenericProps extends
|
|
3
|
+
import { Theme } from "../types";
|
|
4
|
+
export interface GenericProps extends Omit<EChartOption, "title"> {
|
|
5
5
|
chartRef?: Ref<EChartsType>;
|
|
6
|
-
|
|
7
|
-
toolbox?: EChartOption["toolbox"];
|
|
8
|
-
tooltip?: EChartOption["tooltip"];
|
|
6
|
+
title?: string;
|
|
9
7
|
actions?: JSX.Element;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* The theme to be applied to the chart.
|
|
10
|
+
* This can be one of the predefined themes or a custom theme object.
|
|
11
|
+
* Predefined themes include "default", "activity", "cloud", "qualitative", "diverging", "sequential",
|
|
12
|
+
* "spectral", "uber", "fireice", "warming", "sunrise", "ocean", "wine", "red", "green", and "blue".
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
theme?: Theme;
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Whether to show the theme selector in the chart.
|
|
17
|
+
* This is useful for allowing users to switch between different themes.
|
|
18
|
+
* If set to true, the chart will render a toggle button group to select the theme.
|
|
16
19
|
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* chart series
|
|
20
|
-
*/
|
|
21
|
-
series?: EChartOption["series"];
|
|
22
|
-
/**
|
|
23
|
-
* polar series
|
|
24
|
-
*/
|
|
25
|
-
polar?: EChartOption["polar"];
|
|
26
|
-
/**
|
|
27
|
-
* polar axis
|
|
28
|
-
*/
|
|
29
|
-
angleAxis?: EChartOption["angleAxis"];
|
|
30
|
-
/**
|
|
31
|
-
* polar axis
|
|
32
|
-
*/
|
|
33
|
-
radiusAxis?: EChartOption["radiusAxis"];
|
|
34
|
-
/**
|
|
35
|
-
* radar series
|
|
36
|
-
*/
|
|
37
|
-
radar?: EChartOption["radar"];
|
|
38
|
-
/**
|
|
39
|
-
* paarllel series
|
|
40
|
-
*/
|
|
41
|
-
parallel?: EChartOption["parallel"];
|
|
42
|
-
/**
|
|
43
|
-
* parallel axis
|
|
44
|
-
*/
|
|
45
|
-
parallelAxis?: EChartOption["parallelAxis"];
|
|
20
|
+
showThemeSelector?: boolean;
|
|
46
21
|
onClick?: (e: KeyValue) => void;
|
|
47
22
|
onRendered?: (e: KeyValue) => void;
|
|
48
23
|
onBrush?: (e: KeyValue) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/chart",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.57",
|
|
4
4
|
"description": "RUF: Charting package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"watch": "npm-run-all -p watch:rollup watch:dts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@react-fabric/core": "^1.0.0-beta.
|
|
38
|
+
"@react-fabric/core": "^1.0.0-beta.57",
|
|
39
39
|
"@react-fabric/utilities": "^1.0.0-beta.52",
|
|
40
40
|
"classnames": "^2.5.1",
|
|
41
41
|
"color": "^4.2.3",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"node": ">=18.12.0",
|
|
57
57
|
"npm": ">=8.19.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "9b596a0a8d6cecaa8479f80c495b64fb42ce739f"
|
|
60
60
|
}
|
|
@@ -38,6 +38,7 @@ import { ChartWrapper } from "../wrapper/ChartWrapper";
|
|
|
38
38
|
import { PaletteSelect } from "../wrapper/PaletteSelect";
|
|
39
39
|
|
|
40
40
|
export interface CountSeriesProps extends BaseChart, CountType {
|
|
41
|
+
seriesName?: string;
|
|
41
42
|
type?: "pie" | "bar" | "column";
|
|
42
43
|
onClick?: (key: string) => void;
|
|
43
44
|
}
|
|
@@ -46,6 +47,7 @@ const CountSeriesChart: FC<CountSeriesProps> = memo(
|
|
|
46
47
|
({
|
|
47
48
|
series: _series,
|
|
48
49
|
title,
|
|
50
|
+
seriesName,
|
|
49
51
|
onExport,
|
|
50
52
|
theme: chartTheme,
|
|
51
53
|
type: chartType = "pie",
|
|
@@ -79,7 +81,7 @@ const CountSeriesChart: FC<CountSeriesProps> = memo(
|
|
|
79
81
|
optionOverride?.xAxis,
|
|
80
82
|
{
|
|
81
83
|
type: "category",
|
|
82
|
-
name:
|
|
84
|
+
name: seriesName ?? "Count Series",
|
|
83
85
|
nameLocation: "center",
|
|
84
86
|
axisTick: {
|
|
85
87
|
show: false,
|
|
@@ -99,11 +101,11 @@ const CountSeriesChart: FC<CountSeriesProps> = memo(
|
|
|
99
101
|
? [
|
|
100
102
|
{
|
|
101
103
|
type: "pie",
|
|
102
|
-
name:
|
|
104
|
+
name: seriesName ?? "Count Series",
|
|
103
105
|
data: sorted.map((item, index) => ({
|
|
104
106
|
id: item.id,
|
|
105
107
|
value: item.count,
|
|
106
|
-
name: item.
|
|
108
|
+
name: item.name ?? item.id,
|
|
107
109
|
})),
|
|
108
110
|
universalTransition: true,
|
|
109
111
|
},
|
|
@@ -120,11 +122,11 @@ const CountSeriesChart: FC<CountSeriesProps> = memo(
|
|
|
120
122
|
},
|
|
121
123
|
data: [
|
|
122
124
|
{
|
|
123
|
-
name:
|
|
125
|
+
name: seriesName ?? "Count Series",
|
|
124
126
|
value: item.count,
|
|
125
127
|
},
|
|
126
128
|
],
|
|
127
|
-
name: item.
|
|
129
|
+
name: item.name ?? item.id,
|
|
128
130
|
universalTransition: true,
|
|
129
131
|
}));
|
|
130
132
|
return {
|
|
@@ -137,7 +139,7 @@ const CountSeriesChart: FC<CountSeriesProps> = memo(
|
|
|
137
139
|
type === "pie" ? null : type === "bar" ? categoryAxis : valueAxis,
|
|
138
140
|
};
|
|
139
141
|
},
|
|
140
|
-
[_series,
|
|
142
|
+
[_series, seriesName, type, optionOverride],
|
|
141
143
|
"CountChart options",
|
|
142
144
|
);
|
|
143
145
|
|
package/src/charts/Generic.tsx
CHANGED
|
@@ -31,59 +31,31 @@ import {
|
|
|
31
31
|
type FC,
|
|
32
32
|
type Ref,
|
|
33
33
|
} from "react";
|
|
34
|
-
import {
|
|
34
|
+
import { Theme } from "../types";
|
|
35
35
|
import { ChartContainer } from "../wrapper/ChartContainer";
|
|
36
36
|
import { ChartWrapper } from "../wrapper/ChartWrapper";
|
|
37
37
|
import { PaletteSelect } from "../wrapper/PaletteSelect";
|
|
38
38
|
|
|
39
|
-
export interface GenericProps extends
|
|
39
|
+
export interface GenericProps extends Omit<EChartOption, "title"> {
|
|
40
40
|
chartRef?: Ref<EChartsType>;
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
toolbox?: EChartOption["toolbox"];
|
|
44
|
-
tooltip?: EChartOption["tooltip"];
|
|
42
|
+
title?: string;
|
|
45
43
|
|
|
46
44
|
actions?: JSX.Element;
|
|
47
45
|
|
|
48
46
|
/**
|
|
49
|
-
*
|
|
47
|
+
* The theme to be applied to the chart.
|
|
48
|
+
* This can be one of the predefined themes or a custom theme object.
|
|
49
|
+
* Predefined themes include "default", "activity", "cloud", "qualitative", "diverging", "sequential",
|
|
50
|
+
* "spectral", "uber", "fireice", "warming", "sunrise", "ocean", "wine", "red", "green", and "blue".
|
|
50
51
|
*/
|
|
51
|
-
|
|
52
|
+
theme?: Theme;
|
|
52
53
|
/**
|
|
53
|
-
*
|
|
54
|
+
* Whether to show the theme selector in the chart.
|
|
55
|
+
* This is useful for allowing users to switch between different themes.
|
|
56
|
+
* If set to true, the chart will render a toggle button group to select the theme.
|
|
54
57
|
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* chart series
|
|
58
|
-
*/
|
|
59
|
-
series?: EChartOption["series"];
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* polar series
|
|
63
|
-
*/
|
|
64
|
-
polar?: EChartOption["polar"];
|
|
65
|
-
/**
|
|
66
|
-
* polar axis
|
|
67
|
-
*/
|
|
68
|
-
angleAxis?: EChartOption["angleAxis"];
|
|
69
|
-
/**
|
|
70
|
-
* polar axis
|
|
71
|
-
*/
|
|
72
|
-
radiusAxis?: EChartOption["radiusAxis"];
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* radar series
|
|
76
|
-
*/
|
|
77
|
-
radar?: EChartOption["radar"];
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* paarllel series
|
|
81
|
-
*/
|
|
82
|
-
parallel?: EChartOption["parallel"];
|
|
83
|
-
/**
|
|
84
|
-
* parallel axis
|
|
85
|
-
*/
|
|
86
|
-
parallelAxis?: EChartOption["parallelAxis"];
|
|
58
|
+
showThemeSelector?: boolean;
|
|
87
59
|
|
|
88
60
|
onClick?: (e: KeyValue) => void;
|
|
89
61
|
onRendered?: (e: KeyValue) => void;
|
|
@@ -56,8 +56,6 @@ const defaultOptions = {
|
|
|
56
56
|
},
|
|
57
57
|
tooltip: {
|
|
58
58
|
trigger: "item",
|
|
59
|
-
confine: true,
|
|
60
|
-
position: "top",
|
|
61
59
|
appendToBody: true,
|
|
62
60
|
} as AnyObject,
|
|
63
61
|
legend: {
|
|
@@ -165,6 +163,10 @@ export const ChartContainer = memo(
|
|
|
165
163
|
...defaultOptions,
|
|
166
164
|
toolbox,
|
|
167
165
|
...options,
|
|
166
|
+
tooltip: {
|
|
167
|
+
...defaultOptions.tooltip,
|
|
168
|
+
...options.tooltip,
|
|
169
|
+
},
|
|
168
170
|
},
|
|
169
171
|
true,
|
|
170
172
|
);
|
|
@@ -182,7 +184,7 @@ export const ChartContainer = memo(
|
|
|
182
184
|
<Fragment>
|
|
183
185
|
<ChartToolbar>
|
|
184
186
|
{title && (
|
|
185
|
-
<Title className="flex-
|
|
187
|
+
<Title className="flex-1 px-2 py-1 text-dimmed">{title}</Title>
|
|
186
188
|
)}
|
|
187
189
|
{children}
|
|
188
190
|
{onExport && (
|