Echarts Install
# Latest stable version $ cnpm install echarts --save
After installation, ECharts and zrender will be placed in the node_modules directory. We can directly use require('echarts') in the project code.
## Example
var echarts = require('echarts'); // Initialize echarts instance based on the prepared dom var myChart = echarts.init(document.getElementById('main')); // Draw the chart myChart.setOption({title: {text: 'ECharts Introductory Example'}, tooltip: {}, xAxis: {data: ['Shirt', 'Sweater', 'Chiffon Shirt', 'Pants', 'High Heels', 'Socks']}, yAxis: {}, series: [{name: 'Sales', type: 'bar', data: [5, 20, 36, 10, 10, 20]}]});
YouTip