如何从highcharts动态获取系列名称,id和title值?

时间:2013-05-20 11:26:56

标签: highcharts

JSFiddle Link for the charts

        if (chart.length == 3) {
            for ( var i = 0; i < chart.length; i++) {

                chart[i].renderer
                .image('http://highcharts.com/demo/gfx/sun.png',chart[i].chartWidth - 40, 5, 20, 20)
                .add()
                .css({'cursor' : 'pointer'})
                .attr({'title' : 'Charts'})
                .on('click', function() {
                    alert("hi");console.log(chart[i]);
                            //var chartValue = $('#'+id).highcharts();
                            //var series = chartValue.series[1]; 
                            //console.log(series.name + "...hi" +series.title);
                });
            }
        }

我们如何获取点击事件的图表详细信息?

0 个答案:

没有答案