Gumichocopengin8 opened a new issue, #19073:
URL: https://github.com/apache/echarts/issues/19073

   ### Version
   
   5.4.3
   
   ### Link to Minimal Reproduction
   
   https://codesandbox.io/s/vigilant-sun-gcv5ph?file=/src/App.tsx
   
   ### Steps to Reproduce
   
   1. set `type: 'log'` and `scale: true` in y axis object
   ```ts
   yAxis: { type: 'log', scale: true }
   ```
   2. 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](https://echarts.apache.org/en/option.html#xAxis.scale) is 
correct, it should not throw errors
   
   > It is available only in numerical axis, i.e., 
[type](https://echarts.apache.org/en/option.html#xAxis.type): 'value'.
   
   I think `type : 'log'` is also numerical axis
   
   ### Environment
   
   ```markdown
   - OS: macOS
   - Browser: Chrome
   - Framework: React, Typescript
   ```
   
   
   ### Any additional comments?
   
   If this error is expected, the doc should be fixed. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to