日期:2014-05-16 浏览次数:20453 次
<script language="JavaScript" type="text/javascript">
//接收后台传递值
var yx="<%=LC%>"; //显示值,比如5
var yx1="<%=LC1%>"; //高度值,比如20
var ex="<%=OH%>";//显示值
var ex1="<%=OH1%>"; //高度值
var areaObject=[{name:"一小",count:yx1,color:"A186BE"},
{name:"二小",count:ex1,color:"F6BD0F"}
];
var strXML="<graph caption='' xAxisName='X名称' numberSuffix='%' yAxisMaxValue='180' yAxisName='Y名称' baseFont='宋体' baseFontSize='18' >";
var length=areaObject.length;
for(var i=1;i<=length;i++){
strXML= strXML+"<set name='"+areaObject[i-1].name+"' value='"+areaObject[i-1].count+"' color='"+areaObject[i-1].color+"'/>";
}
strXML= strXML+"</graph>";
var chart1 = new FusionCharts("js/Column3D.swf", "chart1Id", "100%", "300");
chart1.setDataXML(strXML);
chart1.render("chart1div");
</script>