Search code examples
extjssencha-architectextjs5

How to draw column charts without any space between columns


I have a column chart, but my requirement is to show the columns grouped together without any space in between. How can we achieve that?

I have using EXT JS 5. In EXT JS 4, its working fine with a property groupGutter. But this is not available in EXT JS 5

In EXT JS 4, i can use following reference.http://www.sencha.com/forum/showthread.php?232150-How-to-draw-column-charts-without-any-space-between-columns. but this is not available in EXT JS 5

enter image description here

Is there any alternative solution..?

Thanks in advance.


Solution

  • You can use minGapWidth style to control the distance between bars/columns:

    series: {
        type: 'bar',
        style: {
            minGapWidth: 0
        },
        ...
    }
    

    http://docs.sencha.com/extjs/5.0/apidocs/#!/api/Ext.chart.series.sprite.Bar-cfg-minGapWidth