[Chartjs]-Chart.js v2 overwrite draw function

4👍

change this line of code:

var cornerRadius = 5;

to this :

var cornerRadius = this._chart.options.is_curved ? 5 : 0;

this will set bar­‘s corner radius to 5 , if the is_curved property is set to true for any particular chart, otherwise will set to 0 .

see – working example on JSFiddle

Leave a comment