chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
63.9k stars 11.88k forks source link

Legend: boxPadding does nothing #11803

Closed elenachiosa closed 6 days ago

elenachiosa commented 3 weeks ago

Expected behavior

Providing a number value to boxPadding should update the padding between the colored box and the label text, as per the documentation:

    /**
     * Padding between the color box and the text
     * @default 1
     */
    boxPadding: number;

Current behavior

boxPadding does nothing. There's always the same spacing between the box and the text. image

Reproducible sample

https://codepen.io/teodorachiosa/pen/jOoLREr

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

4.4.2 Also reproducing on 4.4.3

Browser name and version

Chrome 125.0.6422.147

Link to your project

No response