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

Binding Stack Graph

4 Answers 40 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Adrian
Top achievements
Rank 1
Adrian asked on 30 Mar 2014, 05:35 PM
I'm trying to create a stack bar graph either in code or in data binding which will bind to my data collection.

Data Collection is a list (of question)  with question containing correct, incorrect and skipped totals.

I can't seem to find a good example - any assistance would be great.

4 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 02 Apr 2014, 01:36 PM
Hi,

To achieve this you can create two or more BarSeries(with BarSeries.CombineMode set to Stack), bind their ItemsSource to the property that hold the collection of objects and map the Category and the Value of each point to the properties that hold this information through the CategoryBinding and ValueBinding properties. For your convenience I have attached a project that demonstrates this scenario.

Let me know if this works for you.

Regards,
Ivaylo Gergov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Adrian
Top achievements
Rank 1
answered on 03 Apr 2014, 03:07 PM
Got that working - I'm now trying to set the height of the bars (ultimately the graph) to the a much smaller height.  Its a single stacked bar chart so I really don't need a lot of labels and want the height to be much smaller than its showing at the moment.

Attached file shows I can display 4 items but want to reduce size of bar chart to show 8-10 items.
0
Ivaylo Gergov
Telerik team
answered on 04 Apr 2014, 08:06 AM
Hi,

You can control the number of labels through the LinearAxis.LabelInterval property. Also, to make the chart smaller you can change the RadCartesianChart.Height and RadCartesianChart.Width properties. Note, that by default the RadCartesianChart.MinWidth and RadCartesianChart.MinHeight are 100, so if you need smaller values you can change them.

Regards,
Ivaylo Gergov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Adrian
Top achievements
Rank 1
answered on 04 Apr 2014, 02:44 PM
Thanks, I think the MinHeight and Width wee the ones which were causing me the problems.
Tags
Chart
Asked by
Adrian
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Adrian
Top achievements
Rank 1
Share this question
or