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

how to make horizontal bar chart with each bar labeled

3 Answers 81 Views
Chart
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 10 Apr 2014, 03:13 AM
Hi,

I'd like to make a simple bar chart like the image I've attached.  It's really very basic bar chart (not sure Telerik's name for this sort of chart) with a single series.  Each of the bars should be labeled with it's value.

Please point me to any examples or snippets that would help me create it.  I prefer to do as much of it using MVVM as possible.


Thanks!

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 10 Apr 2014, 07:20 AM
Hi David,

I suggest you use the new ChartView control rather than the old RadChart.

You can easily achieve the desired output by simply using a vertical CategoricalAxis, a horizontal LinearAxis and a BarSeries with its ShowLabels property set to true. You can examine our online qsf examples and our sdk samples (the sdk browser will prove very helpful so I suggest you install it). You can also check out this very basic BarSeries example in our documentations.

Regards,
Petar Marchev
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
David
Top achievements
Rank 1
answered on 14 Apr 2014, 12:40 PM
Thanks Petar!  Is there anyway to automatically ensure the labels are visible and don't get cut off?  Currently I have a converter trying to calculate the axis maximum, but this isn't an ideal solution.
0
Petar Marchev
Telerik team
answered on 15 Apr 2014, 08:18 AM
Hello David,

There are a few ways to go here. One is to plug in a smart labels strategy (see example here). Another way would be to use the series' label definitions to place the label inside the bar. I hope these help.

Regards,
Petar Marchev
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.

 
Tags
Chart
Asked by
David
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
David
Top achievements
Rank 1
Share this question
or