1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
| <!--
| 描述: 水球图
| 作者: Jack Chen
| 日期: 2020-05-03
| -->
|
| <template>
| <div class="wrap-container sn-container">
| <div class="sn-content">
| <div class="sn-title">水球图</div>
| <div class="sn-body">
| <div class="wrap-container">
| <div class="chartsdom" id="chart_polo"></div>
| </div>
| </div>
| </div>
| </div>
| </template>
|
| <script>
|
|
| export default {
| name: "waterPolo",
| data() {
| return {
| option: null
|
| }
| },
| mounted() {
| this.getEchart();
| },
| methods: {
| getEchart() {
| let myChart = echarts.init(document.getElementById('chart_polo'));
| this.option = {
| series: [{
| type: 'liquidFill',
| data: [0.45],
| radius: '70%',
| color: ['#00b9f5'],
| backgroundStyle: {
| color: 'rgba(0, 0, 0, 0.5)',
| borderColor: '#007bff',
| borderWidth: 3,
| shadowColor: 'rgba(0, 123, 225, 0.4)',
| shadowBlur: 20
| },
| outline: {
| show: false,
| },
| }]
| }
|
| myChart.setOption(this.option, true);
|
| window.addEventListener('resize', () => {
| myChart.resize();
| });
| }
| },
| beforeDestroy() {
|
| }
| };
| </script>
|
| <style lang="scss" scoped>
| .sn-container {
| left: 974px;
| top: 2838px;
| width: 432px;
| height: 400px;
| .chartsdom {
| width: 100%;
| height: 100%;
| }
| }
| </style>
|
|