Home forums Using CanvasJS Zero line in line chart for second yaxis without further grid

This topic contains 3 replies, has 2 voices, and was last updated by  Vishwas R 1 year, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #22334

    For my second yaxis I would like to show only the zero line, no further grid. The automaticcally chosen interval should remain unchanged. Is that possible?




    You can set gridThickess to 0 to remove grids from any axis.

    If this doesn’t solve your requirement, kindly create jsfiddle with the issue you are facing so that we can look into the code and chart-options that you are using, understand it better and help you out.

    Vishwas R
    Team CanvasJS


    Dear Vishwas,

    thaas not what I wanted. I wanted only the zero line displayed and not the whole grid.

    Now I found a simple solution using stripLines:

    I added in the axis definition:

    				value: 0,             
    			] ,

    and now I got the desired result.




    Glad that you found a way to get desired result :)

    In future if you find any issue, I would suggest you to share JSFiddle or Pictorial representation of the issue (or your requirements) so that we can understand your scenario better and guide you accordingly.

    Vishwas R
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.