I was able to use tooltip for the eChart gauge. however, I would like to have the background of the tooltip using the color of the value such as the pointer. any idea ?
thanks in advance
option = {
tooltip: {
trigger: "item", backgroundColor: 'inherit',
},
series: [
{
type: "gauge",
startAngle: 180,
endAngle: 0,
center: ["50%", "60%"],
radius: "100%",
min: 0,
max: 1,
splitNumber: 8,
axisLine: {
roundCap: true,
Gap: '100%',
lineStyle: {
width: 13,
color: [
[0.27, '#e76262'],
[0.3, 'transparent'],
[0.52, '#f9cf4a'],
[0.55, 'transparent'],
[0.77, '#eca336'],
[0.8, 'transparent'],
[1, '#3ece80'],
],
},
},
...
],
},
]
};
I need to have my tooltip background same a the colored value
You can use the tooltip formatter funtion to change your chart instance when the tooltip is invoked.
Here is a quick example: