kkpoon / echarts-webcomponent

webcomponent of echarts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong tooltip position

ritequila opened this issue · comments

Hi,

I'm trying to integrate echarts in polymer starter kit.
I have a problem with tooltip position:
at the first mouseover event, tooltip position is what I expect (I tried various positioning attempts),
but after mouseout from chart and mouseover again in chart, tooltip take a wrong position.
I also tried directly on the component page, with same result.

I added this parameters in component code:
"tooltip":{"trigger":"axis", "position": [10,10] }

has someone encountered the same problem?
Thank a lot!

I see the same problem too. investigating

Added a div element under the echarts-webcomponent element fixes the issue. Thanks for reporting the issue.

Thanks!
Now, whit this solution, for intercept the echart instance and use setOption function, I used the following code (with firstChild):

var chart = echarts.getInstanceByDom(mychartId.firstChild);
chart.setOption(myOption);