4

Is there a way to reduce gap between BARS in a bar chart made using Echarts. I tried the option barCategoryGap as mentioned in the docs but it had no effect.

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',
        barWidth: 50,
        barCategoryGap: '10%'
    }]
};

Any idea what is wrong here?

Peter
  • 10,492
  • 21
  • 82
  • 132
  • try to remove 'barWidth', and try to set 1% to see the difference – Karl Sep 10 '19 at 13:57
  • @Karl but I would like to control the bar width as well, removing it makes EChart control it. I don't want that mate. – Peter Sep 12 '19 at 03:16

0 Answers0