Check out the link above. It's one of the examples of ECharts (line 47).
Thanks btw. It's a great chart lib and deserves more attention as chart.js in my opinion. Anyway...
I just copied the example code and added some types for TypeScript by checking what types are expected here.
Current Behavior
For the renderItem method argument params CustomSeriesRenderItemParams, I get the error that params.coordSys.x (also y, width and height do not exsit on that type.) But at runtime it works. Maybe a type issue? Or is there another derived type I should use?
Version
5.4.1
Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=custom-profile
Steps to Reproduce
Check out the link above. It's one of the examples of ECharts (line 47). Thanks btw. It's a great chart lib and deserves more attention as chart.js in my opinion. Anyway...
I just copied the example code and added some types for TypeScript by checking what types are expected here.
Current Behavior
For the renderItem method argument params
CustomSeriesRenderItemParams
, I get the error thatparams.coordSys.x
(alsoy
,width
andheight
do not exsit on that type.) But at runtime it works. Maybe a type issue? Or is there another derived type I should use?There is only
type
property.Expected Behavior
Types should work well for a library written in TypeScript. What is great btw.
Workaround: Modify (extend) type or use
any
orunknown
. Not the best solution.Environment
Any additional comments?
No matter, but I use echarts directly in Angular. (Not ngx-echarts.)