Search code examples
dojox.charting

ClusteredColumns : Gap between clustered bars


I have created a Dojo Clustered Columns chart. JSFIDDLE example

What I want to achieve is to have gap between the clustered columns. So all coke products are clustered together, but say I want some gap between these columns(There is already gap between coke and meat by applying attribute gap: 10. What I want is a small gap between the clustered column itself)

How can I achieve this ?


Solution

  • Okay I found the trick to do it. After analyzing this example , it occurred to me, to create a gap between stacked column themselves, I just need to make the boundary of the chart as the same color of the background.

    My background was white, so I added the following code in my series

    addSeries("Upmarket", [3,5,5],{stroke: {color:"white"}, fill: "#A31A7E"})
    

    Default width is 1. You can control the width of stroke by adding the width property

    addSeries("Upmarket", [3,5,5],{stroke: {color:"white", width : "4"}, fill: "#A31A7E"})
    

    JSFIDDLE UPDATED EXAMLE