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. Image for the cookie policy date

possibility to use a custom Palette for a chart

when will we get the possibility to use a custom Palette for a chart?

or is it already possible (have not found it in the documents and was not able to configure it in xaml code myself.


3 Replies

VT Vimala Thirumalai Kumar Syncfusion Team November 1, 2022 09:39 AM

Hi Andreas,


We can customize the appearance of the series segment color by using series PaletteBrushes property.


Please refer the below link for more details

https://www.syncfusion.com/kb/13661


Regards,

Vimala Thirumalai Kumar



AN Andreas November 1, 2022 03:45 PM

is it possiblke todo this in xaml only?



VT Vimala Thirumalai Kumar Syncfusion Team November 2, 2022 05:05 AM

Hi Andreas,


We can customize the appearance of the series segment color in Xaml by using series PaletteBrushes property and ResorceDictionary. Please refer the attached sample for reference.


<ContentPage.Resources>

     <ResourceDictionary>

         <local: BrushCollection x:Key="Colors">

             <Color>Yellow</Color>

             <Color>Gray</Color>

             <Color>Maroon</Color>

             <Color>Red</Color>

             <Color>Green</Color>

         </local: BrushCollection >

     </ResourceDictionary>

 </ContentPage.Resources>


<chart:ColumnSeries ItemsSource="{Binding Data}" XBindingPath="Value"

                     YBindingPath="Distance" PaletteBrushes="{StaticResource Colors}"/>


public class BrushCollection : ObservableCollection<Brush>

{

 

}


SampleOutput.PNG

Regards,

Vimala Thirumalai Kumar


Attachment: Sample_d20c68c0.zip

Loader.
Live Chat Icon For mobile
Up arrow icon