|
|
@ -98,6 +98,19 @@ export default { |
|
|
|
|
|
|
|
initBarChart(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])=>{ |
|
|
|
return key |
|
|
|
} |
|
|
@ -128,7 +141,7 @@ export default { |
|
|
|
xAxis: [ |
|
|
|
{ |
|
|
|
type: 'category', |
|
|
|
data: xValue, |
|
|
|
data: xLable2, |
|
|
|
axisTick: { |
|
|
|
interval: 0, |
|
|
|
alignWithLabel: true |
|
|
@ -150,7 +163,7 @@ export default { |
|
|
|
name: '企业数量', |
|
|
|
type: 'bar', |
|
|
|
barWidth: '60%', |
|
|
|
data: yValue, |
|
|
|
data: yValues2, |
|
|
|
itemStyle: { |
|
|
|
color: '#7c9cd6' |
|
|
|
} |
|
|
|