如何在WPF中创建图表? [英] How do I create a chart in WPF?

查看:65
本文介绍了如何在WPF中创建图表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用WPF。我正在使用VS2015。有人可以告诉我如何创建条形图吗?谢谢。 -ME

解决方案



嗨kingelk,


据我所知, WPF本身没有图表控件,您可以尝试以下两种方法。


1:定义图表控件(用户控件)


I测试了以下文章,这是一个非常好的例子。


WPF - 使用带动画的网格控件创建自定义条形图


WPF工具包图表控件(行,栏,区域,P即,柱系列)演示:

https://www.codeproject.com/Articles/196502/WPF-Toolkit-Charting-Controls-Line-Bar-Area-Pie-Co


注意:此响应包含对第三方万维网站点的引用。 Microsoft提供此信息是为了方便您。 Microsoft不控制这些网站,也未测试在这些网站上找到的任何软件或信息;因此,
Microsoft不能就其中发现的任何软件或信息的质量,安全性或适用性做出任何陈述。使用互联网上的任何软件都存在固有的危险,微软提醒您在从互联网上检索任何软件之前,确保您完全了解风险.b $ b。


最好的问候,


Yohann Lu





I am just getting started with WPF. I am using VS2015. Can someone please show me how to create a bar chart? Thank you. -ME

解决方案


Hi kingelk,

As far as I know, WPF itself does not have a chart control, you can try the following two methods.

1: Define a chart control (user control)

I tested the following article, it is a very good example.

WPF - Create a Custom Bar chart using the Grid control with animation
http://dotnetvisio.blogspot.sg/2013/08/wpf-create-custom-bar-chart-using-grid.html


2: Use some third-party chart extension controls

Foundations - Charting with DataTemplates:
https://msdn.microsoft.com/en-us/magazine/ee413725.aspx

WPF Toolkit Charting Controls (Line, Bar, Area, Pie, Column Series) Demo:
https://www.codeproject.com/Articles/196502/WPF-Toolkit-Charting-Controls-Line-Bar-Area-Pie-Co

Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Best Regards,

Yohann Lu


这篇关于如何在WPF中创建图表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆