This project has moved. For the latest updates, please go here.

How to set GapWidth for bar chart?

Apr 28 at 10:35 AM
Edited Apr 28 at 10:51 AM
I'm creating histograms with EPPlus (great library, by the way!). I'd like to set the gap between the individual bars to 0%, so that they appear directly side by side, no space between the bars. This is easy inside Excel, but I couldn't find a way to do it with EPPlus.

Wanted: <c:gapWidth val="0"/> in the created xlsx.
Any help?
Apr 28 at 12:35 PM
Edited Apr 28 at 12:35 PM
A well, never mind, after browsing the source of EPPlus I found the right hint:
        var chart = ws.Drawings.AddChart("Histo1", eChartType.ColumnClustered) as ExcelBarChart;
        chart.GapWidth = 0;
I looked for it at the series level. And I missed the cast to ExcelBarChart. Thanks again for this library!