Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Chart > Can we set different width in each of BarChart series

Not answered Can we set different width in each of BarChart series

Feed from this thread
  • Andy avatar

    Posted on Feb 8, 2012 (permalink)

    Dear Telerik Team,

    We are currently trying to display a bar chart which has different width for its series by using radchart (see attachment) 
    Is it possible? 

    Thanks,
    Andy
    Attached files

    Reply

  • Andy avatar

    Posted on Feb 9, 2012 (permalink)

    I found the way to have different width for each bar series :

                    radChart1.SeriesMappings[0].SeriesDefinition.ItemStyle = new Style();
                    radChart1.SeriesMappings[0].SeriesDefinition.ItemStyle.Setters.Add(new Setter(Shape.WidthProperty, Double.Parse("50")));
                    radChart1.SeriesMappings[1].SeriesDefinition.ItemStyle = new Style();
                    radChart1.SeriesMappings[1].SeriesDefinition.ItemStyle.Setters.Add(new Setter(Shape.WidthProperty, Double.Parse("80")));

    But the result is not right. there is a gap between each series. (attached screenshot)
    Is there any way to make it stacked?

    Thanks,
    Andy 
    Attached files

    Reply

  • Nikolay Nikolay admin's avatar

    Posted on Feb 13, 2012 (permalink)

    Hi Andy,

    Unfortunately such a feature is not supported by the current version of the control as by definition each bar in a Bar series should be of equal width. The gaps appear because the space for each bar along the X axis is calculated as per the widest one, which is also why the 3rd and 4th bars slightly overlap as well.

    All the best,
    Nikolay
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Chart > Can we set different width in each of BarChart series
Related resources for "Can we set different width in each of BarChart series"

WPF Chart Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]