-
Notifications
You must be signed in to change notification settings - Fork 19.8k
[Feature] 横向柱状图能否设置左侧起点从10开始 #18914
Copy link
Copy link
Closed
Description
What problem does this feature solve?
我有一个横向柱状图,它有一个背景边框,但是目前无法配置柱状图和左侧边框间的间距,有什么办法可以设置吗?
我的option 如下:
option = {
xAxis: {
type: 'value',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
type: 'category',
show:false,
},
series: [
{
name:'bar',
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
barWidth:10,
itemStyle: {
borderRadius: 5,
},
},
{
name:'bg',
data: [200, 200, 200, 200, 200, 200, 200],
type: 'bar',
barWidth:15,
barGap: '-125%',
itemStyle: {
borderRadius: 5,
color:'rgba(0,0,0,0)',
borderColor:'green'
},
z:-1
}
]
};在线示例如下:
https://codepen.io/zhili124/pen/XWyYgWE

想达到的效果是蓝色柱子和绿色边框的左侧有一定的间距
What does the proposed API look like?
比如bar可以设置offset:[10,10],或者其他可以实现的方法
Reactions are currently unavailable