wpf工具包中的堆积条形图

发布于 2024-12-26 03:03:33 字数 97 浏览 1 评论 0原文

有人可以指导我在 WPF 工具包中开发堆积条形图吗?我尝试过,但没有找到解决方案。

或者是否有任何参考来开发自定义控件来实现堆叠条形图的目的。

谢谢

can someone guide me on developing stacked bar chart in WPF toolkit. i tried that but didn't find a ready to go solution for this.

or is there any reference for developing a custom control to server the purpose of a stacked bar chart.

thanks

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

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

发布评论

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

评论(4

不醒的梦 2025-01-02 03:03:34

对于仍在寻找此主题的人:WPF 工具包 4.0 版本中提供了用于面积、条形、柱形和线形的 Stacked100 和 Stacked Series。

For people still finding this thread: Stacked100 and Stacked Series for Area, Bar, Column, and Line are available in the 4.0 release of the WPF Toolkit.

蓝色星空 2025-01-02 03:03:33

David Anson 有一个关于 WPF 工具包和图表的精彩博客系列,这个 讨论堆栈条应该提供一个很好的起点。

David Anson had a nice blog series on the WPF tool kit and charts, this one discusses the stack bars and should provide a good starting point.

眼藏柔 2025-01-02 03:03:33

这个话题让我困惑了一天左右。

David Anson 为 Silverlight Toolkit 数据可视化库创建了一些很酷的堆叠图表。让我(作为 WPF 新手)感到困惑的是,它们并不存在于 WPF Toolkit 数据可视化库中。

一般来说,目标似乎是协调 Silverlight 工具包和 WPF 工具包。不幸的是,WPF 工具包当前的正式版本是 2010 年初。Silverlight 工具包中的堆叠图表大约在同一时间发布,因此工具包尚未对齐。

一目了然? David Anson 非常好地提供了此工具包的开发人员版本的 WPF 源代码和二进制文件。因此,虽然尚未正式发布,但您仍然可以轻松获得堆叠图表。

我遇到的第二个问题是,一旦引用了这个二进制文件,我的代码就可以正确编译,但 XAML UI 设计器无法识别任何新控件,并且不断出现错误。我通过重新构建工具包的开发人员版本来生成 .pdb 文件解决了这个问题。

This was a confusing topic to me for a day or so.

David Anson created some cool stacking charts for the Silverlight Toolkit Data Visualization library. The confusing part to me (as a WPF newbie) was that they were not present in the WPF Toolkit Data Visualization library.

In general, the goal seems to be to align the Silverlight Toolkit and the WPF Toolkit. Unfortunately, the current official version of the WPF Toolkit is from early 2010. The stacking charts in the Silverlight Toolkit were released around the same time and so the toolkits have not yet been aligned..

Clear as mud? David Anson was nice enough to provide the WPF source and binaries for the developer version of this toolkit. So, while not officially released, you can still get stacking charts with little effort.

The second problem I had was that once I had this binary referenced, my code compiled correctly but XAML UI designer couldn't recognize any of the new controls and barfed constantly. I resolved this by re-building the developer version of the toolkit to generate .pdb files.

感情旳空白 2025-01-02 03:03:33

WPF Toolkit 的最新发布版本似乎是 3.5 或 3.5.5,具体取决于您从哪里获取它。

堆叠图表仅在该工具包的第 4 版中可用,该版本适用于 Silverlight,但未正式适用于 WPF。

如果您要前往 这篇文章,你可以下载他使用的示例(直接链接)。

现在,美妙之处在于:浏览到“Toolkit -> WPF4”文件夹,然后找到在那里找到的 dll。这是 WPF 的版本 4 工具包,您可以在项目中引用它,并可以访问堆叠条形图。

一旦你启动并运行了它,只需查看堆叠条形示例的代码,然后从那里开始工作。
(警告:我对这些例子相当不满意,因为它们很大程度上依赖于后面的代码,并且根本不适合 MVVM,所以我必须解决这个问题。不过这是可以做到的)

Seems to be that the latest published version of the WPF Toolkit is 3.5 or 3.5.5, depending on where you get it from.

The stacked charts are only available in version 4 of the toolkit, which is available for Silverlight, but not officially for WPF.

If you'll head to this post, you can download the examples he uses (direct link).

Now, here's the beauty: browse to the "Toolkit -> WPF4" folder, and take the dll you'll find there. This is the version 4 toolkit for WPF, which you can then reference in your project, and have access to the stacked barcharts.

Once you got that up and running, just have a look at the code for the stacked bars examples, and work from there.
(Warning: I'm rather unhappy with those examples, since they relay heavily on code behind, and are not MVVM friendly at all, so I had to work around this a bit. It can be done though)

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