zmc
2023-08-29 b77599ace9fc1c68bacd0e37ddb2e83812660ae3
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
<script>
import * as echarts from 'echarts';
export default {
  data() {
    return {
      chart: null
    };
  },
  mounted() {
    this.initRadarChart();
  },
  methods: {
    initRadarChart() {
      this.chart = echarts.init(document.getElementById('main'));
      let option = {
        title: {
          text: '基础分析'
        },
        // legend: {
        //   data: ['Allocated Budget', 'Actual Spending']
        // },
        tooltip: {},
        radar: {
          // shape: 'circle',
          indicator: [
            { name: '数据有效率', max: 1 },
            { name: '同时段同类异常复现情况', max: 2 },
            { name: '异常复现率', max: 1 },
            { name: '异常类型数量', max: 15 },
            { name: '数据在线率', max: 1 }
          ]
        },
        series: [
          {
            name: 'Budget vs spending',
            type: 'radar',
            data: [
              {
                value: [0.1, 1, 0.2, 8, 0.5],
                name: '异常分析'
              },
            //   {
            //     value: [0.7, 1.4, 0.5, 8, 0.3],
            //     name: 'Actual Spending'
            //   }
            ]
          }
        ]
      };
      this.chart.setOption(option);
    }
  }
};
</script>
 
<template>
  <div id="main" class="chart"></div>
</template>
 
<style scoped>
.chart {
  height: 500px;
  width: 500px;
}
</style>