Multiple "type" within "series" #125
-
I’ve observed that ECharts allows for multiple “types” within a “series” in examples like this one. Additionally, different “types” can be mixed within a single series, as shown in this example. I believe there are benefits to this approach. However, I’ve tried implementing this in Charming without success so far. Is it possible to achieve this in Charming? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I don't understand what you mean. In both of your examples, each series only has one type. First example, there are three scatter series. Chart::new()
.series(Scatter::new())
.series(Scatter::new())
.series(Scatter::new()); Second example, one scatter series and one line series. Chart::new()
.series(Scatter::new())
.series(Line::new()); |
Beta Was this translation helpful? Give feedback.
-
Currently, the approach involves calling
This example includes the following code snippet, suggesting an array/vector/tupple of series types, which also can share common properties, such as dataset.
|
Beta Was this translation helpful? Give feedback.
-
It is unequivocal that these are two distinct series. The There is a comparable ECharts wrapper available in the Go language (go-echarts), which saw early contributions from Zhang, that functions in a similar manner. |
Beta Was this translation helpful? Give feedback.
I don't think a json configuration is better. They are different approaches. The json format is way simpler to implement, offers basically all options but the implementation here provides type safety. It's a tradeoff.