echarts标题name如何垂直竖直显示
纯属做笔记 不喜勿喷
var myChart = echarts.init(document.getElementById('dotchart'));
var dtx=[],
dty=[];
var option = {
// title:{
// text: '信号强度',
// width: 1,
// textStyle: {
// color:'#fff'
// },
// },
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
animation: false,
label: {
backgroundColor: '#505765'
},
lineStyle: {
type: 'dashed'
}
}
},
xAxis: {
// type: 'category',
// boundaryGap: false,
axisLine:{
lineStyle:{
color:'rgba(30,130,190,0.7)'
},
},
axisLabel:{
color:'#FFF'
},
// axisTick: {//去掉坐标轴刻线
// show: false
// },
data: dtx
},
yAxis: {
splitLine: {
show: false
},
name:'强\n\n\n\n\n信\n号\n强\n度\n\n\n\n\n弱',
nameLocation:'left',
nameTextStyle:{
color:'#fff',
fontSize:14,
padding:[0,40,-100,0]
},
boundaryGap: [0, '50%'],
splitLine:{show: false},//去除网格线
axisLine:{
lineStyle:{
color:'rgba(30,130,190,0.7)'
},
textStyle: {
color:'#fff'
},
},
axisLabel:{
show:false,
color:'#FFF'
},
axisTick: {//去掉坐标轴刻线
show: false
},
// type: 'value'
},
dataZoom:[
{
backgroundColor:'#FFF'
},
{
type:'inside',
}
],
series: [
{
name:'信号',
type:'line',
smooth:false,
symbol: 'none',
stack: 'a',
data: dty
}
]
};
myChart.setOption(option);