admin管理员组文章数量:1422062
I want to be able to catch the clicked event that is hooked to all the axis ticks. here is what i have done so far.
/
If anyone knows how to do that with any of the charting plugins can kindly share.
thanks
I want to be able to catch the clicked event that is hooked to all the axis ticks. here is what i have done so far.
http://jsfiddle/grVFk/5074/
If anyone knows how to do that with any of the charting plugins can kindly share.
thanks
Share Improve this question edited Oct 12, 2011 at 10:58 Book Of Zeus 49.9k18 gold badges175 silver badges171 bronze badges asked Apr 18, 2011 at 7:03 fonfon 2652 gold badges7 silver badges16 bronze badges 2- how did you put up that chart in jsfiddle?? – S L Commented Apr 18, 2011 at 7:07
- well i have anccount there so i can upload it things there. well u can also continue to work on mine or u create an account there and upload ur own files – fon Commented Apr 18, 2011 at 7:30
1 Answer
Reset to default 5the plot isn't plain HTML. So there is no a
tag. And the plot itself do not provide you with an api to catch the click
event on an axis tick.
What you can do is to select the axis tick manually with jQuery and add a click
event:
$('.highcharts-axis tspan').each(function(){
var label = $(this),
value = label.text();
if(categoryLinks[value]) {
label.click(function(){
// you' free to what you want...
alert('could link to another page: ' + categoryLinks[value]);
});
}
});
And there is the solution: http://jsfiddle/scheffield/grVFk/5090/
本文标签:
版权声明:本文标题:javascript - How to catch the click event from the axis ticks jqplot, highcharts,flot - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745356781a2655100.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论