css
liuying
2024-04-25 f9bd89a83b87cd27eef7ed116881bd983cc1869e
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<template>
  <div class="right4">
    <div class="chart-name">
      服务器状态
      <dv-decoration-3 style="width:200px;height:20px;" />
    </div>
    <dv-charts :option="option" />
  </div>
</template>
 
<script>
  export default {
    name: 'Right4',
    data() {
      return {
        option: {
          // title: {
          //     text: '周销售额趋势'
          // },
          xAxis: {
            // name: '第二周',
            data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
            axisLine: {
              style: {
                stroke: '#F6F8FA'
              }
            },
            axisLabel: {
              style: {
                fill: '#F6F8FA'
              }
            },
            axisTick: {
              show: false
            }
          },
          yAxis: {
            // name: '销售额',
            data: 'value',
            splitLine: {
              show: false
            },
            axisLine: {
              style: {
                stroke: '#F6F8FA'
              }
            },
            axisLabel: {
              style: {
                fill: '#F6F8FA'
              }
            },
            axisTick: {
              show: false
            }
          },
          series: [{
            data: [1200, 2230, 1900, 2100, 3500, 4200, 3985],
            type: 'line',
            lineArea: {
              show: true,
              gradient: ['rgba(55, 162, 218, 0.6)', 'rgba(55, 162, 218, 0)']
            },
            label: {
              show: true,
              formatter: '{value}'
            },
            smooth: true,
            lineStyle: {
              lineDash: [5, 5]
            },
            linePoint: {
              radius: 0
            }
          }]
        }
      }
    }
  }
</script>
 
<style lang="less">
  .right4 {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: rgba(6, 30, 93, 0.5);
 
    .chart-name {
      position: absolute;
      left: 10px;
      font-size: 14px;
      top: 10px;
      color: #6BD4E0;
    }
 
    .dv-charts-container {
      //height: calc(~"100% - 40px");
      //padding-top: 35px 10px 10px 10px;
      height: 100%;
      top: 10%;
      left: 4%;
      position: absolute;
    }
  }
</style>