This is a migrated thread and some comments may be shown as answers.

Set BarChart To Horizontal

2 Answers 257 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
Martin Hamilton asked on 25 Nov 2019, 12:40 PM

I have been trying to turn a stacked barchart to be horizontal - and must be misunderstand what must be a simple solution to my problem.

using the Telerik Example for a stacked barChart - how do I set this so that the Representatives are on the vertical axis and the performance values are on the bottom horizontal axis as shown in the attached image.

Thank you in advance

            Dim barSeries As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
            barSeries.Name = "Q1"
            barSeries.DataPoints.Add(New CategoricalDataPoint(177, "Harley"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(128, "White"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(143, "Smith"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(111, "Jones"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(118, "Marshall"))

            Dim barSeries2 As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
            barSeries2.Name = "Q2"
            barSeries2.DataPoints.Add(New CategoricalDataPoint(153, "Harley"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(141, "White"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(130, "Smith"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(88, "Jones"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(109, "Marshall"))
            RadChartView2.Series.Add(barSeries2)
            barSeriesQ1.CombineMode = ChartSeriesCombineMode.Stack
            barSeries2.CombineMode = ChartSeriesCombineMode.Stack

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 25 Nov 2019, 01:19 PM

Hello, Martin,

Following the provided information, I have prepared a sample project. The chart looks as follows on my end:

If you want to change the orientation, it is necessary to set the Orientation of the CartesianArea

Me.RadChartView1.GetArea(Of CartesianArea)().Orientation = Orientation.Horizontal

 

It is expected that the horizontal axis now will display the values of each category.

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

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 25 Nov 2019, 03:42 PM

Wow, Thank you - I think I was overthinking it.

Thank you for your assistance!

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