Custom functions on Echarts transform

dwthyt8l  于 4个月前  发布在  Echarts
关注(0)|答案(4)|浏览(38)

What problem does this feature solve?

We would like to add line chart that are calculated from the values of other lines charts in the same graph. The calculation formula would be a javascript line of code entered by the user. We believe that the 'transform' function is ideal for that but the documentation only describes the inbuild (sort, filter) functions or the ecstats ones.

What does the proposed API look like?

So we could have a 'custom' type where we can define a custom javascript function that can use some data stored in the 'dataset' using their names.

bvhaajcl

bvhaajcl2#

Hello,
Thanks for the link, but it does not really help because the echarts-simple-transform does not give much explainations on how to build such addon, and the Echart documentation does not either.
Regards.

iklwldmw

iklwldmw3#

Heres an example that may help

The example isn't working, likely missing data?

kgsdhlau

kgsdhlau4#

I have a similar task. I want to multiply the input dataset by a constant using transformations. As I understand, there is no built-in map transformation (only sort and filter). Therefore, I would like simple examples of how to do it myself.
Upd: I found a useful example:
https://stackoverflow.com/questions/77847037/apache-echarts-linear-transformation-of-dataset

相关问题