Is there a way to make bar rounded on top in echarts? For ex in this example
I was able to found option roundCap for polar but unable to find anything for simple bar chart
Do you want to set 'border-radius'?
var option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
itemStyle: {
emphasis: {
barBorderRadius: [50, 50]
},
normal: {
barBorderRadius: [50, 50, 0 ,0 ]
}
}
}]
};
options = {
xAxis: {
type: 'category',
data: ['June ’22', 'July ’22',]
},
yAxis: {
type: 'value'
},
series: [
{
data: [
{
value: 140,
itemStyle: {
color: '#80CBC4',
barBorderRadius: 5,
},
}, {
value: 250,
itemStyle: {
color: '#CE93D8',
barBorderRadius: 5,
}
}
],
type: 'bar',
barWidth: '40%'
}
]
};
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