我正在使用Highcharts,我正试图在this.z
部分显示tooltip:formatter
值(如果可能)。
这是PHP的json数组的一个例子我在javascript中传回回调函数:
[1315713600000,20,100]
我可以在工具提示中访问this.x
(1315713600000)和this.y
(20),但如果可能的话,则无法访问this.z
(100)。
有什么想法吗?
答案 0 :(得分:3)
关闭此问题:
this.point.config[2]
答案 1 :(得分:0)
当你在JS中创建数组时,你应该命名属性
data = {x: xValue, y: yValue, z: zValue},
在工具提示中,您可以像这样调用属性:
this.x
this.y
this.point.z