You must be logged in to post your query.
Home › Forums › Report Bugs › Bug with negative values when try to hide y axis
Hey all,
I’m using the following options to hide yAxis:
{ title: '', tickLength: 0, lineThickness:0, margin:0, valueFormatString: '\u0020' }
It works perfect but only for values >= 0. If values on y axis are negative canvasjs draws dashes for them: https://www.dropbox.com/s/6nkhy1xke1wvv1s/Screenshot%202018-06-15%2002.22.48.png?dl=0 (visible Y axis screenshot) https://www.dropbox.com/s/glwxncdhyjmoq78/Screenshot%202018-06-15%2002.22.58.png?dl=0 (hidden Y axis screenshot)
On screenshot with hidden Y axis you can see two dashes on left bottom corner for -100 and -200 values.
Pavlo,
The behaviour is due to the valueFormatString that you are using. For negative values, the dashes in axis labels are nothing but ‘-‘ (minus). To hide labels, I would suggest you to use labelFormatter as valueFormatString just defines how the value should be formatted before showing in label. Please take a look at this JSFiddle.
— Vishwas R Team CanvasJS
You must be logged in to reply to this topic. Login/Register