gmmoraesbr / flot

Automatically exported from code.google.com/p/flot
0 stars 0 forks source link

Documentation hint for eliminating canvas margin #271

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I found that occasionally, I want a graph to go to the absolute edge of the 
container element.  
Nothing in the documentation clearly stated how to do it (unless I missed it?).

After digging in the code, I discovered that the plotOffset is responsible for 
this.  It's value is 
calculated in the function setGridSpacing().

It would be nice somewhere in the documentation (perhaps the Grid section?) if 
it was stated that, 
to eliminate all whitespace around the graph, you'd need to set the following 
options to zero:

options.grid.borderWidth
series.points.radius
series.points.lineWidth

Original issue reported on code.google.com by a...@mikitik.com on 7 Dec 2009 at 7:57

GoogleCodeExporter commented 8 years ago
I believe this is the only way to do this. However in case you want to have one 
of
those options set to a non-zero value, is there anyway we can do this writing a 
plugin?

Original comment by myma...@gmail.com on 11 Feb 2010 at 7:59

GoogleCodeExporter commented 8 years ago
Regarding plugin, I don't think so right now. If you are interested in looking 
into it, I'm happy to review a patch. You risk cutting off some stuff in the 
graph though. If one of you could explain why you want to do it, I'd be 
interested in hearing it.

Original comment by olau%iol...@gtempaccount.com on 11 Mar 2011 at 12:43

GoogleCodeExporter commented 8 years ago
There's a suggestion on a simple extension in issue 188.

Original comment by olau%iol...@gtempaccount.com on 15 Mar 2011 at 5:37

GoogleCodeExporter commented 8 years ago

Original comment by dnsch...@gmail.com on 7 May 2012 at 11:29