Browse Source

分数排序。

master
wuxu 1 month ago
parent
commit
b1681711e9
  1. 17
      jwtech-pc-page/src/views/home/components/statisticsLeft.vue

17
jwtech-pc-page/src/views/home/components/statisticsLeft.vue

@ -98,6 +98,19 @@ export default {
initBarChart(data) { initBarChart(data) {
const entries = Object.entries(data); const entries = Object.entries(data);
let xLable2 =["60-69分","70-79分","80-89分","90-99分","100+"];
let yValues2=[];
xLable2.forEach((item) => {
yValues2.push(data[item]);
});
console.log(xLable2,'yyyyyyy')
console.log(yValues2,'yyyyy2222yy')
let xValue=entries.map(([key, value])=>{ let xValue=entries.map(([key, value])=>{
return key return key
} }
@ -128,7 +141,7 @@ export default {
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: xValue, data: xLable2,
axisTick: { axisTick: {
interval: 0, interval: 0,
alignWithLabel: true alignWithLabel: true
@ -150,7 +163,7 @@ export default {
name: '企业数量', name: '企业数量',
type: 'bar', type: 'bar',
barWidth: '60%', barWidth: '60%',
data: yValue, data: yValues2,
itemStyle: { itemStyle: {
color: '#7c9cd6' color: '#7c9cd6'
} }

Loading…
Cancel
Save