We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
需要重新载入数据,新的数据比原来的数据少,报错如下:
echarts.js中:
data.diff(oldData) .add(function (newIdx) { if (symbolNeedsDraw$1(data, newIdx)) { // create node and edge updateNode(data, newIdx, null, group, seriesModel, seriesScope); } }) .update(function (newIdx, oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); if (!symbolNeedsDraw$1(data, newIdx)) { symbolEl && removeNode(data, newIdx, symbolEl, group, seriesModel, seriesScope); return; } // update node and edge updateNode(data, newIdx, symbolEl, group, seriesModel, seriesScope); }) .remove(function (oldIdx) { var symbolEl = oldData.getItemGraphicEl(oldIdx); //这里传入新的data和老的oldIdx removeNode(data, oldIdx, symbolEl, group, seriesModel, seriesScope); }) .execute(); function removeNode(data, dataIndex, symbolEl, group, seriesModel, seriesScope) { //新的data数据少,返回的node等于undefined,因此getModel出错 var node = data.tree.getNodeByDataIndex(dataIndex); var virtualRoot = data.tree.root; var itemModel = node.getModel();
option = { }
The text was updated successfully, but these errors were encountered:
找到解决办法了,先clear一下,再重载 myChart.clear();
Sorry, something went wrong.
No branches or pull requests
One-line summary [问题简述]
需要重新载入数据,新的数据比原来的数据少,报错如下:
echarts.js中:
Version & Environment [版本及环境]
Expected behaviour [期望结果]
ECharts option [ECharts配置项]
Other comments [其他信息]
The text was updated successfully, but these errors were encountered: