Home › forums › Report Bugs › Bug with negative values when try to hide y axis
This topic contains 1 reply, has 2 voices, and was last updated by Vishwas R 1 year, 3 months ago.
I’m using the following options to hide yAxis:
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.
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.
You must be logged in to reply to this topic.