Home Forums Chart Support Removing vertical lines and keeping x-axis and y-axis only

Removing vertical lines and keeping x-axis and y-axis only

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

    I hope everybody is doing well. I am customizing with the stacked bar graph and I need to get rid of the vertical lines inside the graph and I need only to add a vertical line at the bottom as an x-axis and the vertical line as the y-axis. Please help me out with this I gave up on it.
    Thank you

    #15356

    @mjawa,

    You can remove the gridLines by setting gridThickness to zero. Also you can use stripLines for showing reference lines. Please have a look at this code snippet:

    
    axisY: {
        gridThickness: 0,
        stripLines: [
          {
            value: 0,
            showOnTop: true,
            color: "gray",
            thickness: 2
          }
        ]
     },
    

    Please take a look at this JSFiddle for complete code.

    Remove gridlines in chart

    If this doesn’t suit your requirements, can you please provide us some pictorial representation so that we can understand your requirements and help you out.

    ___
    Suyash Singh
    Team CanvasJS

    #27223

    I am also facing same issue but I have to remove both horizontal and vertical lines. I just wanted line graph with transparent background. I have tried to remove using lineThickness: 0,tickThickness: 0 but that didn’t help to achieve it.

    #27246

    @srisrim,

    You can remove vertical and horizontal axis lines by setting lineThickness, gridThickness and tickLength to 0 for axisX and axisY as shown in the below code snippet.

    axisX:{
    	lineThickness: 0,
    	tickThickness: 0
    },
    axisY:{
    	lineThickness: 0,
    	gridThickness: 0,
    	tickLength: 0
    }

    To make chart background as transparent, you can set backgroundColor property to transparent. Please take a look this JSFiddle for an example on chart with transparent background and without horizontal and vertical axis lines.

    Chart with no vertical and horizontal lines

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.