4👍
✅
Two options with Chart.js:
1. using data labels plugin:
plugins: {
datalabels: {
color: 'red',
align: 'top',
anchor: 'end',
formatter: function(value, context) {
console.log(context)
if (value>70)
return "("+context.dataIndex + '): ' + value;
else
return "";
}
}
}
example: http://jsfiddle.net/beaver71/wo2cd3jf/
2. using annotation plugin:
annotation: {
drawTime: 'afterDatasetsDraw',
annotations: annotations_array
}
Source:stackexchange.com