hustcc / hustcc/echarts-for-react

Typing does not support charts v5.4.3

Open
#553 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5k
Forks
650
PR merge metrics
No merged PRs in 30d

Description

There are TypeScript errors when using echarts v5.4.3 and eachrts-for-react v3.0.2,

The following is in `package.json`

```
{
"dependencies": {
...
"echarts": "^5.4.3",
"echarts-for-react": "^3.0.2",
...
},
...
}
```

Here is a simple reproduction case:

```typescript
import ReactECharts from 'echarts-for-react';

export const MyComponent: React.FC = () => {

return (

)
}
```

Executing the `npm run build` which calls `react-scripts build` causes the following error
```
TS2322: Type '{ renderer: "canvas"; width: "auto"; height: "auto"; useCoarsePointer: true; pointerSize: number; useDirtyRect: true; }' is not assignable to type 'Opts'.
Object literal may only specify known properties, and 'useCoarsePointer' does not exist in type 'Opts'.
28 | width: "auto",
29 | height: "auto",
> 30 | useCoarsePointer: true,
| ^^^^^^^^^^^^^^^^^^^^^^
31 | pointerSize: 100,
32 | useDirtyRect: true,
33 | }}
```

A similar error occurs on the `pointerSize: 100,` and `useDirtyRect: true` options.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.