Closed adamalbrecht closed 7 years ago
Hi Adam, thanks for the feedback. For now I was mainly working on line and chart graphs. I agree option 1. sounds to me the right way to go. I think in addition to moving left we should then also scale the height accordingly. Maybe we could introduce option 3 as well for all kinds of graphs such that a very long legend doesnt force the graph to become too small.
@adamalbrecht can you please try if the beta version works for you? (gem install svg-graph --pre) currently I implemented option 1. I realized that it was only a minor change (using @graph_width
instead of width
. Some other refactoring / doc update is ongoing, see History.txt (Note some stuff is broken in the beta - not crashing, but the scale is wrong, e.g. Plot and the :scale_integers
option )
Fixed in 2.0.2
Sorry I didn't get a chance to try this out until now - yes this seems to works great!
Thanks!
First of all, I just wanted to say thanks to @lumean for putting some effort into this gem recently. This is really the only decent ruby graphing library I have found, but it could still use some work. And I'm happy to contribute, as well, because I've been depending on it lately.
Anyway, here is my issue: Often, when I use a key and the labels are somewhat long, they get covered by the pie graph. For example:
There are a few ways this could be fixed or partially fixed:
x_offset
or something similar to specify the distance from the left so that the pie could be left-aligned(width - diameter) / 2
.Let me know what you think and I'm happy to contribute a pull request. Thanks!