score:0

you can just use the borderradius property with a stacked x axes like so:

const options = {
  type: 'bar',
  data: {
    labels: ["red", "blue", "yellow", "green", "purple", "orange"],
    datasets: [{
        label: '# of votes',
        data: [3, 5, 3, 5, 2, 3],
        backgroundcolor: 'orange',
        borderskipped: false,
        borderradius: 20,
      },
      {
        label: '# of points',
        data: [7, 11, 5, 8, 3, 7],
        backgroundcolor: 'pink',
        borderskipped: false,
        borderradius: 20,
      }
    ]
  },
  options: {
    scales: {
      x: {
        stacked: true
      }
    }
  }
}

const ctx = document.getelementbyid('chartjscontainer').getcontext('2d');
new chart(ctx, options);
<body>
  <canvas id="chartjscontainer" width="600" height="400"></canvas>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/3.7.1/chart.js"></script>
</body>


Related Query

More Query from same tag