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

Hide axis line


I would like to ask how to hide an axis line? I need to achieve what's on the left of the below screen and I currently have what's on the right side. Could anyone point me in the right direction or answer if removing axis line is even possible (shown by the arrows)?

Thanks a lot

3 Replies

BK Bharathiraja K Syncfusion Team January 21, 2019 07:35 AM UTC

Hi Mikolaj, 
Greetings from Syncfusion, we can achieve your requirement by customizing chart axis AxisLineStyle’s StrokeColor property value as Transparent or by setting the StrokeWidth property value as 0(zero) of the chart axis. 
Please refer the below code snippet: 
NumericalAxis numericalAxis = new NumericalAxis(); 
numericalAxis.AxisLineStyle.StrokeColor = Color.Transparent;//Hide Axis line 
//numericalAxis.AxisLineStyle.StrokeWidth = 0;//Hide Axis line 
numericalAxis.MajorTickStyle.StrokeColor = Color.Transparent;//Hide TickLines 
//numericalAxis.MajorTickStyle.StrokeWidth = 0;//Hide TickLines 
                        <chart:ChartLineStyle StrokeColor="Transparent"/> 
                        <chart:ChartAxisTickStyle StrokeColor="Transparent"/> 
Please refer the below UG link for More details, 
Note: We have also included code to hide the TickLines of the axis to produce output as per the sample image. Please ignore the TickLines customization, if you don’t need. 

MK Mikolaj Kieres January 21, 2019 10:04 PM UTC

Hi Bharathiraja,

That worked perfectly! Thanks a lot for the quick response.


BK Bharathiraja K Syncfusion Team January 22, 2019 12:25 PM UTC

Hi Mikolaj, 
Glad that the solution works. If you need any assistance, please contact us. 


Live Chat Icon For mobile
Up arrow icon