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

Change background color on xaml

Thread ID:

Created:

Updated:

Platform:

Replies:

140758 Nov 5,2018 06:25 PM UTC Nov 7,2018 06:29 AM UTC Xamarin.Forms 1
loading
Tags: SfChart
iordanis kantharidis
Asked On November 5, 2018 06:25 PM UTC

Hello,
How i can change the background color on xaml?

Michael Prabhu M [Syncfusion]
Replied On November 7, 2018 06:29 AM UTC

Hi Iordanis, 
 
Greetings from Syncfusion. 
 
We can’t clearly understand your requirement. But, we suspect that your requirement is either changing the background color of chart or Changing the series color or Changing the PlottingArea Color. We can provide you the solution for all those requirements. We have attached a simple sample for the same. 
 
Sample: 140758_Sample 
 
1.      You can change the background color of chart by using the BackgroundColor property which is available in Chart. 
 
Code snippet[Xaml] 
<chart:SfChart BackgroundColor="Gray" x:Name="Chart" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"> 
 
 
2.      You can change the series color by using the ColorModel property which is available in ChartSeries. 
 
Code snippet[Xaml] 
<chart:ColumnSeries.ColorModel> 
    <chart:ChartColorModel Palette="Pineapple"/> 
</chart:ColumnSeries.ColorModel> 
 
 
 
1.      You can change the PlottingArea color by using the AreaBackgroundColor property which is available in Chart. 
 
Code snippet[Xaml] 
<chart:SfChart AreaBackgroundColor="LightBlue" x:Name="Chart" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"> 
 
      
 
If this is not your exact requirement, please provide more details to provide a better solution.  
 
Thanks, 
Michael 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon