我正在使用dojocharts.Here生成许多图表,其中一个主要问题是dojo,即浏览器兼容性问题。但是,没有出现在Mozilla和IE浏览器中的图表,它只显示在chrome.Some的dojo功能中,也不显示works.In的图表,我添加的是dojo,indicators.If,我添加的是指示符,然后这些图表不显示,如果我删除指示符,那么所需的图表shows.But将同时显示指示器和X、Y轴。我是从谷歌搜索,所以,也是dojo论坛,但没有找到适当的解决方案,以修复我的problems.So建议我如何解决我的问题,浏览器兼容性。
这是我的密码
<script type="text/javascript">
dojo.require("dojox.charting.Chart");
dojo.require("dojox.charting.axis2d.Default");
dojo.require("dojox.charting.plot2d.Default");
dojo.require("dojox.charting.plot2d.ClusteredColumns");
dojo.require("dojox.charting.widget.SelectableLegend");
dojo.require("dojox.charting.plot2d.Markers");
dojo.require("dojox.charting.plot2d.Grid");
dojo.require("dojox.charting.plot2d.Indicator");
dojo.require("dojox.charting.action2d.Highlight");
dojo.require("dojox.charting.action2d.Magnify");
dojo.require("dojox.charting.action2d.MoveSlice");
dojo.require("dojox.charting.action2d.Shake");
dojo.require("dojox.charting.action2d.Tooltip");
dojo.require("dojox.charting.plot2d.Indicator");
dojo.require("dojox.charting.widget.Legend");
dojo.require("dojo.colors");
dojo.require("dojo.fx.easing");
dojo.require("dojox.charting.themes.Mytheme");
dojo.require("dojox.dtl");
dojo.require("dojox.dtl.Context");
var dc = dojox.charting;
var dur = 450;
makeObjects = function(){
var chart6 = new dc.Chart("chart1");
var myLabelFunc = function(text, value, precision){
return text;
};
chart6.setTheme(dc.themes.Mytheme);
chart6.addAxis("x" ,{
title:"Project",
titleGap:40,
titleFont: "normal normal bold 14px Tahoma",
titleFontColor: "black",
titleOrientation: "away",
stroke:"#A2ADBC",
//labelSizeChange: true,
natural: true,
// rotation:-20,
majorTick: {color: "#A2ADBC", length: 10},
majorTicks:true,
majorTickStep:1,
dropLabels:false,
minorTicks:false,
fixLower : "minor",
fixUpper : "minor",
// dropLabels : true,
//min : 10,
//max : 20,
//from: 0,
to: 10.9,
labels: <?php echo json_encode($this->masterChart,JSON_NUMERIC_CHECK); ?>,
font: "normal normal bold 11px Constantia",
fontColor: "black"
// labelFunc: myLabelFunc
}
);
chart6.addAxis("y", {
title: "Area in SqFt",
titleFont: "normal normal bold 14px Tahoma",
titleGap: 20,
titleFontColor: "black",
stroke:"#A2ADBC",
font: "normal normal bold 9px Tahoma",
fontColor: "black",
vertical : true,
fixLower : "minor",
fixUpper : "minor",
//htmlLabels : true,
majorTick: {color: "#A2ADBC", length: 10},
minorTicks:true,
majorTicks:true,
majorTickStep:44,
minorTickstep:11,
// minorTickstep:5,
min : <?php echo $this->masterChart_base_line_bed[0] ['area']; ?>,
//max : 20,
from:30,
//to: 250
labelFunc: myLabelFunc
}
);
chart6.addPlot("default", {type: "ClusteredColumns", gap: 8,
labels: true,
// minBarSize:5,
labelStyle:"outside",
fontColor:"black",
precision: 1,
animate : {
duration : 1000
}
});
chart6.addPlot("indicator", { type: "Indicator",
vertical:false,
values: <?php echo $this->masterChart_base_line_bed[0]['area']; ?>,
//offset: { y: -10, x: 11 },
lineStroke: {
color: "#ecf0f1",//"#ecf0f1",
style: "line"
},
labels: true,
// labelStyle:"inside",
//maxBarSize: 35,
//fontColor:"white",
precision: 1
//animate: { duration: 1000}
});
//chart6.addPlot("grid", {type: "Grid"});
chart6.addSeries("Master Bedroom", <?php echo json_encode($this->masterChart_master_room_area,JSON_NUMERIC_CHECK); ?>,
{stroke: {
color: "#242324"
}// fill: "red"
});
var anim6a = new dc.action2d.Highlight(chart6, "default", {
highlight: "#FF7900",
duration: dur,
easing: dojo.fx.easing.cubicIn
});
var anim6b = new dc.action2d.Shake(chart6, "default");
chart6.render();
};
dojo.addOnLoad(makeObjects);
</script> 发布于 2014-07-09 13:39:44
尝试将其添加到HTML标题中:
<META HTTP-EQUIV="X-UA-Compatible" content="IE=edge" />我是junk..Given的一部分,只是这些年来的麻烦.
https://stackoverflow.com/questions/24646019
复制相似问题