highstocks,如何带来仅在"click"选项上使用的值? [英] highstocks, how can I bring values that I will only use on the 'click' option?
问题描述
让我尝试解释.
我要携带数据:
[1、3、7、8、9、2]
[1, 3, 7, 8, 9, 2]
但是,对于每个值,还有其他值,例如时间和地点.我想做一个点击功能,例如:
But for each one of these there are other values, like time and place. I would like to make a click function like:
click: function() {
testFunction(time.value,place.value);
}
就像这样,我单击它会调用一个javascript函数,我可以传递这些其他值?如何存储这些值并将其发送?我在哪里存储要在函数中使用的其他值,临时值?
Like this, that I click and it will call a javascript function that I could pass these other values? How can I store these values and send it? Where do I store other values, temp values to use in a function?
找到这个演示,将是这样的: http://www.highcharts.com/demo/line-ajax
Found this demo, would be something like that: http://www.highcharts.com/demo/line-ajax
但是我没有在屏幕上显示任何内容,我只想在单击时显示. this.y和this.x已经在图表上了:(
But I'm not showing anything on the screen, I would like to show only when clicked. this.y and this.x is there on the charts already :(
谢谢.
推荐答案
您可以使用对象作为点.
You can use objects for points.
data:[{
y:10,
additional:'myparametervalue'
},{
y:10,
additional:'myparametervalue'
}]
找到了答案,并提供了示例以及有关其操作方法的更多信息问题.
Found an answer, with an example and more info about how do it from a similar question.
这篇关于highstocks,如何带来仅在"click"选项上使用的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!