Reputation: 81
I'm working with Highcharts and I'm trying to display the this.z
value (if possible) in the tooltip:formatter
section.
This is an example of the json array from PHP I am passing back to a callbackfunction in javascript:
[1315713600000,20,100]
I am able to access this.x
(1315713600000) and this.y
(20) in the tooltips, but cannot access this.z
(100) if it's at all possible.
Any ideas?
Upvotes: 1
Views: 2594
Reputation: 666
When yo create the array in JS you should name the properties
data = {x: xValue, y: yValue, z: zValue},
And in the tooltip you can call the property like this:
this.x
this.y
this.point.z
Upvotes: 0