HighCharts event on column category name click

烈酒焚心 提交于 2019-12-25 13:16:11

问题


I'd like an event to fire if a user clicks the category name of a column chart. I see there are options for if the user clicks the bar itself, but what about the category name of the bar?


回答1:


use this:

$("#container .highcharts-axis-labels:first text").click(function() {
        alert($(this).text());
    });

fiddle here




回答2:


You can use custom-events plugin, which extends events in chart.



来源:https://stackoverflow.com/questions/31735781/highcharts-event-on-column-category-name-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!