Adjust font-weight in Chart.js doughnut chart

๐Ÿ‘:0

If you use crossText instead of label, you can adjust the font weight by setting these options:

var options = {
        crossTextFontSize : [80],
        crossTextFontFamily : ["Open Sans"],
        crossTextFontStyle : ["bold"],
        crossTextFontColor : ["#FF0000"],
        crossTextRelativePosX : [2],
        crossTextRelativePosY : [2],
        crossTextPosX : [0],
        crossTextPosY : [0],
        crossTextAlign : ["center"],
        crossTextBaseline : ["middle"]
    }

Iโ€™m not sure why they decided to put the FontWeight under FontStyle, but it works.

Wiki: https://github.com/FVANCOP/ChartNew.js/wiki/100_040_CrossText

Leave a comment