日期:2014-05-16 浏览次数:20749 次
$(function(){ $("#showFusionChart").click(function(){ $.ajax({ type:"POST", url:"/config/fusionChartsManage!findFusionCharts.action", success:function(responseText){ var myChart = new FusionCharts( "FusionCharts/Column3D.swf", "myChartId6", "600", "300", "0", "1" ); myChart.setDataXML(responseText); //可以获得值 myChart.render("chartID6"); } }); }); });
String chartHead = "<chart caption='my first fusionCharts' xAxisName='名称' yAxisName='编号' numberPrefix='$' chartLeftMargin='50' chartRightMargin='50'>"; StringBuffer sb = new StringBuffer(); StringBuffer sValue = new StringBuffer(); if (array != null) { for (int i = 0; i < array.length; i++) { sb.append("<set name = '"+array[i][0]+"' />"); sValue.append("<set value='"+array[i][1]+"' />"); } } String chartEnd = "</chart>"; chartHead += sb.toString() + sValue.toString() + chartEnd; // chartHead += xmlId + xmlValue + chartEnd; logger.debug("图表信息:" + chartHead); return chartHead;
<chart caption='my first fusionCharts' xAxisName='名称' yAxisName='编号' numberPrefix='$' chartLeftMargin='50' chartRightMargin='50'> <set label='0' value='允许' /> <set label='1' value='硬错误' /> <set label='2' value='警告' /> </chart>