liu.haichuan 1 месяц назад
Родитель
Сommit
93bf9ef437

+ 8 - 3
pages/deviceDetails/weatherStation/eleDetail.vue

@@ -197,7 +197,12 @@ export default {
     initChart() {
       const ctx = uni.createCanvasContext("temperatureChart", this);
       const currentEle = this.eleTabs[this.eleActive];
-
+      console.log(currentEle, 'currentEle')
+      currentEle.data.forEach(item => {
+        if (item.value === '/') {
+          item.value = '0'
+        }
+      })
       const series = [
         {
           name: currentEle.name,
@@ -221,7 +226,7 @@ export default {
         type: "line",
         context: ctx,
         width: 340,
-        height: 200,
+        height: 180,
         categories: xData,
         series: series,
         legend: {
@@ -255,7 +260,7 @@ export default {
         dataLabel: false,
         extra: {
           line: {
-            type: "straight",
+            type: "curve",
             width: 2,
             activeType: "hollow",
           },

+ 1 - 1
pages/deviceDetails/weatherStation/index.vue

@@ -75,7 +75,7 @@
           <view class="card-title">{{ item.factorName }}</view>
           <view class="data-value-row">
             <view>
-              <text class="data-value">{{ item.yData[0] }}</text>
+              <text v-if="item.yData && item.yData.length" class="data-value">{{ item.yData[0] }}</text>
               <text class="data-unit">{{ item.factorUnit }}</text>
             </view>
             <image