Nevron .NET Vision
Chart for .NET / User's Guide / Axes / Scale / Scale Configurators / Default Scale Configurators

In This Topic
    Default Scale Configurators
    In This Topic

    Initially each Cartesian chart has five axes: PrimaryY, PrimaryX, SecondaryY, SecondaryX and Depth, where SecondaryY and SecondaryX are hidden. The following table shows the default scale configurator type of each axis:

    Standard Cartesian Axis Default Scale Configurator
    PrimaryY NLinearScaleConfigurator
    PrimaryX NOrdinalScaleConfigurator
    SecondaryY NLinearScaleConfigurator
    SecondaryX NOrdinalScaleConfigurator
    Depth NOrdinalScaleConfigurator

    In practice this means that the chart is initially configured to display numeric data on its Y axes and categorical data on the X axes.

     Changing the Scale Configurator

    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
    
     Related Examples

    Windows Forms: Axes \ Scaling \ Date Time Scale

    Windows Forms: Axes \ Scaling \ Ordinal Scale

    Windows Forms: Axes \ Scaling \ Numeric Scale

    Windows Forms: Axes \ Scaling \ Logarithmic Scale

    See Also