Search code examples
telerikradchart

Bind line series to the additional Y-axis in radchart telerik


Im having radchart showing the 2 bar series and 2 line series.Bar series is showing according to the left side y axis and line series is not binding according to the right side additional y axis.right axis which line series has to bind but only one of them is binding and other is not showing it binding to the left Y-axis.

Please can anybody provide me any solution is much a appreciated


Solution

  • Try this:

    AxisY axisY = new AxisY();
    axisY.AxisName = "AxisY1";
    axisY.Title = "";
    axisY.IsZeroBased = true;
    axisY.DefaultLabelFormat = "#VAL{P0}";
    SellInproductChart.DefaultView.ChartArea.AdditionalYAxes.Add(axisY);
    
    AxisY axisY1 = new AxisY();
    axisY1.AxisName = "AxisY2";
    axisY1.Title = "";
    axisY1.IsZeroBased = true;
    axisY1.DefaultLabelFormat = "#VAL{P0}";
    
    SellInproductChart.DefaultView.ChartArea.AdditionalYAxes.Add(axisY1);
    
    objSeriesMapping1.SeriesDefinition.AxisName = "AxisY1";
    objSeriesMapping2.SeriesDefinition.AxisName = "AxisY2";