G2
G2 copied to clipboard
【4.0】更新问题,vue项目父组件为tab切换dataList,子组件图表可以接收到数据,但是图例不能切换更新,我watch监听dataList报错!!!!!!!求解,着急!!!
父组件
这样tab切换时报错Vue warn]: Error in callback for watcher "btData": "TypeError: Cannot read property 'appendChild' of null" 不能正常显示
报这个错误:"TypeError: Cannot read property 'appendChild' of null"
一般是 G2 找不到绘制图表的 DOM,你检查下是不是 new Chart 那里 container 的 dom id 没有传对。