-2

Using FusionCharts within a Winform is very straightforward, but I am having an issue with using categories and datasets. I am building an XML string which is used to populate a bar chart, once I add the dataset tags my chart container says "No Data To Display." Has anyone had any luck with this? Here is a snippet of sample code:

        ChartXML.Append("<categories>");
        ChartXML.Append("<category name='Total Amount' />");
        ChartXML.Append("</categories>");

        ChartXML.Append("<dataset seriesName='Previous Year'>");
        ChartXML.Append("<set value='65224' />");
        ChartXML.Append("</dataset>");

If I remove the dataset tag all is well, but there are no categories - and I NEED categories.

Thanks in advance...

3 Answers3

0

There are two sets of controls of FusionCharts: Single-Series and Multi-Series. The XML schema is slightly different for each of them. Your code is proper for a Multi-Series chart but if you feed it into a Single-Series one, you will get the "No Data To Display" error.

This is a wild guess anyway. There is a debug mode which you can enable in your control in order to get a more meaningful message.

linepogl
  • 9,147
  • 4
  • 34
  • 45
0

Which chart SWF are you using?

If you using single series chart swf just do this:

 ChartXML.Append("<set value='65224' name='Total Amount' />");

And not other line containing <categories> <dataset> nodes.

sudipto
  • 2,472
  • 1
  • 17
  • 21
0

If the chart shows a "No data to display" message, it could be the following scenarios:

  1. Your XML data doesn't contain any data that could be plotted by FusionCharts. In this case, your XML just contains the or tags without any data between them.

  2. You might be using a single-series chart SWF and providing data in multi-series format or vice-versa. In this case too, you'll get a "No data to display" message.

  3. In some Dual Y Combination charts, you need to provide at least one dataset for both the axis. Otherwise, you'll get a "No data to display" message.

Please check if your chart is in to a similar situation among the above.