Line series with multiple y axis vertically stacked

1 Answer 12 Views
ChartView
CJ
Top achievements
Rank 1
CJ asked on 03 May 2021, 10:09 PM
Is it possible to setup a chart with multiple y axis aligned as shown in the attached picture?

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 04 May 2021, 06:29 AM

Hi, CJ,

Such positioning of the vertical axis can be achieved by placing two RadChartView controls one above the other. Then, you can simply hide the horizontal axis for the above chart. 

            LineSeries lineSeries = new LineSeries();
            lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan"));
            lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
            lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul"));
            lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));
            this.radChartView1.Series.Add(lineSeries);

            lineSeries.HorizontalAxis.ForeColor = Color.White;
            lineSeries.HorizontalAxis.BorderColor = Color.White;
            
            LineSeries lineSeries2 = new LineSeries();
            lineSeries2.DataPoints.Add(new CategoricalDataPoint(18, "Jan"));
            lineSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Apr"));
            lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "Jul"));
            lineSeries2.DataPoints.Add(new CategoricalDataPoint(22, "Oct"));
            this.radChartView2.Series.Add(lineSeries2);

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
ChartView
Asked by
CJ
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or