Re: Skip empty bars when drawing
Robin Becker <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Dimitri, looking at your chart it seems as though you would like to drop space when some or all bars in a category are missing. Clearly if all bars are missing for a category then you can just drop the category; I don't believe we allow categories to vary in width. So if there are normally four bars in a group you will always get the same four bar width for the category even if only three bars are present. Your could reduce wasted space by using a stacking bar chart eg setting the categoryAxis.style = 'stacked'. That way each category only gets on bar width. It should be possible to make a category axis behave in the way you want, but we haven't done it yet :( On 12/11/2019 19:19, Dimitri Vasilkov wrote: > Hello, > > I am using reportlab to create a bar graph of downloads, where the category > is the download name and each bar is the number of downloads for a > particular format. If a particular format has not been downloaded, it has a > corresponding value of None. Since there are a lot of download formats that > have no downloads and some that have several, there are big gaps between > the bars as you can see in this image: > ........ ....... -- Robin Becker