Version
5.5.0
Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/echarts-overflow-property-typescript-problem-fkp73v?file=%2Fsrc%2FchartOptions.ts%3A142%2C11
Steps to Reproduce
- Create a project using echarts 5.5.0 and typescript 4.4.0+
- Configure a chart with
yAxis.nameTextStyle.overflow set to anything
- Hover over the red squiggly that will appear under
overflow: <value> and view the error message
Current Behavior
In the code sandbox attached, you can view the behavior in the chartOptions.ts file (scroll down below all the data - I copied a graph directly from the eCharts demo tabs and just added the necessary code to the yAxis to recreate the error).
When you follow the steps above, you will receive a typescript warning that the overflow property is not part of the AxisNameTextStyleOption type. Meanwhile the documentation states that it should be a valid property: docs
Type '{ width: number; overflow: string; }' is not assignable to type 'AxisNameTextStyleOption'.
Object literal may only specify known properties, and 'overflow' does not exist in type 'AxisNameTextStyleOption'.typescript(2322)
echarts.d.ts(2389, 5): The expected type comes from property 'nameTextStyle' which is declared here on type 'YAXisOption'
Expected Behavior
I should be able to define the overflow property as part of the nameTextStyle object without TypeScript errors.
Environment
- OS: macOS Ventura
- Browser: Chrome latest version
- Framework: NextJS 14.1.3
Any additional comments?
No response
Version
5.5.0
Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/echarts-overflow-property-typescript-problem-fkp73v?file=%2Fsrc%2FchartOptions.ts%3A142%2C11
Steps to Reproduce
yAxis.nameTextStyle.overflowset to anythingoverflow: <value>and view the error messageCurrent Behavior
In the code sandbox attached, you can view the behavior in the
chartOptions.tsfile (scroll down below all the data - I copied a graph directly from the eCharts demo tabs and just added the necessary code to theyAxisto recreate the error).When you follow the steps above, you will receive a typescript warning that the
overflowproperty is not part of theAxisNameTextStyleOptiontype. Meanwhile the documentation states that it should be a valid property: docsExpected Behavior
I should be able to define the
overflowproperty as part of thenameTextStyleobject without TypeScript errors.Environment
Any additional comments?
No response