gzamann opened a new issue, #21312: URL: https://github.com/apache/echarts/issues/21312
### Version 6.0.0 ### Link to Minimal Reproduction https://codesandbox.io/p/sandbox/blazing-browser-v4pt8q ### Steps to Reproduce 1. Use function for yAxis.max 2. Return a null or undefined value 3. Typescript compile error > Types of property 'max' are incompatible. > Type 'string | ((value: { min: number; max: number; }) => number | null | undefined)' is not assignable to type 'ScaleDataValue | ((extent: { min: number; max: number; }) => ScaleDataValue) | undefined'. ### Current Behavior throws typescript compile error as below > Types of property 'max' are incompatible. > Type 'string | ((value: { min: number; max: number; }) => number | null | undefined)' is not assignable to type 'ScaleDataValue | ((extent: { min: number; max: number; }) => ScaleDataValue) | undefined'. works only when you use `as any` at the end of return ### Expected Behavior `null/undefined` should be accepted as per [documentation](https://echarts.apache.org/en/option.html#yAxis.max) ### Environment ```markdown - OS: macOS Monterey - Browser: Chrome 141.0.7390.67 - Framework: React + Typescript ``` ### Any additional comments? Trying to use a fallback value of null or undefined in the max/min function on yAxis or xAxis options, so that echarts can auto calculate the value. -- 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]
