squid icon indicating copy to clipboard operation
squid copied to clipboard

Cannot fit

Open Dysp opened this issue 9 years ago • 4 comments

Hi there. I am a total newb to Ruby and coding in general, but I have been messing around with a script which will pull data from Excel and create a graph (among others) and output it to a PDF. Finally I got it to work and it produced a graph and output it to a PDF. So, to test it further I wanted to make some data more representative of the data I will work with in the future and here I am stuck. This is beyond my skills. Way beyond. When the graph exceeds ~40 data points, Prawn produces an error:

https://gist.github.com/Dysp/8e0b6a88eafb69d0c927

I'll be working with waaay larger data sets and I simply need to produce a line-graph that represents this data.

How do I address this issue? I am sorry if I am just not capable and it is easily fixable, but I don't know where to go for help but here.

Dysp avatar Mar 25 '16 18:03 Dysp

Hello and thanks for using Squid.

I never tested with so many data points, so I can't be sure, but from your error log looks like the *text *cannot fit into the PDF.

I would try again play around with options like legend: false or baseline: false or any option that deals with text from http://fullscreen.github.io/squid/

Let me know if that solves the issue!

On Fri, Mar 25, 2016 at 11:05 AM, Dysp [email protected] wrote:

Hi there. I am a total newb to Ruby and coding in general, but I have been messing around with a script which will pull data from Excel and create a graph (among others) and output it to a PDF. Finally I got it to work and it produced a graph and output it to a PDF. So, to test it further I wanted to make some data more representative of the data I will work with in the future and here I am stuck. This is beyond my skills. Way beyond. When the graph exceeds ~40 data points, Prawn produces an error:

https://gist.github.com/Dysp/8e0b6a88eafb69d0c927

I'll be working with waaay larger data sets and I simply need to produce a line-graph that represents this data.

How do I address this issue? I am sorry if I am just not capable and it is easily fixable, but I don't know where to go for help but here.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/Fullscreen/squid/issues/50

Claudio Baccigalupo | Manager, Software Engineering | Fullscreen, Inc. http://www.fullscreen.com

claudiofullscreen avatar Mar 25 '16 18:03 claudiofullscreen

I actually tried it with a few of the options, but it didn't work. However if I put baseline: false, then it works beautifully. I even tested it a little further and went to 2880 datapoints and it still worked.

Thank you so much!

Dysp avatar Mar 25 '16 18:03 Dysp

Did any of you guys find a fix to make this work with baseline: true? I want to show the category names at the bottom, maybe rotated 90 degrees so those can fit. I've been playing with the options but nothing seems to be working.

haseebelahi avatar Nov 30 '18 07:11 haseebelahi

https://github.com/Fullscreen/squid/blob/master/lib/squid/plotter.rb#L126 we might be able to set this disable_wrap_by_char: true as false

kangkyu avatar May 21 '19 01:05 kangkyu