Skip to content

Legend: boxPadding does nothing #11803

@teodorachiosa

Description

@teodorachiosa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions