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 02:39 PM UTC

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 08:45 PM UTC

is it possiblke todo this in xaml only?



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

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.
Up arrow icon