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

[Solved] Custom Palette for charts

3 Answers 158 Views
BulletGraph for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nazia
Top achievements
Rank 1
Nazia asked on 16 Jul 2012, 12:20 PM
Hi All,

I have create a bar chart in windows 8 metro using XAML. I want to know how to customize the default palette color. Right now, I am getting blue color for all the items.

Let me know how to customize these colors.

3 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 16 Jul 2012, 02:24 PM
Hello Nazia,

in order to display the bar series colors you can either set Chart PaletteName property (this will customize set different colors per series) or define PointTemplates collection which will iterate while displaying the series points.

Another alternative is to take advantage of PointTemplateSelector..

If you have any further questions do not hesitate to contact us.

All the best,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nazia
Top achievements
Rank 1
answered on 18 Jul 2012, 07:54 AM
Thanks Tsvyatko.

I used PointTemplates collection and it worked fine for me. But the PointTemplateSelector did not worked for me.

When I tried to override  SelectTemplate method of DataTemplateSelector , it gave me error that the method SelectTemplate cannot be overridden.

 Let me know how to achieve this?
0
Accepted
Tsvyatko
Telerik team
answered on 18 Jul 2012, 08:27 AM
Hi Nazia,
there some changes in the API in Metro for some build-in classes (DataTemplateSelector is one of them).

Instead overriding SelectTemplate you can override SelectTemplateCore.

All the best,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
BulletGraph for XAML
Asked by
Nazia
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Nazia
Top achievements
Rank 1
Share this question
or