我正在使用一个脚本,该脚本在选项卡中包含一个dojo图表:图表页面.
如果您使用 Google Chrome 打开图表页面,则该图表可见.如果使用 Firefox 或 Explorer 11 将其打开,则该图表将不可见.
我所有的浏览器都更新到了最新版本.
有人可以告诉我为什么会出现这个错误吗?
这是我的脚本:
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="js.arcgis/3.20/esri/themes/calcite/dijit/calcite.css"> <script type="text/javascript" src="ajax.googleapis/ajax/libs/jquery/1.3/jquery.min.js"></script> <script src="ajax.googleapis/ajax/libs/dojo/1.12.1/dojo/dojo.js"></script> <script> require([ "dojox/charting/Chart", "dojox/charting/Chart2D", "dojox/charting/action2d/MoveSlice" , "dojox/charting/action2d/Tooltip", "dojo/ready"], function(Chart, Chart2D, MoveSlice, Tooltip, ready){ ready(function(){ var chart1 = new Chart("He"); chart1.addPlot("default", { type: "Pie", labelOffset: 25, font: "9pt Arial" }); chart1.addSeries("He", [ {y: 1, text: 1}, {y: 1, text: 2}, {y: 1, text: 3} ]); new Tooltip(chart1, "default"); new MoveSlice(chart1, "default"); chart1.render(); }); }); </script> </head> <body class="calcite"> <div> <div id="He" style="width: 140px; height: 140px; "></div> </div> </body> </html>解决方案
我在 jsfiddle上重新创建了您的问题/1k6w8otn 确实,在Chrome上它运行良好,而在IE11上则显示空白页. IE11控制台报告权限被拒绝,并且调试器在getComputedStyle定义处嗅探到所有异常停止.快速浏览dojo论坛此处显示存在阻止问题 18973 为Dojo 1.12.1打开.
切换到dojo 1.12.2或更高版本,IE11和FF将再次正确显示饼图.请参阅修改后的jsfiddle: jsfiddle/1k6w8otn/2
I am using a script with a dojo chart inside a tab: chart page.
If you open the chart page with Google Chrome the chart is visible. If you open it with Firefox or Explorer 11 the chart is NOT visible.
All my browsers are updated to their latest versions.
Can somebody tell me why am I getting this error?
This is my script:
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="js.arcgis/3.20/esri/themes/calcite/dijit/calcite.css"> <script type="text/javascript" src="ajax.googleapis/ajax/libs/jquery/1.3/jquery.min.js"></script> <script src="ajax.googleapis/ajax/libs/dojo/1.12.1/dojo/dojo.js"></script> <script> require([ "dojox/charting/Chart", "dojox/charting/Chart2D", "dojox/charting/action2d/MoveSlice" , "dojox/charting/action2d/Tooltip", "dojo/ready"], function(Chart, Chart2D, MoveSlice, Tooltip, ready){ ready(function(){ var chart1 = new Chart("He"); chart1.addPlot("default", { type: "Pie", labelOffset: 25, font: "9pt Arial" }); chart1.addSeries("He", [ {y: 1, text: 1}, {y: 1, text: 2}, {y: 1, text: 3} ]); new Tooltip(chart1, "default"); new MoveSlice(chart1, "default"); chart1.render(); }); }); </script> </head> <body class="calcite"> <div> <div id="He" style="width: 140px; height: 140px; "></div> </div> </body> </html>解决方案
I have recreated your issue on jsfiddle/1k6w8otn Indeed on Chrome it works fine while on IE11 it show blank page. IE11 console however reports Permission denied and debugger sniffing all exception stops at some point at getComputedStyle definition. Quick look on dojo forum here shows that there was blocking issue 18973 opened for Dojo 1.12.1.
Switch to dojo 1.12.2 or newer and IE11 and FF renders pie chart correctly again. See modified jsfiddle: jsfiddle/1k6w8otn/2
更多推荐
Dojo图表在Firefox,资源管理器中不起作用
发布评论