[Chartjs]-Change Radius/Point size of Legend Points in chart.js when usePointStyle is true

6👍

You can use the boxWidth option to influence the size of the point in the legend:

options: {
  legend: {
    labels: {
      usePointStyle: true,
      boxWidth: 6
    }
  }
}

Looking at the chartjs code (version 2.8), boxWidth is used as long as it is smaller than fontSize. fontSize is used as it gets larger than boxWidth.

0👍

If you read the documentation of chartjs about legend:

usePointStyle

Label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).

So just by adding:

...
labels: {
  fontSize: 2,
    usePointStyle:true,
}
...

JSFiddle with the modified size

You get the size of the legend points smaller.

Size 42
Size 2

Maybe I understood you wrong, if so leave a comment and I will modify my answer to fit the new question

Leave a comment