Version
5.4.3
Link to Minimal Reproduction
https://codesandbox.io/s/vigilant-sun-gcv5ph?file=/src/App.tsx
Steps to Reproduce
- set
type: 'log' and scale: true in y axis object
yAxis: { type: 'log', scale: true }
- I got the following error
Type '{ type: "log"; scale: true; }' is not assignable to type 'YAXisOption | YAXisOption[]'.
Object literal may only specify known properties, and 'scale' does not exist in type '(AxisBaseOptionCommon & { gridIndex?: number; gridId?: string; position?: CartesianAxisPosition; offset?: number; categorySortInfo?: OrdinalSortInfo; } & { ...; }) | (LogAxisBaseOption & ... 1 more ... & { ...; })'.
echarts.d.ts(10909, 5): The expected type comes from property 'yAxis' which is declared here on type 'EChartsOption'
Current Behavior
I get a type error in Typescript
Expected Behavior
If the scale doc is correct, it should not throw errors
It is available only in numerical axis, i.e., type: 'value'.
I think type : 'log' is also numerical axis
Environment
- OS: macOS
- Browser: Chrome
- Framework: React, Typescript
Any additional comments?
If this error is expected, the doc should be fixed.
Version
5.4.3
Link to Minimal Reproduction
https://codesandbox.io/s/vigilant-sun-gcv5ph?file=/src/App.tsx
Steps to Reproduce
type: 'log'andscale: truein y axis objectCurrent Behavior
I get a type error in Typescript
Expected Behavior
If the scale doc is correct, it should not throw errors
I think
type : 'log'is also numerical axisEnvironment
Any additional comments?
If this error is expected, the doc should be fixed.