[Chartjs]-Possible to hide Chart.js grid lines that extend beyond chart?

0👍

What version are you using? My bar chart in v 2.5.0 doesn’t extend above

Bar Chart sample

It does have the optional ‘padding’ argument:

   window.myBarChart = new Chart(ctx, {
      type: 'bar',
      data: barChartData,
      options: {
        elements: {
          rectangle: {
              borderWidth: 2,
          }
        },
        layout: {
          padding: {
            top: 12
          }
        },
        responsive: true,
        legend: {
          position: 'right',
        }
      }
    });

Leave a comment