Winforms饼图标签文本被截断 [英] Winforms pie chart label text truncated

查看:98
本文介绍了Winforms饼图标签文本被截断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2019和默认的Winforms 饼图. 图例出现在附件图像中.

I'm using VS2019 and the default Winforms Pie Chart. The legend appears as in the attached image.

我尝试过使用图表大小,图表越大,图例文字的截断就越少,但是要使其全部适合于它,它必须要很大...

I've tried playing with the chart size, and the larger I make the chart, the less truncated the legend text becomes, but it's going to have to be huge to fit it all in...

有什么想法为什么以及如何更改它,以便无论文本长度或图表大小如何,它都不会被截断?

Any ideas why and how to change that so it's never truncated regardless of text length or chart size?

谢谢

查看 Legend TextWrapThresholdIsTextAutoFit属性,该文本仍被图形截断,尽管看起来它像指定的那样被包装"了.这仍然是不希望的结果. 除了放大图表之外,还有什么其他解决方案??

Looking at the TextWrapThreshold and IsTextAutoFit properties of the Legend, the text is still graphically truncated, although it seems it is being "wrapped" like specified. This is still an undesired result.. What other solution is there besides enlarging the chart..?

推荐答案

@Yafim我将答案移到这里,因为我需要发布一些图像.您是说这是真的吗?

@Yafim I'm moving the answer here because I need to post some images. You mean this is happening?

如果是这种情况,并且您不希望将完整的图例文本显示在甜甜圈的各个部分中(因为它们与甜甜圈本身重叠),则只能通过设置Series-> Label来显示值. ->将IsValueShownAsLabel属性设置为true,并获得与此类似的内容:

If this is the case, and you don't want the full legend text to appear inside the sections of the doughnut (because they are overlapping the doughnut itself), you can show the values only by setting the Series->Label->IsValueShownAsLabel property to true and get something similar to this:

不确定这是否是您的问题,(您已经在照片中显示了有关此问题的信息)...

Not sure if this was your problem, (you already showed in you photos you know about this)...

这篇关于Winforms饼图标签文本被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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