Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Chart > Problem with bar and line series

Not answered Problem with bar and line series

Feed from this thread
  • jc mag Intermediate avatar

    Posted on Oct 4, 2011 (permalink)

    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?

    Reply

  • Evgenia Evgenia admin's avatar

    Posted on Oct 6, 2011 (permalink)

    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 >>

    Reply

  • jc mag Intermediate avatar

    Posted on Oct 7, 2011 (permalink)

    (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....
    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Chart > Problem with bar and line series
Related resources for "Problem with bar and line series"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]