Highcharts工具提示在IE8上闪烁 [英] Highcharts tooltips flickering ON IE8

查看:118
本文介绍了Highcharts工具提示在IE8上闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由IE8处于怪癖模式。这很可能是因为您没有指定文档类型。



使用<!doctype html> 来更改为标准模式并解决问题。


enter image description hereHi I am using below code to plot the charts througs Highchart API. By this tooltips are working fine on firefox and also on chrome but on IE tooltips are flickering. and as we move mouse tooltips remain for some sort of time while other has appear.

$(document).ready(function(){
                var chart=new Highcharts.Chart({
                            chart : {
                               zoomType: 'xy',
                               spacingRight: 20,
                               renderTo : "container",
                               type : graphType
                            },
                            tooltip: {
                                enabled: true,
                                followPointer: true
                            },
                            title : {
                                text : graphTitleForChart
                            },xAxis : {
                                type: 'datetime'  
                            },credits: {
                                enabled: false
                            },
                            legend: {
                                align: 'right',
                                verticalAlign: 'middle',
                                layout: 'vertical'
                            },
                            yAxis : {
                                min : 0
                            },
                            plotOptions :{
                                area: {
                                 stacking: 'normal',
                                 lineColor: '#666666',
                                 lineWidth: 1,
                                 marker: {
                                    enabled : false,
                                    symbol : 'circle'
                                    }
                                },
                                column: {
                                 stacking: 'normal',
                                 pointPadding : 0,
                                 lineColor: '#666666',
                                 lineWidth: 0,
                                 marker: {
                                    enabled : false,
                                    symbol : 'circle'
                                    }
                                },
                                pie: {
                                 allowPointSelect : true

                                },
                                line: {
                                 marker: {
                                    enabled : false,
                                    symbol : 'circle'
                                    }
                                },
                                series: {
                                    events: {
                                        legendItemClick: function(event) {

                                            var seriesIndex = this.index;
                                           var series = this.chart.series;
                                           if(this.name == 'Select All'){

                                                if(this.visible){
                                                    for (var i = 0; i < series.length; i++)
                                                    {
                                                        series[i].hide();
                                                    }
                                                }else{
                                                    for (var i = 0; i < series.length; i++)
                                                    {    
                                                        series[i].show();
                                                    }
                                                }
                                                return false;    
                                           }else if(series.length > 1){

                                               var i;
                                               for (i = 0; i < series.length; i++)
                                               {    
                                                   if(!series[i].visible){
                                                        break;         
                                                   }
                                               }  
                                           }

                                        }
                                    }
                                }    
                            },
                            series : arrSeries
                });

            });

In this, graphType will containe either of 'area','column','pie','line' .
Please tell me what's wrong in this. Also when all the graph series have 0 values then at y-axis 0 line shows in the middle of y-axis, how can I fix origin of Y and X axis to (0,0)

解决方案

I had a similar issue caused by IE8 being in Quirks Mode. This is most likely happening because you haven't specified a doctype.

Use <!doctype html> to change to Standards mode and resolve the issue.

这篇关于Highcharts工具提示在IE8上闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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