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

Problem with bar and line series

2 Answers 35 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jc mag
Top achievements
Rank 1
jc mag asked on 04 Oct 2011, 11:11 AM
I'm displaying a bar series and a line series on a same chart, see picture pbChart1bar.png. There are two items with the same X values.

If I add a second bar series, with the same values as the first one, the items are not aligned anymore, see picture pbChart2bars.png.
What could be the problem?

2 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 06 Oct 2011, 04:22 PM
Hello Jc Mag,

The result you are getting is actually the expected behavior of the Chart control. When you have 2 or more bar series where each of the bars from the first serie has the same XValue as those in the other/others, the Chart plots them stick with one another so that they are pointed by those XValue. However you can control the distance between the bars using the BarOverlapPercent property. I also suggest that you set the LayoutMode property of the XAxis to Inside, so that the corresponding XAxis Label is under the Bar/Bars:

radChart.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode;

Kind regards,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
jc mag
Top achievements
Rank 1
answered on 07 Oct 2011, 07:52 AM
(see picture attached)
I don't understand why the blue bar is centered on the date of '24/09/2008'... IMHO, the center of the bars (I mean the point between the black and the blue bars) should be above this date....
Tags
Chart (obsolete as of Q1 2013)
Asked by
jc mag
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
jc mag
Top achievements
Rank 1
Share this question
or