使echarts图表兼容ie浏览器

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xiaozhi_2016/article/details/79001160

echarts 在谷歌浏览器中可以所向披靡,丝毫不会出现因兼容性问题出现图像不显示的结果。而在ie中似乎却不太混得开。

最近在做各种图表的展示,引入了资源echarts.js
谷歌中正常显示,而在ie中却出现了如下问题:
初始化的时候图表不显示,在F12开启的情况下 刷新页面,图表正常显示,经过调试发现 echarts.init(document.getElementById(‘firstEchart_left’));
这句代码没有执行。但是也不报错。苦思不得其解,网上搜寻了各种方式调试兼容性,比如:
1:通过 以谷歌内核渲染ie
2:模拟IE7进行渲染
但都不能解决问题。
最后查询echarts官方网站,发现了一个ecahrts简装包 echarts.common.min.js。

!function(t,e){“object”==typeof exports&&”object”==typeof module?module.exports=e():”function”==typeof define&&define.amd?define([],e):”object”==typeof exports?exports.echarts=e():t.echarts=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p=”“,e(0)}([function(t,e,n){t.exports=n(2),n(108),n(102),n(112),n(191),n(207),n(232),n(55),n(209),n(208),n(223),n(216),n(215),n(214),n(197),n(224),n(240)},function(t,e){function n(t){if(null==t||”object”!=typeof t)return t;var e=t,i=R.call(t);if(“[object Array]”===i){e=[];for(var r=0,o=t.length;r

猜你喜欢

转载自blog.csdn.net/xiaozhi_2016/article/details/79001160