echarts Y axis label having vertical text
echarts, jquery
Solution
To insert the label on the y axis in vertical position, you should included the following suboptions in the yAxis option:
Code example:
.......
yAxis : [
{
type : 'value',
axisLabel : {
formatter: '{value} °C'
},
name: 'Y-Axis',
nameLocation: 'middle',
nameGap: 50
}
],
.......
where the nameLocation: 'middle' option will position the label vertically; And the nameGap: 50 option, indicates the separation with the axisLabel tags.
Attached a screenshot with the result
Problem
All I'm trying to make charts using e charts library read the documentation and find lots of example over internet too but unable to find how to write label in y-axis with vertical text. As per the docs where it might be write is axisLabel : {} object but still not sure. Just want a simple text in vertical at y-axis