3

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

Ankur Akvaliya
  • 2,989
  • 4
  • 28
  • 53

1 Answers1

11

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 ]
                }
            }
        }]
    };
多一点点爱
  • 1,333
  • 6
  • 12