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

Change background color on xaml

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

1 Reply

MP Michael Prabhu M Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon