如何将系列的图例文本设置为空? [英] How can I set the legend text of a series to be an empty ?

查看:105
本文介绍了如何将系列的图例文本设置为空?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一些系列没有名字。所以在这种情况下,我认为当你添加一个系列时,会为它自动生成一个名称(例如:Series1,Series2等)。由于是这种情况,我的图例会显示该系列的自动生成名称。我的要求是我
不想显示这个自动生成的名称,只是在图例中将其显示为空字符串(颜色旁边没有任何颜色)。我尝试将series.LegendText设置为空字符串但它似乎没有任何效果,并且自动生成的名称仍然显示为
。有人可以帮我解决这个问题吗?

Some of my series does not have a name. So in this case, I think when you add a series, a name is auto generated for it (eg: Series1, Series2 etc). Since this is the case, my legend shows this auto generated name for the series. My requirement is that I do not want to show this auto generated name but just show it as an empty string (nothing beside the color) in the legend. I tried setting the series.LegendText to be an empty string but it does not seem to have any effect and the auto generated name still shows. Can someone help me how to achieve this ?

推荐答案

由于某种原因,将LegendText设置为空字符串不起作用。将其设为" " (空格)例如。
For some reason setting the LegendText to an empty string does not work. Set it to " " (space) for example.


这篇关于如何将系列的图例文本设置为空?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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