鸿蒙智能电子锁前端项目
whychdw
2024-12-18 45b4ff5c0b824d2e5b51a6af3c44076d05f0214d
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
<template>
  <div
      class="e-chart-root"
      :class="{ 'full-screen': fullScreenFlag }"
      @click="handleClick"
      @dblclick="fullScreen">
    <div class="e-chart-container">
      <div class="e-chart" ref="chart"></div>
      <slot name="tools"></slot>
    </div>
    <div class="export-chart-wrapper">
      <div class="export-chart" ref="exportChart"></div>
    </div>
  </div>
</template>
 
<script>
import { defineComponent } from 'vue';
import './theme/transparent.js';
import base from './mixins/base.js';
 
export default defineComponent({
  mixins: [base],
  data() {
    return {};
  },
  mounted() {
    this.initChart();
  },
  methods: {
    initChart() {
      this.setOption({
        xAxis: {
          type: 'category',
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
          type: 'value',
          axisLine: {
            show: true
          }
        },
        series: [
          {
            data: [150, 230, 224, 218, 135, 147, 260],
            type: 'line'
          }
        ]
      });
    }
  }
});
</script>