Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error background color of Radar chart #11082

Closed
choichoijin opened this issue Jan 22, 2023 · 0 comments
Closed

Type error background color of Radar chart #11082

choichoijin opened this issue Jan 22, 2023 · 0 comments
Labels
type: bug type: types Typescript type changes
Milestone

Comments

@choichoijin
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug type: types Typescript type changes
Projects
None yet
Development

No branches or pull requests

3 participants