line: simple line

简单折线图

HTML

<script src="//unpkg.com/echarts/dist/echarts.min.js"></script>
<script src="https://underscorejs.org/underscore.js"></script>
<div id="main" style="width: 800px;height:600px;"></div>

JavaScript

// 基于准备好的dom,初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));
        
        var chartData =  {
    "data" : [{
        "id"                 : 1,
        "name"               : "root node",
        "value"              : 191317,
        "category"           : 1,
        "label"              : {"normal": {"show": true}},
        "draggable"          : true,
        "treeNode"           : null,
        "parentChartNodeList": null
    }, {
        "id"                 : 0,
        "name"               : "node a",
        "value"              : "34565",
        "category"           : 2,
        "label"              : {"normal": {"show": true}},
        "draggable"          : true,
        "treeNode"           : null,
        "parentChartNodeList": null
    }, {
        "id"                 : 2,
        "name"               : "node b",
        "value"              : "2927",
        "category"           : 3,
        "label"              : {"normal": {"show": true}},
        "draggable"          : true,
        "treeNode"           : null,
        "parentChartNodeList": null
    }, {
        "id"                 : 3,
        "name"               : "node c",
        "value"              : "2359",
        "category"           : 3,
        "label"              : {"normal": {"show": true}},
        "draggable"          : true,
        "treeNode"           : null,
        "parentChartNodeList": null
    }, {
        "id"                 : 4,
        "name"               : "node d",
        "value"              : "1965",
        "category"           : 3,
        "label"              : {"normal": {"show": true}},
        "draggable"          : true,
        "treeNode"           : null,
        "parentChartNodeList": null
    }, {
        "id"                 : 5,
        "name"               : "node e",
        "value"              : "1683",
        "category"           : 3,
        "label"              : {"normal": {"show": true}},
       ...