Multiple echarts in same body

6ju8rftf  于 2022-11-05  发布在  Echarts
关注(0)|答案(3)|浏览(137)

Version

5.2.1

Steps to reproduce

I create my own library in which I insert an eCharts chart. Then when I use my library selector in my app, I pass to library the configuration to use as option for myChart.setOption (like tooltip true/false, legend true/false, and so on). If I call multiple times my lib selector in same body then compare only one chart with the option of the last chart that receives the option.
I think its depends on id="main" from eCharts

What is expected?

I would to visualize multiple chart indipendent each ther

What is actually happening?

I visualize only one chart.
Plese not I won't single chart splitted with grid but I would different chart in the same boy

uqjltbpv

uqjltbpv1#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it containsa minimum reproducible demoand necessaryimagesto illustrate. Otherwise, our committers will ask you to do so.

  • A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe to our mailing list .

Have a nice day! 🍵

bf1o4zei

bf1o4zei2#

You need to set different id to dom containers of the charts and make sure they are selected correctly.

mzmfm0qo

mzmfm0qo3#

Hello,
Kind on the same here. I am setting up 2 distinct charts with dynamic updating (time xAxis). The dynamic updating works. But the legend labels of the first chart are not the one I defined its own legend option. They are coming from the legend of the second chart.
Do not take into account, my issue is coming from : https://stackoverflow.com/questions/12690107/clone-object-without-reference-javascript

相关问题