-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample_phone_pie.html
24 lines (21 loc) · 2.07 KB
/
example_phone_pie.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Awesome go-echarts</title>
<script src="https://go-echarts.github.io/go-echarts-assets/assets/echarts.min.js"></script>
</head>
<body><div class="container">
<div class="item" id="MOYhBOAgmYSs" style="width:900px;height:500px;"></div>
</div><script type="text/javascript">
"use strict";
let goecharts_MOYhBOAgmYSs = echarts.init(document.getElementById('MOYhBOAgmYSs'), "white", { renderer: "canvas" });
let option_MOYhBOAgmYSs = {"color":["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],"legend":{},"series":[{"name":"Phone Count","type":"pie","data":[{"name":"苹果","value":51,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#333333"}},{"name":"华为","value":12,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#FF0000"}},{"name":"未知Android设备","value":8,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#A9954B"}},{"name":"小米","value":7,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#FF6700"}},{"name":"荣耀","value":6,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#0033A0"}},{"name":"一加","value":4,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#FF0000"}},{"name":"IQOO","value":3,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#FF6F00"}},{"name":"三星","value":3,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#1428A0"}},{"name":"红米","value":2,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#ED1C24"}},{"name":"OPPO","value":2,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#008000"}},{"name":"Vivo","value":2,"label":{"show":true,"formatter":"{b}: {d}%"},"itemStyle":{"color":"#0072C6"}}]}],"title":{},"toolbox":{},"tooltip":{}}
goecharts_MOYhBOAgmYSs.setOption(option_MOYhBOAgmYSs);
</script>
<style>
.container {margin-top:30px; display: flex;justify-content: center;align-items: center;}
.item {margin: auto;}
</style>
</body>
</html>