Skip to content

Possible stroke display issue on ticks labels for a radial scale #11338

Closed
@mylittlechart

Description

@mylittlechart

I found a potential bug in the code that may result in a stroke not being displayed on ticks labels for a radial scale.

Expected behavior

The textStrokeWidth and textStrokeColor properties should apply a stroke to the ticks labels for the radial scale.

Code:

scale: {
    ticks: {
        beginAtZero: true,
        max: 10,
        stepSize: 2,
        callback: function (value, index, values) {
            return value;
        },
        textStrokeWidth: 2, // Text stroke width for ticks
        textStrokeColor: 'green' // Text stroke color for ticks
    },
    pointLabels: {
        fontSize: 14
    }
}

Current behavior

The stroke may not be displayed on the ticks labels for the radial scale.
Codepen example here

Reproducible sample

https://codepen.io/MLC-codepend/pen/qBQEvav

Optional extra steps/info to reproduce

  1. Set up a radial chart with the given code configuration.
  2. Observe the ticks labels for the radial scale to check if the stroke is displayed.

Possible solution

No response

Context

No response

chart.js version

v4.3.0

Browser name and version

Crome Version 114.0.5735.106 (Official build) (arm64)

Link to your project

https://codepen.io/MLC-codepend/pen/qBQEvav

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