Dojo图表在Firefox,资源管理器中不起作用

编程入门 行业动态 更新时间:2024-10-12 03:23:20
本文介绍了Dojo图表在Firefox,资源管理器中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用一个脚本,该脚本在选项卡中包含一个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,资源管理器中不起作用

本文发布于:2023-11-27 15:40:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638599.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图表   资源管理   不起作用   器中   Dojo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!