echarts dataZoom.slider is used but not imported.

echarts dataZoom.slider is used but not imported._第1张图片
使用dataZoom时图表报错:

resize should not be called during main process.
omponent dataZoom.slider is used but not imported.

解决方法:
在使用的页面种单独引入一下dataZoom:
echarts dataZoom.slider is used but not imported._第2张图片

import ‘echarts/lib/component/dataZoom’;

你可能感兴趣的:(echarts,前端,javascript)