关于chart不能自行切换出现的报错现象

1、echart 页面菜单不能切换,line和bar不能自行切换

页面上报错误   bar has not been reqired

解决办法,加载bar

    <script type="text/javascript">
        require.config({
            path:{
                echarts:'../../../lib/echart/build/dist'
            }
        });
        //此处漏掉加载bar
        require(['echarts','echarts/chart/line','echats/chart/bar'],function(ec){
        
        })
原文地址:https://www.cnblogs.com/pengfei25/p/8744180.html