2

I'm using react-chartjs2 in react application. I want to remove extra space as follow in this image.

enter image description here

Here are my chart configuration options

// chart options
const options = {
  legend: {
        display: false
    },
  scales: {
    xAxes: [{
      gridLines: {
        color: ChartConfig.chartGridColor,
        display: false
      },
      ticks: {
        fontColor: ChartConfig.axesColor,
        beginAtZero:true,
        min: 0
      }
    }],
    yAxes: [{
      ticks: {
        beginAtZero:true,
        min: 0,
        padding: 0,
        display: false
      },
      gridLines: {
        drawTicks: false,
        drawBorder: false
      }
    }]
  }
};
Shubham
  • 740
  • 12
  • 33

0 Answers0