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

Diference between Palette and DataTemplate

1 Answer 51 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.
Thiago
Top achievements
Rank 1
Thiago asked on 22 May 2012, 02:46 PM
Hi,
I´ve found on documentation the Palettes topic. 
I want to know what´s the diference between the use of palettes and data templates.
I was using data templates with predefined colors, in this case, each new item was receiving a data template.
For sample, in the bar series, my data template is a rectangle with your color.
Can I use Palettes for substitute it? 

Thanks in advance,
Thiago

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 28 May 2012, 08:53 AM
Hi Thiago,

Thank you for writing.
The difference between the palettes and the data templates is that a Palette only allows you to set stroke and fill, that is, just colors. On the other hand, a DataTemplate is the Silverlight/WPF way of specifying a whole visual tree. When you specify a DataTemplate you can put rectangle inside, a border over the rectangle, a label or any other visual element you can think of. A DataTemplate allows you to completely define the visualization of your data points. The palette only allows you to specify colors.

If you are using the data templates to only define colors, you should be able to replace them with palettes. However, if you have custom visual elements inside the data templates you will not be able to replace them with palettes.

Please write again if you have other questions.

Regards,
Victor
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
Thiago
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or