5 minutes to your first chart

1, Creat a echarts.html file. Prepare a Dom with size (width and height) for ECharts.
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>鲁虺图表网_鲁虺3D图表网_可视化三维图表_ECharts,全球最好网真互动式种源文化传播交流索引平台 lǔ 鲁 huǐ 虺 wén 文 huà 化 wǎng 网- 敏锐洞察行业动态,深度挖掘新思维</title>
</head>

<body>
    <!-- Prepare a Dom with size (width and height) for ECharts -->
    <div id="main" style="height:400px"></div>
</body>
2, Create a < script > tag to include echarts' core file, echarts.js.
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>鲁虺图表网_鲁虺3D图表网_可视化三维图表_ECharts,全球最好网真互动式种源文化传播交流索引平台 lǔ 鲁 huǐ 虺 wén 文 huà 化 wǎng 网- 敏锐洞察行业动态,深度挖掘新思维</title>
</head>
<body>
    <!-- Prepare a Dom with size (width and height) for ECharts -->
    <div id="main" style="height:400px"></div>
    <!-- ECharts import -->
    <script src="http://echarts.luhui.net/?build/dist/echarts.js"></script>
</body>
3, Create a new < script > tag, configure for module loader a path of echarts and the chart you need (the relative path is to link from the current page to echarts.js). For imported chart file, refer to Import ECharts2
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>鲁虺图表网_鲁虺3D图表网_可视化三维图表_ECharts,全球最好网真互动式种源文化传播交流索引平台 lǔ 鲁 huǐ 虺 wén 文 huà 化 wǎng 网- 敏锐洞察行业动态,深度挖掘新思维</title>
</head>
<body>
    <!-- Prepare a Dom with size (width and height) for ECharts -->
    <div id="main" style="height:400px"></div>
    <!-- ECharts import -->
    <script src="http://echarts.luhui.net/?build/dist/echarts.js"></script>
    <script type="text/javascript">
        // configure for module loader
        require.config({
            paths: {
                echarts: 'http://echarts.luhui.net/?build/dist'
            }
        });
    </script>
</body>
4, Dynamically load echarts and the chart you need in the < script > tag. Use callback function to initialize and drive the generation of charts. For option, refer to API & Doc
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>鲁虺图表网_鲁虺3D图表网_可视化三维图表_ECharts,全球最好网真互动式种源文化传播交流索引平台 lǔ 鲁 huǐ 虺 wén 文 huà 化 wǎng 网- 敏锐洞察行业动态,深度挖掘新思维</title>
</head>
<body>
    <!-- Prepare a Dom with size (width and height) for ECharts -->
    <div id="main" style="height:400px"></div>
    <!-- ECharts import -->
    <script src="http://echarts.luhui.net/?build/dist/echarts.js"></script>
    <script type="text/javascript">
        // configure for module loader
        require.config({
            paths: {
                echarts: 'http://echarts.luhui.net/?build/dist'
            }
        });
        
        // use
        require(
            [
                'echarts',
                'echarts/chart/bar' // require the specific chart type
            ],
            function (ec) {
                // Initialize after dom ready
                var myChart = ec.init(document.getElementById('main')); 
                
                var option = {
                    tooltip: {
                        show: true
                    },
                    legend: {
                        data:['Sales']
                    },
                    xAxis : [
                        {
                            type : 'category',
                            data : ["Shirts", "Sweaters", "Chiffon Shirts", "Pants", "High Heels", "Socks"]
                        }
                    ],
                    yAxis : [
                        {
                            type : 'value'
                        }
                    ],
                    series : [
                        {
                            "name":"Sales",
                            "type":"bar",
                            "data":[5, 20, 40, 10, 10, 20]
                        }
                    ]
                };
        
                // Load data into the ECharts instance 
                myChart.setOption(option); 
            }
        );
    </script>
</body>
5, Open echarts.html in the browser to see the following results.
1, Creat a echarts.html file. Prepare a Dom with size (width and height) for ECharts.
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>鲁虺图表网_鲁虺3D图表网_可视化三维图表_ECharts,全球最好网真互动式种源文化传播交流索引平台 lǔ 鲁 huǐ 虺 wén 文 huà 化 wǎng 网- 敏锐洞察行业动态,深度挖掘新思维</title>
</head>
<body>
    <!-- Prepare a Dom with size (width and height) for ECharts -->
    <div id="main" style="height:400px"></div>
</body>
2, Create a < script > tag to import echarts-plain.js. For the imported chart file, refer toImport ECharts3
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>鲁虺图表网_鲁虺3D图表网_可视化三维图表_ECharts,全球最好网真互动式种源文化传播交流索引平台 lǔ 鲁 huǐ 虺 wén 文 huà 化 wǎng 网- 敏锐洞察行业动态,深度挖掘新思维</title>
</head>
<body>
    <!-- Prepare a Dom with size (width and height) for ECharts -->
    <div id="main" style="height:400px"></div>
    <!-- ECharts import -->
    <script src="http://echarts.luhui.net/?build/dist/echarts-all.js"></script>
</body>
3, Create a <script> tag. Use global variable echarts to initialize and drive the generation of charts. For option, refer toAPI & Doc
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <title>鲁虺图表网_鲁虺3D图表网_可视化三维图表_ECharts,全球最好网真互动式种源文化传播交流索引平台 lǔ 鲁 huǐ 虺 wén 文 huà 化 wǎng 网- 敏锐洞察行业动态,深度挖掘新思维</title>
</head>
<body>
    <!-- Prepare a Dom with size (width and height) for ECharts -->
    <div id="main" style="height:400px"></div>
    <!-- ECharts import -->
    <script src="http://echarts.luhui.net/?build/dist/echarts-all.js"></script>
    <script type="text/javascript">
        // Initialize after dom ready
        var myChart = echarts.init(document.getElementById('main')); 
        
        var option = {
            tooltip: {
                show: true
            },
            legend: {
                data:['Sales']
            },
            xAxis : [
                {
                    type : 'category',
                    data : ["Shirts", "Sweaters", "Chiffon Shirts", "Pants", "High Heels", "Socks"]
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                {
                    "name":"Sales",
                    "type":"bar",
                    "data":[5, 20, 40, 10, 10, 20]
                }
            ]
        };

        // Load data into the ECharts instance 
        myChart.setOption(option); 
    </script>
</body>
4, Open echarts.html in the browser to see the following results.

Best Reference Resource: Instances

ECharts is a data-driven chart. Since your main concern is how to achieve that option, we offer you, right here on our official website, an extensive documentation for your reference and over 100 ready-made demos with the most core option code that is free to edit online. For ECharts, play makes perfect; hope you enjoy playing here.