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 3 weeks, 1 day ago.

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

    Streifix
    Member

    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?

    Streifix

    #22337

    Vishwas R
    Keymaster

    Streifix,

    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

    #22450

    Streifix
    Member

    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:

    stripLines:[
    			{                
    				value: 0,             
    			}
    			] ,

    and now I got the desired result.

    Streifix

    #22453

    Vishwas R
    Keymaster

    Streifix,

    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.