ms 图表多个系列 X 值不匹配 (ASP.NET)

发布于 2024-09-17 10:09:54 字数 748 浏览 2 评论 0原文

我目前正在开发一个网站,该网站显示我使用 SQL 表中的数据构建的多个图表。我使用并遵循了 Scott Mitchell 的教程(https://web.archive.org/web/20210927195532/http://www.4guysfromrolla.com/articles/093009-1.aspx)和 K. Scott Allen 的 ChartBuilder 类(http://code.msdn.microsoft.com/mag200903XASP/Release/ ProjectReleases.aspx?ReleaseId=2245)并且一切正常。

但是,当我想在同一个图表上显示两个系列时,如果一组数据不具有其他系列的所有 X 值,则图表会盲目地将所有数据放在上面,忽略尝试匹配的 X 值其他系列,因此在显示图表时 X 值不匹配。

我知道我可以修改数据,以便两组数据具有相同的 X 值,但是我试图让该类处理数据中的异常,这样我就不必太担心数据。

非常感谢任何帮助。

I'm currently developing a website that shows multiple charts that I build using data from SQL tables. I've used and followed Scott Mitchell's tutorial (https://web.archive.org/web/20210927195532/http://www.4guysfromrolla.com/articles/093009-1.aspx) and K. Scott Allen's ChartBuilder class (http://code.msdn.microsoft.com/mag200903XASP/Release/ProjectReleases.aspx?ReleaseId=2245) and all works well.

However when have two series that I want to show on the same Chart, if one set of data does not have all of the X values the other series does, the chart blindly puts all the data on, ignoring trying to match the X values of the other series, therefore mismatching the X values when the chart is shown.

I know that I can fiddle the data so that both sets of data have the same X values, however I'm trying to make the class handle anomalies in the data so that I don't have to worry too much about the data.

Any help is greatly appreciated.

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

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

发布评论

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

评论(1

听风吹 2024-09-24 10:09:54

Chart.DataBindCrossTab 为您匹配它。
请在此处查看更多信息: http ://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx

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