nullscreen / squid

A Ruby library to plot charts in PDF files
http://nullscreen.github.io/squid/
MIT License
220 stars 42 forks source link

Categories text overlap on overflow #47

Open rovr opened 8 years ago

rovr commented 8 years ago

Hi,

Thanks for the cool lib!

Is there a reason for 'leading: -3' option here?

It results in text overlap on overflow:

example
claudiofullscreen commented 8 years ago

Hello and thanks for stopping by!

That was a personal decision: I wanted the labels to be closer to the horizontal axis.

I also experienced your issue, and for that reason I added the option every: 2 so not every bar gets a label.

Try playing around with the every parameter and see what it looks like.

If your labels overflow on a second row, you might have "too many" labels and the every option might improve the legibility of your graph.

screen shot 2016-02-25 at 7 41 25 am
rovr commented 8 years ago

Hi @claudiofullscreen

Thanks for a quick response! every works in this case, but I have some other graphs with user-supplied label texts of variable length, so I can't guarantee some of them won't overflow even if I space them out. Would be nice to have an option to change the leading attribute.