PlesTech Report post Posted July 24, 2013 In the documentation for FusionCharts XT for the first chart example you give an example of the data string method which was: myChart.setXMLData("<chart caption='Weekly Sales Summary' xAxisName='Week' " + "yAxisName='Sales' numberPrefix='$'>" + "<set label='Week 1' value='14400' />" + "<set label='Week 2' value='19600' />" + "<set label='Week 3' value='24000' />" + "<set label='Week 4' value='15700' />" + "</chart>"); I got this example to work fine, but when I tried to do a stacked column chart I could not successfully get it to plot. Could you please advise how you would use the data string method for the following example in your documentation? <chart caption='Weekly Sales Summary for two Products' xAxisName='Weeks' yAxisName='Amount' numberPrefix='$'> <categories> <category Label="Week1"/> <category Label="Week2"/> <category Label="Week3"/> <category Label="Week4"/> </categories> <dataset seriesName="Product A"> <set value='14400' /> <set value='19600' /> <set value='24000' /> <set value='15700' /> </dataset> <dataset seriesName="Product B"> <set value='12000' /> <set value='15000' /> <set value='20000' /> <set value='11000' /> </dataset> </chart> Share this post Link to post Share on other sites
Sanjukta Report post Posted July 25, 2013 In the documentation for FusionCharts XT for the first chart example you give an example of the data string method which was: myChart.setXMLData("<chart caption='Weekly Sales Summary' xAxisName='Week' " + "yAxisName='Sales' numberPrefix='$'>" + "<set label='Week 1' value='14400' />" + "<set label='Week 2' value='19600' />" + "<set label='Week 3' value='24000' />" + "<set label='Week 4' value='15700' />" + "</chart>"); I got this example to work fine, but when I tried to do a stacked column chart I could not successfully get it to plot. Could you please advise how you would use the data string method for the following example in your documentation? <chart caption='Weekly Sales Summary for two Products' xAxisName='Weeks' yAxisName='Amount' numberPrefix='$'> <categories> <category Label="Week1"/> <category Label="Week2"/> <category Label="Week3"/> <category Label="Week4"/> </categories> <dataset seriesName="Product A"> <set value='14400' /> <set value='19600' /> <set value='24000' /> <set value='15700' /> </dataset> <dataset seriesName="Product B"> <set value='12000' /> <set value='15000' /> <set value='20000' /> <set value='11000' /> </dataset> </chart> Hi, Please try removing the extra spaces and line-breaks from the XML while rendering the chart using Data String method. Ex: var myChart = new FusionCharts("StackedColumn2D.swf", "Chart1Id", "600", "400", "0", "1"); myChart.setXMLData("<chart caption='Weekly Sales Summary for two Products' xAxisName='Weeks' yAxisName='Amount' numberPrefix='$'><categories><category Label='Week1'/><category Label='Week2'/><category Label='Week3'/><category Label='Week4'/></categories><dataset seriesName='Product A'><set value='14400' /><set value='19600' /><set value='24000' /><set value='15700' /></dataset><dataset seriesName='Product B'><set value='12000' /><set value='15000' /><set value='20000' /><set value='11000' /></dataset></chart>"); Please check with the attached HTML file for your reference. Hope this helps. StackedChart.html Share this post Link to post Share on other sites
PlesTech Report post Posted July 26, 2013 Thanks, all works ok now Share this post Link to post Share on other sites