[Chartjs]-Problem hidding the label in chartjs (ng2chart for angular)

1👍

Your code looks fine to me and it should work as expected. It seems that the base line is drawn but it doesn’t fit inside the canvas.

This problem can be solved by replacing xAxis.gridlines.drawTicks: false by xAxis.gridlines.tickMarkLength: 1 as shown below.

xAxes: [{
  ticks: {
    display: false,
  },
  gridLines: {
    color: '#949494',
    // drawTicks: false,
    tickMarkLength: 1,
    zeroLineColor: '#949494',
  }
}]

Another option would be to define some padding at the bottom of the chart as follows:

options: {
  layout: {
    padding: {
      bottom: 1
    }
  },
  ...

Leave a comment