In order to change the scale configurator for a particular axis you need to create an instance of the scale configurator that you want to apply and assign it to the scale configurator property of the respective axis. The following code shows how to change the scale configurator of the primary X axis to numeric so that it can better handle numeric data (commonly used when you need to display XY or XYZ scatter charts):
C# |
Copy Code
|
---|---|
NChart chart = chartControl.Charts[0];
NAxis primaryX = chart.Axis(StandardAxis.PrimaryX);
NLinearScaleConfigurator linearScaleConfigurator = new NLinearScaleConfigurator();
primaryX.ScaleConfigurator = linearScaleConfigurator;
|
Visual Basic |
Copy Code
|
---|---|
Dim chart As NChart = chartControl.Charts(0) Dim primaryX As NAxis = chart.Axis(StandardAxis.PrimaryX) Dim linearScale As New NLinearScaleConfigurator primaryX.ScaleConfigurator = linearScale |