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

BarSeries Color from codebehind

2 Answers 96 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tiziano
Top achievements
Rank 2
Tiziano asked on 18 Mar 2012, 01:55 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Victor
Telerik team
answered on 21 Mar 2012, 02:17 PM
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 >>
0
Tiziano
Top achievements
Rank 2
answered on 25 Mar 2012, 12:59 PM
Thanks for reply :)
Tags
Chart
Asked by
Tiziano
Top achievements
Rank 2
Answers by
Victor
Telerik team
Tiziano
Top achievements
Rank 2
Share this question
or