Highcharts列点击 [英] Highcharts column Point Click

查看:89
本文介绍了Highcharts列点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我已经在Highcharts Point上提出了一个问题点击不工作。除此之外,我发现的是,我的点击功能适用于谷歌浏览器,但不适用于IE 8。你能帮我解决这个问题吗?我没有得到任何回应,因此我再次发布这个问题 -



以下是我的代码 -



< pre $ var columnoptions = {
图表:{
renderTo:'container',
type:'column'
},
标题:{
text:'曝光细节 - 柱形图'
},
xAxis:{
类别:[]
},
yAxis: {
title:{
text:'Exposure'
}
},
plotOptions:{
series:{
cursor:'pointer ',
点:{
events:{
click:function(){
alert('here');
}
}
}
}
},
系列:[]
};

及以下是绘制柱形图的函数 -

函数displayColumnChart(){

  columnoptions.series = []; 
columnoptions.xAxis.categories = [];
var seriesOptions = {
name:'chart',
data:[],

};
for(index = 0; index< categoryArray.length; index ++){

columnoptions.xAxis.categories.push(categoryArray [index]);

seriesOptions.data.push(valueArray [index]);

}

columnoptions.series.push(seriesOptions);
图表= new Highcharts.Chart(columnoptions);
}

是否因为我动态创建此图表的方式?请就此指导我。我收到错误 - 对象不支持此属性或方法。 Highcharts.js第25行。代码0. Char 55.我希望执行图表深入查看。因此需要得到这个工作。而IE是该公司的标准浏览器。请帮帮我。

解决方案

我刚刚使用了最新的highcharts文件2.2.5,并解决了它。适用于IE8。我感觉整体表现也有所改善。平滑。谢谢。 :)

Hello I have already asked a question on Highcharts Point Click not working. Further to that what I have found is my click function works in google chrome but not in IE 8. Can you please help me with this? I am not getting any responses on my earlier question hence I am posting this again -

Below is my code -

var columnoptions = {
                chart: {
                    renderTo: 'container',
                    type: 'column'
                },
                title: {
                    text: 'Exposure Details - Column Chart'
                },
                xAxis: {
                    categories: []
                },
                yAxis: {
                    title: {
                        text: 'Exposure'
                    }
                },              
                plotOptions: {  
            series: {
                cursor: 'pointer',
                point: {
                    events: {
                        click: function() {
                            alert ('here');
                        }
                    }
                }
            } 
        },
                series: []
            };   

and below is the function which draws column chart -

function displayColumnChart(){

     columnoptions.series = [];
     columnoptions.xAxis.categories = [];            
      var seriesOptions = {
                    name: 'chart',
                    data: [],                       

                };
     for(index = 0; index < categoryArray.length; index++){

         columnoptions.xAxis.categories.push(categoryArray[index]);

         seriesOptions.data.push(valueArray[index]);        

     }      

     columnoptions.series.push(seriesOptions); 
     chart = new Highcharts.Chart(columnoptions);
   }

Is it because the way I am dynamically creating this chart? Please guide me regarding this. I am getting error - Object doesnt support this property or method. Highcharts.js line 25. Code 0. Char 55. I wish to implement chart drill down. Hence need to get this working. And IE is standard browser in the company. Please help me.

解决方案

I just used latest highcharts files 2.2.5 and that solved it. Works in IE8. And I feel overall performance is also improved..smooth. Thanks. :)

这篇关于Highcharts列点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆