I need to display 3 values on the tooltip: the time, the value and another value(change).
I saw this example (but the jsdfiddle is not working).
I tried this
//each loop..
indice.push(["time", "value1", "value2"]);
, the tooltip settings
tooltip:
{
useHTML: true,
formatter: function()
{
return '' + Highcharts.dateFormat('%H:%M:%S', this.x) +'; '+ this.y + this.z(<-is this right?);
}
},
and the series
series:
[{
type: 'area',
data: indice
}]
can somone help pls? thsnks.
I figured it out, I pass 3 values in the data array
series: [{ type: 'area', name: titleindice, data: indice, showInLegend : false //disable the the show/hide icon }]
and in the tooltip
What i have tried is concatenating series name with x-axis and y-axis value and it works fine for me. What issue you are facing?
If you, in a multi series Highstocks chart, want to display series specific data in the tooltip you could do something like this.
Now you'll see nice series names "Small Cities" instead of the series.name (small_cities). All attributes you set on the series can be found in
this.points[].series.userOptions
. For more formatter options take a look at the Highstocks docs.If you want to pass additional data for a point other than the x and y values, then you have to name that value. In the following example I add the following three additional values to each data point:
Then to access and display those values in the tooltip I use the following:
two ways.
1
2