2

I've been working on adapting the stacked bar chart example (http://bl.ocks.org/mbostock/1134768). The problem I'm having is that there's
always outerpadding. The API lists the outer padding as a 3rd option, but omitting
it or setting it to 0 still leaves some padding. In most cases, it isn't too bad,
but with large data sets it tends to be a huge amount of padding. For all the code
relevant to my issue, you can check the link above. It's not very noticeable in that
example, but the first bar isn't drawn until about 12 pixels (in larger data sets I'm using
this can be at 100 or more pixels); I want it to start at 0 pixels.

Thanks! If you need any more explanation just let me know and I'll do my best.

EDIT: After testing, it appears rangeBands() starts at 0, but I'm still not sure why the rounding
from round bands would round as much as it did. Oh well, I can deal with using rangeBands.

AeroSpartacus
  • 121
  • 2
  • 8
  • The rounding (error) depends on the number of bands. If you have hundreds of bands, it might well be 100 pixels -- it will be at most 0.5 pixels per band. – Lars Kotthoff Jun 20 '13 at 21:31

0 Answers0