BarSeries Color from codebehind

3 posts, 1 answers
  1. Tiziano
    Tiziano avatar
    17 posts
    Member since:
    Feb 2012

    Posted 18 Mar 2012 Link to this post

    Hello,
    i'm creating and adding some barseries from codebehind.
    I need to set the fill color foreach series while creating, but i don't understand how.
    In xaml is very easy with fixed number of series, but now i have dynamic series and i need to do all generation from codebehind. 
    Can anyone help me?

    Thank
  2. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 21 Mar 2012 Link to this post

    Hello Tiziano,

    Thank you for writing.
    The BarSeries class has a PointTemplates collection that allows you to specify custom visualization for each point. Therefore, based on the value or category, you can have different templates with different colors.
    All you need to do is to keep the PointTemplates collection in sync with your data points.

    Please write again if you have other questions.

    All the best,
    Victor
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Tiziano
    Tiziano avatar
    17 posts
    Member since:
    Feb 2012

    Posted 25 Mar 2012 Link to this post

    Thanks for reply :)
Back to Top