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

Remove some of the tick lines from an axis

Hi,

I am displaying the following chart and I would like to show tick lines on Y axis, only for the -1.0, -0.3, 0.0, 0.3 and 1.0 values. As you see, the Y axis tick lines are too many and too crowded.

My setup is like this:

yAxis: AxisModel = {
valueType: 'Double',
minimum: -1.0,
maximum: 1.0,
interval: 0.1,
majorGridLines: { width: 0 },
majorTickLines: { width: 1, height: 4 },
labelFormat: 'n1',
stripLines: [{start:-1.0, end: -0.3, color:"#EC5221", opacity: 0.1}]
}


Is there any way to achieve the desired result?

Thanks


1 Reply

DG Durga Gopalakrishnan Syncfusion Team January 30, 2023 01:19 PM UTC

Hi Cosmin,


Greetings from Syncfusion.


By default, axis labels will be rendered based on number of ticklines. As per your attached snippet, it seems to be you are using interval as 0.1, so ticklines are displayed as per behavior. Currently we don’t have support to remove the particular ticklines from axis.


Please let us know if you have any concerns.


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon