File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @lg-charts/core ' : patch
3
+ ---
4
+
5
+ Renders a vertical line on hover regardless of whether a ChartTooltip is rendered
Original file line number Diff line number Diff line change @@ -95,4 +95,14 @@ export const getDefaultChartOptions = (
95
95
} ,
96
96
} ,
97
97
} ,
98
+
99
+ // Adds vertical dashed line on hover, even when no tooltip is shown
100
+ tooltip : {
101
+ axisPointer : {
102
+ z : 0 , // Prevents dashed emphasis line from being rendered on top of mark lines and labels
103
+ } ,
104
+ show : true ,
105
+ trigger : 'axis' ,
106
+ formatter : ( ) => '' ,
107
+ } ,
98
108
} ) ;
Original file line number Diff line number Diff line change @@ -32,11 +32,6 @@ export function ChartTooltip({
32
32
{
33
33
tooltip : {
34
34
id,
35
- axisPointer : {
36
- z : 0 , // Prevents dashed emphasis line from being rendered on top of mark lines and labels
37
- } ,
38
- show : true ,
39
- trigger : 'axis' ,
40
35
// Still adding background color to prevent peak of color at corners
41
36
backgroundColor :
42
37
color [ theme ] . background [ Variant . InversePrimary ] [
@@ -79,7 +74,12 @@ export function ChartTooltip({
79
74
{
80
75
tooltip : {
81
76
id,
82
- show : false ,
77
+ axisPointer : {
78
+ z : 0 , // Prevents dashed emphasis line from being rendered on top of mark lines and labels
79
+ } ,
80
+ show : true ,
81
+ trigger : 'axis' ,
82
+ formatter : ( ) => '' ,
83
83
} ,
84
84
} ,
85
85
[ 'tooltip' ] ,
You can’t perform that action at this time.
0 commit comments