@hitachivantara/uikit-react-viz 6.1.6 → 6.1.7
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/BarChart/BarChart.js +86 -112
- package/dist/BaseChart/BaseChart.js +53 -51
- package/dist/Boxplot/Boxplot.js +68 -83
- package/dist/Boxplot/Boxplot.styles.js +22 -23
- package/dist/Boxplot/useBoxplot.js +56 -70
- package/dist/Boxplot/useBoxplotData.js +34 -37
- package/dist/ConfusionMatrix/ConfusionMatrix.js +151 -150
- package/dist/ConfusionMatrix/ConfusionMatrix.styles.js +23 -27
- package/dist/ConfusionMatrix/utils.js +105 -138
- package/dist/DonutChart/DonutChart.js +67 -85
- package/dist/Heatmap/Heatmap.js +81 -97
- package/dist/Heatmap/Heatmap.styles.js +22 -23
- package/dist/LineChart/LineChart.js +84 -110
- package/dist/ScatterPlot/ScatterPlot.js +80 -102
- package/dist/Treemap/Treemap.js +36 -50
- package/dist/hooks/tooltip/styles.js +76 -77
- package/dist/hooks/tooltip/useTooltip.js +66 -89
- package/dist/hooks/useData.js +122 -162
- package/dist/hooks/useDataZoom.js +17 -25
- package/dist/hooks/useDataset.js +10 -14
- package/dist/hooks/useGrid.js +21 -37
- package/dist/hooks/useLegend.js +35 -44
- package/dist/hooks/useOption.js +12 -18
- package/dist/hooks/useSeries.js +84 -117
- package/dist/hooks/useVisualMap.js +38 -55
- package/dist/hooks/useXAxis.js +42 -61
- package/dist/hooks/useYAxis.js +31 -55
- package/dist/index.js +2 -16
- package/dist/providers/Provider.js +41 -21
- package/dist/utils/index.js +120 -186
- package/dist/utils/registerTheme.js +84 -122
- package/package.json +4 -4
|
@@ -1,118 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { LineChart } from "echarts/charts";
|
|
4
|
-
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, DataZoomSliderComponent, DataZoomInsideComponent, MarkLineComponent } from "echarts/components";
|
|
5
|
-
import * as echarts from "echarts/core";
|
|
6
|
-
import { useData } from "../hooks/useData.js";
|
|
7
|
-
import { useDataset } from "../hooks/useDataset.js";
|
|
8
|
-
import { useYAxis } from "../hooks/useYAxis.js";
|
|
9
|
-
import { useXAxis } from "../hooks/useXAxis.js";
|
|
1
|
+
import { HvBaseChart } from "../BaseChart/BaseChart.js";
|
|
10
2
|
import { useDataZoom } from "../hooks/useDataZoom.js";
|
|
3
|
+
import { useXAxis } from "../hooks/useXAxis.js";
|
|
4
|
+
import { useYAxis } from "../hooks/useYAxis.js";
|
|
11
5
|
import { useGrid } from "../hooks/useGrid.js";
|
|
6
|
+
import { useData } from "../hooks/useData.js";
|
|
7
|
+
import { useDataset } from "../hooks/useDataset.js";
|
|
12
8
|
import { useSeries } from "../hooks/useSeries.js";
|
|
13
9
|
import { useLegend } from "../hooks/useLegend.js";
|
|
14
10
|
import { useTooltip } from "../hooks/tooltip/useTooltip.js";
|
|
15
11
|
import { useOption } from "../hooks/useOption.js";
|
|
16
|
-
import {
|
|
12
|
+
import { forwardRef } from "react";
|
|
13
|
+
import { DataZoomInsideComponent, DataZoomSliderComponent, DatasetComponent, GridComponent, LegendComponent, MarkLineComponent, TooltipComponent } from "echarts/components";
|
|
14
|
+
import * as echarts from "echarts/core";
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
import { LineChart } from "echarts/charts";
|
|
17
|
+
//#region src/LineChart/LineChart.tsx
|
|
17
18
|
echarts.use([
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
LineChart,
|
|
20
|
+
DatasetComponent,
|
|
21
|
+
GridComponent,
|
|
22
|
+
TooltipComponent,
|
|
23
|
+
LegendComponent,
|
|
24
|
+
DataZoomSliderComponent,
|
|
25
|
+
DataZoomInsideComponent,
|
|
26
|
+
MarkLineComponent
|
|
26
27
|
]);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
option: {
|
|
93
|
-
...chartYAxis,
|
|
94
|
-
...chartXAxis,
|
|
95
|
-
...chartSlider,
|
|
96
|
-
...chartGrid,
|
|
97
|
-
...chartDataset,
|
|
98
|
-
...chartSeries,
|
|
99
|
-
...chartLegend,
|
|
100
|
-
...chartTooltip
|
|
101
|
-
},
|
|
102
|
-
onOptionChange
|
|
103
|
-
});
|
|
104
|
-
return /* @__PURE__ */ jsx(
|
|
105
|
-
HvBaseChart,
|
|
106
|
-
{
|
|
107
|
-
ref,
|
|
108
|
-
option,
|
|
109
|
-
width,
|
|
110
|
-
height,
|
|
111
|
-
...others
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
export {
|
|
117
|
-
HvLineChart
|
|
118
|
-
};
|
|
28
|
+
/**
|
|
29
|
+
* A line chart or line plot or line graph is a type of chart which displays information as a series of data points
|
|
30
|
+
* connected by straight line segments.
|
|
31
|
+
*/
|
|
32
|
+
var HvLineChart = forwardRef(function HvLineChart(props, ref) {
|
|
33
|
+
const { area = false, emptyCellMode = "void", areaOpacity = .5, yAxis, xAxis, horizontalRangeSlider, grid, data, groupBy, splitBy, sortBy, filters, measures, stack, seriesNameFormatter, legend, classes, tooltip, width, height, onOptionChange, ...others } = props;
|
|
34
|
+
const { data: chartData, mapping: measuresMapping } = useData({
|
|
35
|
+
data,
|
|
36
|
+
groupBy,
|
|
37
|
+
measures,
|
|
38
|
+
splitBy,
|
|
39
|
+
sortBy,
|
|
40
|
+
filters
|
|
41
|
+
});
|
|
42
|
+
const chartDataset = useDataset(chartData);
|
|
43
|
+
const chartYAxis = useYAxis({ axes: Array.isArray(yAxis) || yAxis == null ? yAxis : [yAxis] });
|
|
44
|
+
const chartXAxis = useXAxis({
|
|
45
|
+
...xAxis,
|
|
46
|
+
scale: true
|
|
47
|
+
});
|
|
48
|
+
const chartSlider = useDataZoom({ showHorizontal: horizontalRangeSlider?.show });
|
|
49
|
+
const chartGrid = useGrid({ ...grid });
|
|
50
|
+
const chartSeries = useSeries({
|
|
51
|
+
type: "line",
|
|
52
|
+
data: chartData,
|
|
53
|
+
groupBy,
|
|
54
|
+
measuresMapping,
|
|
55
|
+
area,
|
|
56
|
+
areaOpacity,
|
|
57
|
+
emptyCellMode,
|
|
58
|
+
stack,
|
|
59
|
+
nameFormatter: seriesNameFormatter
|
|
60
|
+
});
|
|
61
|
+
const chartLegend = useLegend({
|
|
62
|
+
...legend,
|
|
63
|
+
series: chartSeries.series
|
|
64
|
+
});
|
|
65
|
+
const chartTooltip = useTooltip({
|
|
66
|
+
...tooltip,
|
|
67
|
+
trigger: "axis",
|
|
68
|
+
measuresMapping,
|
|
69
|
+
classes
|
|
70
|
+
});
|
|
71
|
+
return /* @__PURE__ */ jsx(HvBaseChart, {
|
|
72
|
+
ref,
|
|
73
|
+
option: useOption({
|
|
74
|
+
option: {
|
|
75
|
+
...chartYAxis,
|
|
76
|
+
...chartXAxis,
|
|
77
|
+
...chartSlider,
|
|
78
|
+
...chartGrid,
|
|
79
|
+
...chartDataset,
|
|
80
|
+
...chartSeries,
|
|
81
|
+
...chartLegend,
|
|
82
|
+
...chartTooltip
|
|
83
|
+
},
|
|
84
|
+
onOptionChange
|
|
85
|
+
}),
|
|
86
|
+
width,
|
|
87
|
+
height,
|
|
88
|
+
...others
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
//#endregion
|
|
92
|
+
export { HvLineChart };
|
|
@@ -1,110 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { ScatterChart } from "echarts/charts";
|
|
4
|
-
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, DataZoomSliderComponent, DataZoomInsideComponent, MarkLineComponent } from "echarts/components";
|
|
5
|
-
import * as echarts from "echarts/core";
|
|
6
|
-
import { useData } from "../hooks/useData.js";
|
|
7
|
-
import { useDataset } from "../hooks/useDataset.js";
|
|
8
|
-
import { useYAxis } from "../hooks/useYAxis.js";
|
|
9
|
-
import { useXAxis } from "../hooks/useXAxis.js";
|
|
1
|
+
import { HvBaseChart } from "../BaseChart/BaseChart.js";
|
|
10
2
|
import { useDataZoom } from "../hooks/useDataZoom.js";
|
|
3
|
+
import { useXAxis } from "../hooks/useXAxis.js";
|
|
4
|
+
import { useYAxis } from "../hooks/useYAxis.js";
|
|
11
5
|
import { useGrid } from "../hooks/useGrid.js";
|
|
6
|
+
import { useData } from "../hooks/useData.js";
|
|
7
|
+
import { useDataset } from "../hooks/useDataset.js";
|
|
12
8
|
import { useSeries } from "../hooks/useSeries.js";
|
|
13
9
|
import { useLegend } from "../hooks/useLegend.js";
|
|
14
10
|
import { useTooltip } from "../hooks/tooltip/useTooltip.js";
|
|
15
11
|
import { useOption } from "../hooks/useOption.js";
|
|
16
|
-
import {
|
|
12
|
+
import { forwardRef } from "react";
|
|
13
|
+
import { DataZoomInsideComponent, DataZoomSliderComponent, DatasetComponent, GridComponent, LegendComponent, MarkLineComponent, TooltipComponent } from "echarts/components";
|
|
14
|
+
import * as echarts from "echarts/core";
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
import { ScatterChart } from "echarts/charts";
|
|
17
|
+
//#region src/ScatterPlot/ScatterPlot.tsx
|
|
17
18
|
echarts.use([
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
ScatterChart,
|
|
20
|
+
DatasetComponent,
|
|
21
|
+
GridComponent,
|
|
22
|
+
TooltipComponent,
|
|
23
|
+
LegendComponent,
|
|
24
|
+
DataZoomSliderComponent,
|
|
25
|
+
DataZoomInsideComponent,
|
|
26
|
+
MarkLineComponent
|
|
26
27
|
]);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
...chartGrid,
|
|
89
|
-
...chartDataset,
|
|
90
|
-
...chartSeries,
|
|
91
|
-
...chartLegend,
|
|
92
|
-
...chartTooltip
|
|
93
|
-
},
|
|
94
|
-
onOptionChange
|
|
95
|
-
});
|
|
96
|
-
return /* @__PURE__ */ jsx(
|
|
97
|
-
HvBaseChart,
|
|
98
|
-
{
|
|
99
|
-
ref,
|
|
100
|
-
option,
|
|
101
|
-
width,
|
|
102
|
-
height,
|
|
103
|
-
...others
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
export {
|
|
109
|
-
HvScatterPlot
|
|
110
|
-
};
|
|
28
|
+
/**
|
|
29
|
+
* A scatter plot is a type of chart which displays dots to represent two numeric variables.
|
|
30
|
+
* This type of chart is used to determine the relationship between two variables.
|
|
31
|
+
*/
|
|
32
|
+
var HvScatterPlot = forwardRef(function HvScatterPlot(props, ref) {
|
|
33
|
+
const { yAxis, xAxis, horizontalRangeSlider, grid, data, groupBy, splitBy, sortBy, filters, measures, seriesNameFormatter, legend, classes, tooltip, width, height, onOptionChange, ...others } = props;
|
|
34
|
+
const { data: chartData, mapping: measuresMapping } = useData({
|
|
35
|
+
data,
|
|
36
|
+
groupBy,
|
|
37
|
+
measures,
|
|
38
|
+
splitBy,
|
|
39
|
+
sortBy,
|
|
40
|
+
filters
|
|
41
|
+
});
|
|
42
|
+
const chartDataset = useDataset(chartData);
|
|
43
|
+
const chartYAxis = useYAxis({ axes: Array.isArray(yAxis) || yAxis == null ? yAxis : [yAxis] });
|
|
44
|
+
const chartXAxis = useXAxis({
|
|
45
|
+
type: "continuous",
|
|
46
|
+
...xAxis
|
|
47
|
+
});
|
|
48
|
+
const chartSlider = useDataZoom({ showHorizontal: horizontalRangeSlider?.show });
|
|
49
|
+
const chartGrid = useGrid({ ...grid });
|
|
50
|
+
const chartSeries = useSeries({
|
|
51
|
+
type: "scatter",
|
|
52
|
+
data: chartData,
|
|
53
|
+
groupBy,
|
|
54
|
+
measuresMapping,
|
|
55
|
+
nameFormatter: seriesNameFormatter
|
|
56
|
+
});
|
|
57
|
+
const chartLegend = useLegend({
|
|
58
|
+
...legend,
|
|
59
|
+
series: chartSeries.series
|
|
60
|
+
});
|
|
61
|
+
const chartTooltip = useTooltip({
|
|
62
|
+
...tooltip,
|
|
63
|
+
trigger: "axis",
|
|
64
|
+
measuresMapping,
|
|
65
|
+
classes
|
|
66
|
+
});
|
|
67
|
+
return /* @__PURE__ */ jsx(HvBaseChart, {
|
|
68
|
+
ref,
|
|
69
|
+
option: useOption({
|
|
70
|
+
option: {
|
|
71
|
+
...chartYAxis,
|
|
72
|
+
...chartXAxis,
|
|
73
|
+
...chartSlider,
|
|
74
|
+
...chartGrid,
|
|
75
|
+
...chartDataset,
|
|
76
|
+
...chartSeries,
|
|
77
|
+
...chartLegend,
|
|
78
|
+
...chartTooltip
|
|
79
|
+
},
|
|
80
|
+
onOptionChange
|
|
81
|
+
}),
|
|
82
|
+
width,
|
|
83
|
+
height,
|
|
84
|
+
...others
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
//#endregion
|
|
88
|
+
export { HvScatterPlot };
|
package/dist/Treemap/Treemap.js
CHANGED
|
@@ -1,54 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HvBaseChart } from "../BaseChart/BaseChart.js";
|
|
2
|
+
import { useTooltip } from "../hooks/tooltip/useTooltip.js";
|
|
3
|
+
import { useOption } from "../hooks/useOption.js";
|
|
2
4
|
import { forwardRef } from "react";
|
|
3
|
-
import { TreemapChart } from "echarts/charts";
|
|
4
5
|
import { TooltipComponent } from "echarts/components";
|
|
5
6
|
import * as echarts from "echarts/core";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { TreemapChart } from "echarts/charts";
|
|
9
|
+
//#region src/Treemap/Treemap.tsx
|
|
9
10
|
echarts.use([TreemapChart, TooltipComponent]);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return /* @__PURE__ */ jsx(
|
|
41
|
-
HvBaseChart,
|
|
42
|
-
{
|
|
43
|
-
ref,
|
|
44
|
-
option,
|
|
45
|
-
width,
|
|
46
|
-
height,
|
|
47
|
-
...others
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
export {
|
|
53
|
-
HvTreemapChart
|
|
54
|
-
};
|
|
11
|
+
/**
|
|
12
|
+
* A tree map chart visually represents hierarchical data using nested rectangles, with each rectangle's size proportional to the value it represents.
|
|
13
|
+
*/
|
|
14
|
+
var HvTreemapChart = forwardRef(function HvTreemapChart(props, ref) {
|
|
15
|
+
const { name, data, classes, width, height, tooltip, onOptionChange, ...others } = props;
|
|
16
|
+
const chartTooltip = useTooltip({
|
|
17
|
+
...tooltip,
|
|
18
|
+
type: "single",
|
|
19
|
+
classes
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsx(HvBaseChart, {
|
|
22
|
+
ref,
|
|
23
|
+
option: useOption({
|
|
24
|
+
option: {
|
|
25
|
+
series: [{
|
|
26
|
+
name,
|
|
27
|
+
type: "treemap",
|
|
28
|
+
data
|
|
29
|
+
}],
|
|
30
|
+
...chartTooltip
|
|
31
|
+
},
|
|
32
|
+
onOptionChange
|
|
33
|
+
}),
|
|
34
|
+
width,
|
|
35
|
+
height,
|
|
36
|
+
...others
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { HvTreemapChart };
|
|
@@ -1,80 +1,79 @@
|
|
|
1
1
|
import { createClasses } from "@hitachivantara/uikit-react-utils";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
3
|
+
//#region src/hooks/tooltip/styles.tsx
|
|
4
|
+
var { useClasses, staticClasses } = createClasses("HvChartTooltip", {
|
|
5
|
+
/** Single tooltip styles */
|
|
6
|
+
singleTooltipRoot: {
|
|
7
|
+
width: "fit-content",
|
|
8
|
+
boxShadow: theme.colors.shadow,
|
|
9
|
+
backgroundColor: theme.colors.bgContainer,
|
|
10
|
+
padding: theme.space.sm,
|
|
11
|
+
display: "flex"
|
|
12
|
+
},
|
|
13
|
+
singleTooltipTitle: {
|
|
14
|
+
fontFamily: theme.fontFamily.body,
|
|
15
|
+
fontWeight: theme.fontWeights.semibold,
|
|
16
|
+
fontSize: theme.fontSizes.sm,
|
|
17
|
+
color: theme.colors.text
|
|
18
|
+
},
|
|
19
|
+
singleTooltipValue: {
|
|
20
|
+
fontFamily: theme.fontFamily.body,
|
|
21
|
+
fontWeight: theme.fontWeights.normal,
|
|
22
|
+
fontSize: theme.fontSizes.sm,
|
|
23
|
+
color: theme.colors.text,
|
|
24
|
+
marginLeft: theme.space.xs
|
|
25
|
+
},
|
|
26
|
+
/** Multiple tooltip styles */
|
|
27
|
+
multipleTooltipRoot: {
|
|
28
|
+
width: "fit-content",
|
|
29
|
+
boxShadow: theme.colors.shadow,
|
|
30
|
+
backgroundColor: theme.colors.bgContainer
|
|
31
|
+
},
|
|
32
|
+
multipleTooltipTitleContainer: {
|
|
33
|
+
padding: `15px ${theme.space.sm}`,
|
|
34
|
+
borderBottom: `3px solid ${theme.colors.bgPage}`
|
|
35
|
+
},
|
|
36
|
+
multipleTooltipTitle: {
|
|
37
|
+
fontFamily: theme.fontFamily.body,
|
|
38
|
+
fontWeight: theme.fontWeights.semibold,
|
|
39
|
+
fontSize: theme.fontSizes.sm,
|
|
40
|
+
color: theme.colors.text
|
|
41
|
+
},
|
|
42
|
+
multipleTooltipValuesContainer: {
|
|
43
|
+
display: "flex",
|
|
44
|
+
flexDirection: "column",
|
|
45
|
+
padding: theme.space.sm,
|
|
46
|
+
"& > *:not(:last-child)": { paddingBottom: theme.space.sm }
|
|
47
|
+
},
|
|
48
|
+
multipleTooltipSeriesContainer: {
|
|
49
|
+
display: "flex",
|
|
50
|
+
flexDirection: "row",
|
|
51
|
+
justifyContent: "space-between",
|
|
52
|
+
alignItems: "center"
|
|
53
|
+
},
|
|
54
|
+
multipleTooltipSeriesNameContainer: {
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexDirection: "row",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
marginRight: theme.space.sm
|
|
59
|
+
},
|
|
60
|
+
multipleTooltipSeriesColor: {
|
|
61
|
+
width: "10px",
|
|
62
|
+
height: "10px",
|
|
63
|
+
marginRight: "5px"
|
|
64
|
+
},
|
|
65
|
+
multipleTooltipSeriesName: {
|
|
66
|
+
fontFamily: theme.fontFamily.body,
|
|
67
|
+
fontWeight: theme.fontWeights.semibold,
|
|
68
|
+
fontSize: theme.fontSizes.sm,
|
|
69
|
+
color: theme.colors.text
|
|
70
|
+
},
|
|
71
|
+
multipleTooltipSeriesValue: {
|
|
72
|
+
fontFamily: theme.fontFamily.body,
|
|
73
|
+
fontWeight: theme.fontWeights.normal,
|
|
74
|
+
fontSize: theme.fontSizes.sm,
|
|
75
|
+
color: theme.colors.text
|
|
76
|
+
}
|
|
76
77
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
useClasses
|
|
80
|
-
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { useClasses };
|