ComponentOne Chart for WPF and Silverlight
Chart for WPF and Silverlight / Chart Features / Axis / Dependent Axis
In This Topic
    Dependent Axis
    In This Topic

    The IsDependent allows to link the auxiliary axis with one from the main axes (AxisX or AxisY, depending on AxisType). The dependent axis always has the same minimum and maximum as the main axis.

    New property DependentAxisConverter and delegate Axis.AxisConverter specifies function that is used to convert coordinate from main axis to the dependent axis.

    The following code creates a dependent Y-Axis:

    Copy Code
              new DataSeries() { ValuesSource = new double[] { -10, 0, 10, 20, 30, 40 } });
            c1Chart1.ChartType = ChartType.LineSymbols;
            Axis axis = new Axis() { AxisType = AxisType.Y, IsDependent =true};
            // Celsius -> Fahrenheit
            axis.DependentAxisConverter = (val) => val * 9 / 5 + 32;

    The following image displays the dependent (leftmost) Y-Axis that shows values in Fahrenheit corresponding to the Celsius on the main Y-axis:



    See Also