这是一次考试全班考生的成绩。我希望给出每个每个考生的成绩得出各个层次考生的数量。如图0-20分1人,20-40分4人。有没有现成的方法呢?
配置项如下
option = {
color: ['#3398DB'],
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [{
type: 'category',
axisLabel: {
interval: 0,
},
data: ['0-20', '20-40', '40-60', '60-80', '80-100']
}],
yAxis: [{
type: 'value'
}],
series: [{
name: '人数',
type: 'bar',
barWidth: '100%',
data: [1, 4, 5, 8, 6]
/*
data:[18,23,25,30,37,40,46,48,53,59,60,68,69,70,73,74,77,84,88,89,91,94,100]
*/
}]
};