Chartjs-Resize bars' chart in ReactChartJS

0👍

  1. Create a variable that contains these two attributes:

    const yAxesScaleOptions = [
        {
          barPercentage: 0.9,
          categoryPercentage: 0.8
        }
     ]
    
    
  2. In your options do:

const options = {
  responsive: true,
  maintainAspectRatio: true,
  scales: {
    xAxes: [{
      stacked: true,
    }],
    yAxes: yAxesScaleOptions <-- This
  },
};

Leave a comment