apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.54k stars 19.61k forks source link

.setOption not trigger dataView refresh #12594

Open geminate opened 4 years ago

geminate commented 4 years ago

Version

4.7.0

Steps to reproduce

  1. init a echarts with toolbox-dataview
  2. click toolbox change to dataview
  3. use .setOption to update the data

What is expected?

the data in dataview refresh

What is actually happening?

the data in dataview not be refreshed

echarts-bot[bot] commented 4 years ago

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 you have posted enough image to demo your request. 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 questions.

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

Have a nice day! 🍵

geminate commented 4 years ago

instance.refreshDataView = () => { const dataView = instance._componentsViews[2]._features.dataView if (dataView._dom) { dataView.onclick.bind(dataView)(dataView.ecModel, dataView.api) } } 目前通过这种 Hack 方式解决了,_componentsViews数组index视情况而定。

不过还是建议官方提供一个 手动触发toolbox里工具点击的方法

mrmoheb commented 2 years ago

Do we have any luck to resolve this issue?

easyhunn commented 10 months ago

Did anyone have official solutions for this?

helgasoft commented 10 months ago

Is this about auto-refreshing dataview on data update, without even looking at the chart ? If yes, it may have some marginal value as monitoring tool. @geminate, could you please provide a complete code example? I tried the hack but dataView._dom is null...