Chartjs-How to create chart.js vertical bar chat with rounded corners in angular 6?

0👍

You can install chartjs-top-round-bar. Go through following steps:-

1. Install the plugin - npm i chartjs-top-round-bar.

2. Import in TS - import 'chartjs-top-round-bar';.

3. Add in the option while creating Chart -


           let myChart = new Chart(this.ctx, { 
                                   type: 'roundedBar', 
                                   data: { 
                                           labels: ['label 1'], 
                                           datasets: [{label: 'Label 1', data}]
                                   }, 
                                   options: { 
                                             barRoundness: 0.3
                                   }
                          }

I hope this helps.

Leave a comment