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

Axis Colour

Thread ID:





132896 Sep 27,2017 03:48 PM UTC Sep 28,2017 01:08 PM UTC WinRT 1
Tags: SfChart
Mike Chubey
Asked On September 27, 2017 03:48 PM UTC

When I create a SfChart the default colour of the axis lines is white, and they must be displayed on a dark background. Is there anyway to change the color of the axis lines to black?  

Durgadevi Selvaraj [Syncfusion]
Replied On September 28, 2017 01:08 PM UTC

Hi Mick, 
Thanks for contacting Syncfusion Support. 
We have analyzed your requirement (changing the color of the axis lines to black) and can achieve it by setting AxisLineStyle to the Axis as shown in the below code, 
       <Style x:Key="axisLineStyle" TargetType="Line"> 
           <Setter Property="Stroke" Value="Black"/> 
           <Setter Property="StrokeThickness" Value="3"/> 
        <syncfusion:SfChart Margin="10"  > 
                <syncfusion:CategoryAxis  AxisLineStyle="{StaticResource axisLineStyle}" /> 
                <syncfusion:NumericalAxis AxisLineStyle="{StaticResource axisLineStyle}" /> 
            <syncfusion:LineSeries  ItemsSource="{Binding Collection}"   XBindingPath="XValue" YBindingPath="YValue"/> 
We have prepared a sample based your requirement and it can be downloaded from the below link, 
Durgadevi S 


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