Open gioneves opened 7 months ago
replace tooltip formatter
formatter: function(params) {
const sdata= myChart.getModel().option.series[0].data;
return '1='+ sdata[0].value +'<br>2='+ sdata[1].value;
}
📌 please close issue if problem solved.
It didn't work, I need to return the value as it is in the image I posted. that is, for the first pointer, I need the tooltip values to be 50 and 30 and for the second pointer the tooltip values to be 75 and 45. In other words, it is necessary to consider the two gauges of the barometer.
formatter: function(params) {
const sdata= myChart.getModel().option.series[0].data;
return '1='+ sdata[0].value +'/'+sdata[0].value*0.6
+'<br>2='+ sdata[1].value +'/'+sdata[1].value*0.6;
}
📌 please close issue if problem solved.
What problem does this feature solve?
I tried to create a tooltip (echarts) that returns the values associated with the two series present in a barometer. The first series has values from 0 to 100 and the second from 0 to 60. The problem is that it is only considering the values from 0 to 100, but not from 0 to 60.
This is my code:
See that it only returns the values in the series from 0 to 100, but I need both to be returned (0 to 100 and 0 to 60) for each of the pointers.
Expected outcome:
What does the proposed API look like?
In other words, I need to consider this scale (from 0 to 60) as well. Thus, the values in the tooltip for the first pointer would be 50 and 30, as in the image. For the second pointer, the values in the tooltip should be 75 and 45.