Easy Tutorial
❮ Echarts Mediaqueries Echarts Sunburst ❯

ECharts Tutorial

ECharts is an open-source visualization library implemented in JavaScript, covering charts for various industries to meet diverse needs.

ECharts adheres to the Apache-2.0 open-source license and is free for commercial use.

ECharts is compatible with most current browsers (IE8/9/10/11, Chrome, Firefox, Safari, etc.) and multiple devices, allowing for flexible display anytime, anywhere.

Prerequisites for Reading This Tutorial:

To understand this tutorial, you should have the following basics:

First ECharts Example

Example

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>First ECharts Example</title>
    <!-- Include echarts.js -->
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
</head>
<body>
    <!-- Prepare a DOM with size (width and height) for ECharts -->
    <div id="main" style="width: 600px;height:400px;"></div>
    <script type="text/javascript">
        // Initialize echarts instance based on the prepared dom
        var myChart = echarts.init(document.getElementById('main'));

        // Specify the configuration items and data for the chart
        var option = {
            title: {
                text: 'First ECharts Example'
            },
            tooltip: {},
            legend: {
                data:['Sales']
            },
            xAxis: {
                data: ["Shirt","Sweater","Chiffon Shirt","Pants","High Heels","Socks"]
            },
            yAxis: {},
            series: [{
                name: 'Sales',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20]
            }]
        };

        // Use the configuration items and data just specified to display the chart.
        myChart.setOption(option);
    </script>
</body>
</html>

Click the "Try It" button to view the online example.

Features of ECharts

ECharts includes the following features:

-Barrier-free access (4.0+): Supports automatically generating descriptions based on chart configuration items, allowing blind individuals to understand chart content with the help of reading devices, making charts accessible to a wider audience!

❮ Echarts Mediaqueries Echarts Sunburst ❯