浏览代码

修改所有雷达图

dev
douzhuo 3 年前
父节点
当前提交
2a4e6201b9
共有 2 个文件被更改,包括 16 次插入1 次删除
  1. +1
    -1
      pages/center/Piabodata/Groupcontrast.vue
  2. +15
    -0
      pages/center/Piabodata/Theteamcompared.vue

+ 1
- 1
pages/center/Piabodata/Groupcontrast.vue 查看文件

@@ -424,7 +424,7 @@
allobj.categories.push(item1.name) allobj.categories.push(item1.name)
} }
obj.data.push(item1.avgExecutionRate) obj.data.push(item1.avgExecutionRate)
if (max < item.avgExecutionRate) max = item.avgExecutionRate;
if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
}) })
allobj.series.push(obj) allobj.series.push(obj)
}) })


+ 15
- 0
pages/center/Piabodata/Theteamcompared.vue 查看文件

@@ -219,6 +219,7 @@
<view class="uchaserbox"> <view class="uchaserbox">
<qiun-data-charts <qiun-data-charts
type="radar" type="radar"
:opts="opts"
:chartData="chartData1" :chartData="chartData1"
:canvas2d="true" :canvas2d="true"
canvasId="wangxiaohuaerlingeryilingwuyib88" canvasId="wangxiaohuaerlingeryilingwuyib88"
@@ -442,6 +443,15 @@
"data": [90,110,165,195,187,172] "data": [90,110,165,195,187,172]
} }
] ]
},
opts: {
fontSize: 10,
extra: {
radar: {
max: ''
}
}
} }
}; };
@@ -942,6 +952,7 @@
categories:[], categories:[],
series:[] series:[]
} }
let max = 0;
// 当选择全部时 // 当选择全部时
if(!this.staff1.value&&!this.staff2.value){ if(!this.staff1.value&&!this.staff2.value){
// let first=res.first // let first=res.first
@@ -955,6 +966,7 @@
allobj.categories.push(item1.name) allobj.categories.push(item1.name)
} }
obj.data.push(item1.avgExecutionRate) obj.data.push(item1.avgExecutionRate)
if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
}) })
allobj.series.push(obj) allobj.series.push(obj)
}) })
@@ -971,6 +983,7 @@
allobj.categories.push(item1.name) allobj.categories.push(item1.name)
} }
obj.data.push(item1.avgExecutionRate) obj.data.push(item1.avgExecutionRate)
if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
}) })
allobj.series.push(obj) allobj.series.push(obj)
}) })
@@ -1001,10 +1014,12 @@
allobj.categories.push(item1.name) allobj.categories.push(item1.name)
} }
obj.data.push(item1.avgExecutionRate) obj.data.push(item1.avgExecutionRate)
if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
}) })
allobj.series.push(obj) allobj.series.push(obj)
}) })
} }
this.opts.extra.radar.max = max +25
// console.log(allobj) // console.log(allobj)
this.chartData1=allobj this.chartData1=allobj
this.$forceUpdate() this.$forceUpdate()


正在加载...
取消
保存