简体   繁体   English

WPF工具包图表:如何向特定数据点添加值标签

[英]WPF Toolkit Chart: How to add value label to specific data point

Is there any possibility to add a label to a specific data point within a WPF toolkit chart? 是否有可能在WPF工具包图表中的特定数据点添加标签? That label should simply show the data point's value. 该标签应仅显示数据点的值。 This was quite easy to achieve on iOS (core-plot) and Android, but I couldn't get it to work on Windows Phone. 在iOS(核心情节)和Android上,这非常容易实现,但是我无法在Windows Phone上使用它。 Given the fact that there seems to be no documentation for WPF toolkit/charting doesn't make it much easier. 考虑到似乎没有WPF工具包/图表的文档,这并没有使它变得容易得多。

This is how the data points' labels look on iOS (5.1%, 18.3%) 这就是数据点标签在iOS上的外观(5.1%,18.3%) 这就是数据点标签在iOS上的外观(5.1%,18.3%)

Basically, I'd need the same data-point labeling for the x-values of 12 and 60 on Windows Phone as it is right now on iOS. 基本上, 我需要在Windows Phone上为x值12和60设置相同的数据点标签,就像在iOS上一样。

Those data-points are visible as green dots in this screenshot (WP 7.1): 这些数据点在此屏幕快照(WP 7.1)中显示为绿色点: 这些数据点在此屏幕截图(WP 7.1)中显示为绿色点。

Any help would be kindly appreciated. 任何帮助将不胜感激。 Thank you very much in advance. 提前非常感谢您。

Finally I found the time to implement the class for displaying point labels. 最后,我找到了实现显示点标签的类的时间。

Here is my post in the blog where I describe this class in more details: Silverlight and WP7 chart with data point labels 这是我在博客中的帖子,我在其中详细介绍了该类: 带数据点标签的Silverlight和WP7图表

The WP7 example works with the chart library which I recompiled myself, so it may not work with yours. WP7示例适用于我自己重新编译的图表库,因此它可能不适用于您的图表库。 You can download the sample working application here . 您可以在此处下载示例工作应用程序。

带有数据点标签的WP7图表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM