简体   繁体   English

女士图表标签格式问题

[英]Ms-Chart Label Format Question

I created a PieChart with the new Ms Chart Controls. 我用新的Ms Chart控件创建了一个PieChart。 How can I format the Labels (Point Values inside the Pie) like the folllowing: "LabelName AbsoluteValue (Percentage)"? 如何格式化标签(饼中的点值),如下所示:“ LabelName AbsoluteValue(百分比)”? For example: "Usa 856027 (56 %)". 例如:“美国856027(56%)”。

Is this possible with the right format information in LabelFormat alone (How?) or do I have to use a custom label format (How?) ? 仅使用LabelFormat中的正确格式信息就可以做到这一点(如何?),还是必须使用自定义标签格式(如何?)?

Thank you very much! 非常感谢你!

Rupert Rand 鲁珀特·兰德

You can include keywords in the Label property, which can either be set in the GUI(through the Series Collection Editor) or in code. 您可以在Label属性中包括关键字,可以在GUI中(通过Series Collection Editor)或在代码中设置关键字。 I would recommend setting it through the GUI since it would not require a full knowledge of the available keywords. 我建议您通过GUI进行设置,因为它不需要完全了解可用关键字。 If you instead want to set it in the code, it would look similar to this (assuming I understand what format you are requesting): Chart.Series(0).Label = "#ValX #Val (#ValPercentY{P0})" . 如果您想在代码中进行设置,则它看起来与此类似(假设我理解您要求的格式): Chart.Series(0).Label = "#ValX #Val (#ValPercentY{P0})"

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

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