
How can I place the axis label on the circled blank. I try many methods and couldn't achive it. Did anyone good at echarts tell me how to do?
Here is the offical example: echarts bar
You can use series.label with a formatter to achieve this.
The series label is associated to a specific series and can be placed anywhere (position [0,0] being the top-left of the bar of that series). The formatter will allow you to display the series name in that label instead of the default value.
Of course, you have to put that label on only one series (otherwise it'll be displayed above each bar of the same 'category'). You'll also have to hide yAxis label. See full code here.
From your example :
yAxis: {
type: 'category',
data: ['Brazil', 'Indonesia', 'USA', 'India', 'China', 'World'],
axisLabel: {
show: false //hide yAxis label
}
},
series: [
{
name: '2011',
type: 'bar',
data: [18203, 23489, 29034, 104970, 131744, 630230],
label: {
show: true,
position: [5,-15], //put the label where you want
formatter: function(params){
return params.name //display series name
}
}
},
]

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With