Problem with bar and line series

Thread is closed for posting
3 posts, 0 answers
  1. jc mag
    jc mag avatar
    106 posts
    Member since:
    Aug 2005

    Posted 04 Oct 2011 Link to this post

    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. Evgenia
    Evgenia avatar
    1437 posts

    Posted 06 Oct 2011 Link to this post

    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,
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. jc mag
    jc mag avatar
    106 posts
    Member since:
    Aug 2005

    Posted 07 Oct 2011 Link to this post

    (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....
Back to Top