问题描述
我需要从要点击的特定类别的图表中构建一个向下钻取表, 我正在使用click事件来触发一个新页面,以从高位图表生成明细表格数据,但是正在生成整个图表数据。 如何获得图表中被单击的特定元素的数据? 我可以提取要单击的点的类别,但不能提取序列数据。我出现时未定义。
警报(this.options.name)未定义。
检查jsfiddle示例: https://jsfiddle.net/VM001/90jpvdw3/2/
point:{
events:{
click: function () {
location.href ="clickTable";
alert('Category:'+this.category+',values:'+this.y)
alert(this.options.name)
}
}
}
解决方法
point:{
events:{
click: function () {
location.href ="clickTable";
alert('Category:'+this.category+',values:'+this.y)
alert(this.series.name)
}
}
}