In the previous examples, we were using single series XML Data, as we were plotting data for just 1 year. Let's now consider a case where we want to compare our half yearly sales data for 2006 against sales data for 2007. We will be using the same data in the coming sections as well. |
|||||||||||||||||||||
Before you continue, we recommend that you go through the "Your First Chart" section, as we start off from the concepts explained in that section. | |||||||||||||||||||||
Creating the XML data document for the Chart | |||||||||||||||||||||
Here, we will build a Multi-series Column 3D chart. The following data (see table below) will be used for creating the XML data document for the chart. | |||||||||||||||||||||
|
|||||||||||||||||||||
The converted XML data is shown below. We will save it as Data_multi.xml and put it within the src folder. | |||||||||||||||||||||
<chart caption='Business Results 2005 v 2006' xAxisName='Month' yAxisName='Revenue' showValues='0' numberPrefix='$'> <categories> <category label='Jan' /> <category label='Feb' /> <category label='Mar' /> <category label='Apr' /> <category label='May' /> <category label='Jun' /> </categories> <dataset seriesName='2006'> <set value='27400' /> <set value='29800'/> <set value='25800' /> <set value='26800' /> <set value='29600' /> <set value='32600' /> </dataset> <dataset seriesName='2005'> <set value='10000'/> <set value='11500'/> <set value='12500'/> <set value='15000'/> <set value='11000' /> <set value='9800' /> </dataset> </chart> |
|||||||||||||||||||||
You can build the chart either from Here, we'll have just to set the value of FCChartType and FCDataURL to 'MSColumn3D' and 'Data_multi.xml' respectively. Use the following code to build the chart in |
|||||||||||||||||||||
<?xml version="1.0" encoding="utf-8"?> |
|||||||||||||||||||||
In the code, we have only changed the chart type and provided appropriate chart data. That's it! Now, run the code. You will get a multi-series Column 3D chart as shown below. | |||||||||||||||||||||
![]() |