如何隐藏折线图中数据点的标签

How to hide label of data points in line chart

请参考下图

基本上我有一个带有一些系列的 C# 图表控件,我有一个带有标签的系列(图片中的红线),但我希望能够切换标签 on/off。那可能吗?我找不到任何可以这样做的属性。

非常感谢。

缺少清除文本的 labels 一种简单的方法是使颜色透明。

你可以做整个Series s1:

s1.LabelForeColor = checkBox_test.Checked ? Color.Black: Color.Transparent;

..或个人 DataPoints dp:

dp.LabelForeColor = checkBox_test.Checked ? Color.Blue : Color.Transparent;