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

How to right align vertical bars

2 Answers 106 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 07 Dec 2012, 12:52 AM
Edit:  I posted in the wrong forum, sorry.  I am using ChartView.

1.) I have a barchart with vertical bars.  Data is added to my chart in the elapsed event of a timer.  When I add a new bar to the chart I want it placed on the right side.  As new bars are added, I want existing bars to be pushed to the left. How do I do this please? I tried setting HorizontalAlignment and HorizontalContentAlignment on both the BarSeries and the Horizontal axis but neither works.

2.) I want to set the width of each bar.  I am using GapLength at the moment to make the bars narrower but it does not work as the number of bars added to the chart increases.  More specifically, I want to set the width of each bar and the space between them i.e. margin to some fixed amount and fill the chart from the right as described above.

Thanks,
Sam

2 Answers, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 11 Dec 2012, 06:42 PM
Hi Sam,

1. I have attached a sample project demonstrating the behaviour you requested.

2. The RadChartView does not support such a user defined sizing and positioning. The chart internally calculates the bar width depending on a number of factors such as the number of categories and the width of the chart.
 
All the best,
Petar Kirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sam
Top achievements
Rank 1
answered on 11 Dec 2012, 07:39 PM
Thank you Petar, 
I'm disapointed I cant set the bar width.  That seems like such a fundamental element that the user should be able to control.   
Tags
ChartView
Asked by
Sam
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Sam
Top achievements
Rank 1
Share this question
or