wordcloud与legend搭配使用的问题

308 阅读1分钟

1.在option中的legend配置项中,设置selectedMode : ‘single’ 2.由于echarts-wordcloud中会存在layoutInstance问题,但我们本身无法在node_module中修改。 error:

Uncaught (in promise) TypeError: Cannot read property 'layoutInstance' of undefined

3.卸载echarts-wordcloud npm uninstall echarts-wordcloud

4.通过git获取到2.0.0版本的wordcloud.js的文件。

5.将文件中的this._model.layoutInstance.dispose();注释掉就ok。

this._model.layoutInstance.dispose()