Browse Source

[完善] echarts图表完善

master
陈鹏飞 5 years ago
parent
commit
ad7d3303eb
  1. 11
      src/app/ui/eharts-statistics/eharts-statistics.component.ts

11
src/app/ui/eharts-statistics/eharts-statistics.component.ts

@ -135,7 +135,7 @@ export class EhartsStatisticsComponent implements OnInit {
let catalogs = [] //学习目标
let counts = [] //统计次数
let newData = data.sort( function (a,b) {
return a.count - b.count
return b.count - a.count
} )
newData.forEach(element => {
postNames.push(element.postName)
@ -167,22 +167,27 @@ export class EhartsStatisticsComponent implements OnInit {
boundaryGap: [0, 0.01]
},
yAxis: {
inverse: true,
"axisLine":{ //y轴
"show":false
},
"axisTick":{ //y轴刻度线
"show":false
"show":false,
},
"splitLine": { //网格线
"show": false
},
type: 'category',
data: postNames
data: postNames,
max: function (value) {
return 100/postNames.length;
},
},
series: [
{
type: 'bar',
data: counts,
barMaxWidth: 40, // 最大宽度
itemStyle:{
normal:{
color:'#40B4E8',

Loading…
Cancel
Save