echats中y轴x轴是类目轴怎么写最大值最小值
如图
var myChart6 = echarts.init(document.getElementById('myChart6'));
option6 = {
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'line' // 默认为直线,可选为:'line' | 'shadow'
},
formatter: function (params) {
var tar;
if (params[1].value != '-') {
tar = params[1];
}
else {
tar = params[0];
}
return tar.name + '<br/>' + tar.seriesName + ' : ' + tar.value;
}
},
legend: {
x:"right",
y:"top",
padding:[0,25,0,0],
data:['信用等级MIN-信用等级MAX'],
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
axisTick: {
show: false
},
axisLine:{
lineStyle:{
color:'#b0b0b0'
}
},
type : 'category',
splitLine: {show:false},
data : [2015,2016,2017,2018,2019]
},
yAxis: {
axisTick: {
show: false
},
axisLine:{
lineStyle:{
color:'#b0b0b0'
}
},
type : 'category',
splitLine :{
show:true,
lineStyle:{
type:'dashed',
color: ['#aaa', '#ddd']
}
},
data:['C','CC','CCC','B','BB','BBB','A','AA','AAA']
},
series: [
{
name: '信用等级MIN-信用等级MAX',
type: 'bar',
stack: '总量',
barWidth : 12,
itemStyle:{
emphasis: {
// 圆角边框
barBorderRadius: 7
},
normal:{
// 圆角边框
barBorderRadius: 7,
color:'#87bbf5'
}
},
label: {
normal: {
show: false,
position: 'top'
}
},
data:['AA','AAA','BB','CC','BBB'],
// data:[8, 9, 7, 4, 8],
},
{
name: '信用等级MIN',
type: 'bar',
stack: '总量',
itemStyle: {
normal: {
barBorderColor: 'rgba(0,0,0,0)',
color: 'rgba(0,0,0,0)'
},
emphasis: {
barBorderColor: 'rgba(0,0,0,0)',
color: 'rgba(0,0,0,0)'
}
},
// 隐藏辅助
data:['A','BB','B','B','C'],
// data:[1,4,5,3,1,3],
},
]
};
myChart6.setOption(option6);