ECharts(入门实例)
程序员文章站
2022-03-04 13:50:39
...
ECharts官网:http://echarts.baidu.com/
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ECharts入门实例</title>
<script type="text/javascript" src="echarts.min.js"></script>
</head>
<body>
<div id="main" style="width: 600px; height: 400px;"></div>
<script type="text/javascript">
var option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line'
}]
};
var myChart = echarts.init(document.getElementById("main"));
myChart.setOption(option);
</script>
</body>
</html>
上一篇: Echarts简介及入门
下一篇: RCP重启