[Chartjs]-Chart.js remove the first vertical line

14👍

What you want to remove is probably the border of the chart. In Chart.js v2 I was able to remove this first vertical border by setting drawBorder to false for the grid line configuration:

options: {
    scales: {
        yAxes: [{
            gridLines: {
                drawBorder: false
            }
        }]
    }
}

In Chart.js docs it is explained in https://www.chartjs.org/docs/latest/axes/styling.html#grid-line-configuration.

1👍

Try using the chart option, scaleLineColor, and setting the color to have 0 opacity:

new Chart(ctx).Bar(data, {
  scaleLineColor: 'rgba(0, 0, 0, 0)',
});

http://jsfiddle.net/wb3kcunt/33/

If you are using chartjs v2, then the showBorder option in scales.gridLines should do the trick:

options: {
  scales: {
    gridLines: {
      showBorder: false,
    }
  }
}

See docs: http://www.chartjs.org/docs/#scales

Leave a comment