private void YAxis_LabelCreated(object sender, ChartAxis.LabelCreatedEventArgs e)
{
// Specify the label to show
if (e.AxisLabel.Position != 20 && e.AxisLabel.Position != 80 && e.AxisLabel.Position != 150)
e.AxisLabel.IsVisible = false;
} |
Thank you for your answer.
Another thing that I want to do is to add a label to specific position, where I have no data.
protected override void GenerateVisibleLabels()
{
base.GenerateVisibleLabels();
VisibleLabels.Clear();
for (double i = VisibleRange.Start; i < VisibleRange.End; i++)
{
if(i == 20 || i == 40 || i == 60) // specify the label you need
VisibleLabels.Add(new ChartAxisLabel(i, i.ToString()));
}
} |
Hi Parthiban,
Thanks a lot for the solution! That helped a lot.
Best regards,
Alex