Explorar o código

修改首页图片大小

“yueshang” %!s(int64=2) %!d(string=hai) anos
pai
achega
fca45b312c
Modificáronse 1 ficheiros con 8 adicións e 5 borrados
  1. 8 5
      src/views/dashboard/twinChart.vue

+ 8 - 5
src/views/dashboard/twinChart.vue

@@ -1,7 +1,7 @@
 
 <template>
   <div>
-    <!-- ${wheight}px -->
+     <!-- ${wheight} -->
     <div ref="chart" :style="`width: 100%; height:600px; margin: 20px`"></div>
   </div>
 </template>
@@ -58,11 +58,14 @@ export default {
       ];
       // 初始化图表,并绑定在之前创建的div元素上
       this.chart = echarts.init(this.$refs.chart);
-      //   const data = [{ bluetooth: 32, name: "高新体育中心", wifi: 23 },{ bluetooth: 12, name: "高新体育中心", wifi: 33 },{ bluetooth: 8, name: "高新体育中心", wifi: 3 },];
+        const data = [{ bluetooth: 32, name: "高新体育中心", wifi: 23 },{ bluetooth: 12, name: "高新体育中心", wifi: 33 },{ bluetooth: 8, name: "高新体育中心", wifi: 3 },];
       // 提取x轴数据和蓝牙、wifi数据
-      const xAxisData = this.rightData.map((item) => item.name);
-      const bluetoothData = this.rightData.map((item) => item.bluetooth);
-      const wifiData = this.rightData.map((item) => item.wifi);
+      const xAxisData = data.map((item) => item.name);
+      const bluetoothData = data.map((item) => item.bluetooth);
+      const wifiData = data.map((item) => item.wifi);
+    //   const xAxisData = this.rightData.map((item) => item.name);
+    //   const bluetoothData = this.rightData.map((item) => item.bluetooth);
+    //   const wifiData = this.rightData.map((item) => item.wifi);
       // 设置图表的配置项
       this.option = {
         title: {