在 Winform 中使用 FusionCharts

发布于 2024-11-26 10:08:08 字数 546 浏览 4 评论 0原文

在 Winform 中使用 FusionCharts 非常简单,但我在使用类别和数据集时遇到问题。我正在构建一个用于填充条形图的 XML 字符串,一旦添加数据集标签,我的图表容器就会显示“无数据可显示”。有人有这样的运气吗?这是示例代码片段:

        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>");

如果我删除数据集标签,一切都很好,但没有类别 - 而我需要类别。

提前致谢...

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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独孤求败 2024-12-03 10:08:08

如果图表显示“无数据可显示”消息,则可能是以下情况:

  1. 您的 XML 数据不包含 FusionCharts 可以绘制的任何数据。在这种情况下,您的 XML 仅包含 或 标签,它们之间没有任何数据。

  2. 您可能正在使用单系列图表 SWF 并以多系列格式提供数据,反之亦然。在这种情况下,您也会收到“无数据可显示”消息。

  3. 在某些双 Y 组合图表中,您需要为两个轴提供至少一个数据集。否则,您将收到“无数据可显示”消息。

请检查一下您的星盘是否也有类似的情况。

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.

最后的乘客 2024-12-03 10:08:08

FusionCharts 有两套控件:单系列和多系列。它们各自的 XML 模式略有不同。您的代码适用于多系列图表,但如果将其输入单系列图表,您将收到“无数据可显示”错误。

无论如何,这都是一个疯狂的猜测。您可以在控件中启用调试模式,以获得更有意义的消息。

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.

九歌凝 2024-12-03 10:08:08

您使用的是哪种图表 SWF?

如果您使用单系列图表 swf,只需执行以下操作:

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

而不是包含 节点的其他行。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文