1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > echars 柱状图靠左_echart 柱状图如何让y轴文字靠左显示 series上文字右对齐显示...

echars 柱状图靠左_echart 柱状图如何让y轴文字靠左显示 series上文字右对齐显示...

时间:2024-06-10 14:07:43

相关推荐

echars 柱状图靠左_echart 柱状图如何让y轴文字靠左显示 series上文字右对齐显示...

option = {

title: {

text: '世界人口总量',

subtext: '数据来自网络'

},

tooltip: {

trigger: 'axis',

axisPointer: {

type: 'shadow'

}

},

legend: {

data: ['', '']

},

grid: {

left: '3%',

right: '4%',

bottom: '3%',

containLabel: true

},

xAxis: {

type: 'value',

boundaryGap: [0, 0.01],

splitLine: { // 网格线

show: false

}

},

yAxis: {

type: 'category',

data: ['巴西', '印尼', '美国', '印度', '中国', '世界人口(万)'],

axisLabel: { // y轴文字的配置

show: true,

interval: 0,

textStyle: {

align: 'right',

},

},

},

series: [

{

name: '',

type: 'bar',

data: [18203, 23489, 29034, 104970, 131744, 630230],

label: {

show: true, // 开启显示

position: 'right', // 在上方显示

textStyle: {

fontSize: 15

}

}

},

{

name: '',

type: 'bar',

data: [19325, 23438, 31000, 121594, 134141, 681807],

label: {

show: true, // 开启显示

position: 'right', // 在上方显示

textStyle: {

fontSize: 15

}

}

}

]

};

这种效果的

谢谢。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。