Change font size of a specific data label
reisenmachtfreude opened this issue · 2 comments
reisenmachtfreude commented
I've a chart js using the datalabels plugin.
The displayed string of a data label I can access using:
my_chartjs_obj.data.labels[0]
How is it possible to change the font size and font color of one specific data label (e.g. the first one with index 0)?
Thanks for your help!
stockiNail commented
@reisenmachtfreude yes, you can, using a scriptable option.
See https://chartjs-plugin-datalabels.netlify.app/guide/options.html#scriptable-options
reisenmachtfreude commented
@stockiNail Thank you. That solved my question.