Chart Data Label


https://www.nevron.com/Forum/Topic12791.aspx
Print Topic | Close Window

By cho seongho - 5 Years Ago

I want to customize the scale label on the chart.

First, I want to know how to hide the scale label.

Second, I want to replace the label with a string.
For example, if the X axis value is 1, replace it with the string "One" and if it is 2, replace it with the string "Two".

please answer about my question.
Thank you.

By Nevron Support - 5 Years Ago
Hi Cho,
You need to turn off automatic labels and provide custom ones - for example:

   NOrdinalScaleConfigurator scaleX = nChartControl1.Charts[0].Axis(StandardAxis.PrimaryX).ScaleConfigurator as NOrdinalScaleConfigurator;
    scaleX.AutoLabels = false;
    scaleX.Labels.Add("One");
    scaleX.Labels.Add("Two");

Please take a look at the All Examples \ Axes examples that show how to configure different types of axes as well as how to control labels, ticks etc. Let us know if you meet any problems.