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.

Axis Colour

Thread ID:

Created:

Updated:

Platform:

Replies:

132896 Sep 27,2017 11:48 AM Sep 28,2017 09:08 AM WinRT 1
loading
Tags: SfChart
Mike Chubey
Asked On September 27, 2017 11:48 AM

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 09:08 AM

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, 
 
MainWindow.xaml: 
<Grid.Resources> 
       <Style x:Key="axisLineStyle" TargetType="Line"> 
           <Setter Property="Stroke" Value="Black"/> 
           <Setter Property="StrokeThickness" Value="3"/> 
       </Style> 
  </Grid.Resources> 
        <syncfusion:SfChart Margin="10"  > 
            <syncfusion:SfChart.PrimaryAxis> 
                <syncfusion:CategoryAxis  AxisLineStyle="{StaticResource axisLineStyle}" /> 
 
            </syncfusion:SfChart.PrimaryAxis> 
            <syncfusion:SfChart.SecondaryAxis> 
                <syncfusion:NumericalAxis AxisLineStyle="{StaticResource axisLineStyle}" /> 
            </syncfusion:SfChart.SecondaryAxis> 
           
            <syncfusion:LineSeries  ItemsSource="{Binding Collection}"   XBindingPath="XValue" YBindingPath="YValue"/> 
        </syncfusion:SfChart> 
  
We have prepared a sample based your requirement and it can be downloaded from the below link, 
 
Regards,  
Durgadevi S 
 


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.

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.

;