标签:
//from echarts example <body> <div id="main" style="height:400px;"></div> ... <script src="./js/echarts.js"></script> </body>
//from echarts example <body> <div id="main" style="height:400px;"></div> ... <script src="./js/echarts.js"></script> <script type="text/javascript"> require.config({ paths: { echarts: ‘./js/dist‘ } }); </script> </body>
//from echarts example <body> <div id="main" style="height:400px;"></div> ... <script src="./js/echarts.js"></script> <script type="text/javascript"> require.config({ paths: { echarts: ‘./js/dist‘ } }); require( [ ‘echarts‘, ‘echarts/chart/line‘, // 按需加载所需图表,如需动态类型切换功能,别忘了同时加载相应图表 ‘echarts/chart/bar‘ ], function (ec) { var myChart = ec.init(document.getElementById(‘main‘)); var option = { ... } myChart.setOption(option); } ); </script> </body>
标签:
原文地址:http://www.cnblogs.com/liujiangping/p/4873605.html