Chart.js
Chart.js copied to clipboard
Black borders in label.
Any way to get rid of those nasty black borders around the coloured item rectangle within a label. (Don't know what you would call that).

I couldn't find this within the Docs, so forgive me if there's a setting I'm missing.
Thanks
@Kiszko if you're using the latest version there is a callback to configure these colors.
options: {
tooltips: {
callbacks: {
labelColor: function(tooltipItem, chartInstance) {
var meta = chartInstance.getDatasetMeta(tooltipItem.datasetIndex);
var activeElement = meta.data[tooltipItem.index];
var view = activeElement._view;
return {
borderColor: 'transparent',
backgroundColor: view.backgroundColor
};
}
}
}
}
Thanks, although 'transparent' doesn't work. It only accepts a solid color, eg. 'red'. Additionally, no options for borderWidth here. :(
It's worth mentioning the colors get converted from rgba to rgb which is also a strange behaviour.
Guidance appreciated.