We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I set a Custom Palette for a PieSeries Chart in XAML

Thread ID:

Created:

Updated:

Platform:

Replies:

114468 Nov 20,2013 02:39 PM UTC Nov 22,2013 04:43 AM UTC WinRT 2
loading
Tags: Chart
Marc Francois NO LONGER WITH COMPANY
Asked On November 20, 2013 02:39 PM UTC

Hi, I was wondering if you can help.  I've had a look, and there doesn't appear to be a clear example of defining and using a custom palette for a PieSeries chart with the custom colours defined in the XAML, rather than trying to set things up in the code behind.. (I'm using the latest version of Essential Studio for 
WinRT with Windows 8.1)

For example, the following does work when "Metro" is selected as the palette:

<charts:SfChart DataContext="{Binding Data}" Width="480" Height="270" HorizontalAlignment="Left">
                    <charts:PieSeries Label="Series1" Palette="Metro"                                                                 XBindingPath="Key" YBindingPath="Value" ItemsSource="{Binding}" >
                     <charts:PieSeries.AdornmentsInfo>
                           <charts:ChartAdornmentInfo VerticalAlignment="Center" 
                                HorizontalAlignment="Center"/>
                      </charts:PieSeries.AdornmentsInfo>                        
                    </charts:PieSeries>
                    <charts:SfChart.Legend>
                            <charts:ChartLegend  DockPosition="Right"/>
                    </charts:SfChart.Legend>
</charts:SfChart>

However, I would like to set Palette = "Custom", and then define the custom colours within the appropriate part of the XAML...  I assume this would take the form of more XAML within a

<charts:PieSeries.ColorModel>
....
</charts:PieSeries.ColorModel>

..section??

I'd be very grateful if you are able to provide me an example of how to do this properly using the example above as a starting point please?

Many thanks in advance



Marc Francois NO LONGER WITH COMPANY
Replied On November 20, 2013 02:50 PM UTC

**EDIT** Worked it out.. It turns out intelli-sense in my ide was playing up and the way I thought of doing it was actually working fine.

Please delete this thread :)

Muneesh Kumar G [Syncfusion]
Replied On November 22, 2013 04:43 AM UTC

Hi Marc,

Thanks for using Syncfusion products.

Please let us know if you need further assistance from us

Regards,

Muneesh Kumar G.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;