<!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({
series: {
type: 'pie', // 饼状图。
data: [
{name: 'A', value: '1212'}, // value可以是数字类型,也可以是字符串形式的数字。
{name: 'B', value: 2323},
{name: 'C', value: 1919}
]
}
});
</script>
</body>
</html>
echarts_饼状图.html
猜你喜欢
转载自blog.csdn.net/weixin_42193179/article/details/88744009
今日推荐
周排行