<!DOCTYPE html>
<html>
<head><meta charset="utf-8"><title>线状图</title><script src="echarts.js"></script>
</head><body><div id="main" style="width: 600px;height:400px;"></div><script>echarts.init(document.getElementById('main')).setOption({title: {text: 'Line Chart'}, // 标题。tooltip: {},toolbox: {feature: {dataView: {}, // 数据视图,单击显示坐标点数据。saveAsImage: { // 保存为图片。pixelRatio: 2 // 像素比。},restore: {} // 还原,不知道具体什么作用。}},xAxis: {},yAxis: {},series: [{type: 'line', //线状图。smooth: true, // 平滑。data: [[12, 5], [24, 20], [36, 36], [48, 10], [60, 10], [72, 20]] // 点坐标[x,y]}]});</script>
</body>
</html>