答案 0 :(得分:1)
如果要使用特定轴值自定义标签,则应处理ChartControl.CustomDrawAxisLabel事件。请参阅CustomDrawAxisLabel文档文章中的示例代码段。
private void chartControl1_CustomDrawAxisLabel(object sender, CustomDrawAxisLabelEventArgs e)
{
AxisBase axis = e.Item.Axis;
if (axis is AxisY || axis is AxisY3D || axis is RadarAxisY)
{
//Put your condition at below two lines..
double axisValue = (double)e.Item.AxisValue;
if (axisValue == 0)
{
e.Item.Text = string.Empty;
}
}
}
有关更改点值的更多信息,请参阅以下内容:
Conditionally change a chart axis label not based on axis value