我正在使用asp.net c#开发Web应用程序并使用FusionCharts绘制图形。我需要绘制一个多系列柱形图,我尝试使用以下代码,但是徒劳无功
<div id="chartContainer"></div>
<script type="text/javascript">
var myChart = new FusionCharts("Column3D", "myChartId", "400", "300");
myChart.setXMLUrl("Data8.xml");
myChart.render("chartContainer");
</script>
Data8.xml
----------
<chart caption='Sales by Product' numberPrefix='$' formatNumberScale='1' rotateValues='1' placeValuesInside='1' decimals='0' ><categories>
<category label='Product A' />
<category label='Product B' />
<category label='Product C' />
<category label='Product D' />
<category label='Product E' />
<category label='Product F' />
</categories><dataset seriesName='Current Year'>
<set value='567500' />
<set value='815300' />
<set value='556800' />
<set value='734500' />
<set value='676800' />
<set value='648500' />
</dataset><dataset seriesName='Previous Year'>
<set value='547300' />
<set value='584500' />
<set value='754000' />
<set value='456300' />
<set value='754500' />
<set value='437600' />
</dataset></chart>
请帮我这样做......
答案 0 :(得分:2)
尝试修改:
var myChart = new FusionCharts("Column3D", "myChartId", "400", "300");
使用:
var myChart = new FusionCharts("MSColumn3D", "myChartId", "400", "300");
Column3D
适用于单个系列,MSColumn3D
适用于多系列。