zhangzeli
2021-11-01 baa03e2f9b1388a673e39cc3f2c1b055b16e513e
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
<template>
  <div>
    <Card>
      <p slot="title" class="card-title">
        <Icon type="md-locate" style="margin-right: 5px"></Icon>访问用户分布
      </p>
      <Row type="flex" justify="center" align="middle" style="height: 273px">
        <apexchart
          type="donut"
          width="350"
          :options="chartOptions"
          :series="series"
        />
      </Row>
    </Card>
  </div>
</template>
 
<script>
export default {
  name: "visitSeparation",
  data() {
    return {
      series: [],
      chartOptions: {
        labels: ["移动端", "PC", "平板", "IOS", "其他"],
        plotOptions: {
          pie: {
            donut: {
              size: "70%",
            },
          },
        },
        dataLabels: {
          enabled: false,
        },
        legend: {
          position: "right",
        },
      },
    };
  },
  methods: {
    init() {
      this.series = [45, 18, 27, 15, 13];
    },
  },
  mounted() {
    this.init();
  },
};
</script>