Skip to content

Type error background color of Radar chart  #11082

@choichoijin

Description

@choichoijin

Expected behavior

I had an issue that background color of Radar chart works well but doesn't recognize type. But it worked by adding type in RadialLinearScaleOptions. Please let me know if this is a possible solution.

Current behavior

The error message is like this.

Object literal may only specify known properties, and 'backgroundColor' does not exist in type '_DeepPartialObject<{ type: "radialLinear"; } & CoreScaleOptions & { animate: boolean; startAngle: number; angleLines: { display: boolean; color: Scriptable<Color, ScriptableScaleContext>; lineWidth: Scriptable<...>; borderDash: Scriptable<...>; borderDashOffset: Scriptable<...>; }; ... 7 more ...; ticks: RadialTickO...'.ts(2322)

Reproducible sample

https://codesandbox.io/s/react-chartjs-2-chart-js-issue-template-v4-forked-173fmz?file=/src/App.tsx

Optional extra steps/info to reproduce

No response

Possible solution

add type
backgroundColor: Color; in type RadialLinearScaleOptions

Context

I'm trying to make this chart.
스크린샷 2023-01-23 오전 1 20 47

chart.js version

v4.1.2

Browser name and version

No response

Link to your project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions