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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set the custom brushes for series and datapoints?

SfChart contains predefined set of brushes that are assigned to each data point or each chart series by default. You can also provide your own set of brushes to chart series or data points.

This can be achieved for data points by assigning a collection of brushes to Series.ColorModel.CustomBrushes property and for the custom brushes to take effect, set Series.ColorModel.Palette to Custom. The following code example and screenshot illustrate the custom brushes applied for individual data points.

 

XAML

 

C#

Figure 1: Custom brushes applied for individual datapoints

In order to set custom brushes for series, set it in chart color model as illustrated in the following code example.

 

XAML

 

C#

 

The following screenshot illustrates the custom brushes applied for individual series.

Figure 2: Custom brushes applied for individual series

Article ID: Published Date: Last Revised Date: Platform: Control:
5105 06/01/2015 01/04/2016 Xamarin.Forms SfChart
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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