PrevorCZ / flot

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

Graphs without grid border is shifted #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Plot a graph without grid borders

What is the expected output? What do you see instead?
Graph is shifted a few pixel to the right and gets truncated.

What version of the product are you using? On what operating system?
trunk r67

Please provide any additional information below.
Canvas context restore is done at the end of the
if(options.grid.borderWidth) block (in drawGrid) while it should be outside.

Original issue reported on code.google.com by dominiqu...@gmail.com on 12 Aug 2008 at 5:14

GoogleCodeExporter commented 9 years ago
I've done some extra work regarding grid lines and borders in my fork
(github.com/thenduks/flot), as far as I know this doesn't happen. If you can 
repro it
using my fork I'd like to hear about it (preferably with an example :)).

Original comment by ryan.fun...@gmail.com on 12 Aug 2008 at 9:16

GoogleCodeExporter commented 9 years ago
Same issue with your version and same patch applies. I've attached an exemple: 
you
can see that rendered line is actually shifted.

Original comment by dominiqu...@gmail.com on 12 Aug 2008 at 9:42

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The property you're looking for to disable the border entirely is 
showBorder:... but
it doesn't matter because of course it causes the same problem. Please submit 
this as
a bug to the lighthouse issue track for my fork and I'll get on it.

What's really interesting is that it works when I disable it on this graph:
http://ryanfunduk.com/flot/examples/mini-graph.html

I'll give your example a try with some different data sets and options and try 
to
track down the cause.

Thanks.

Original comment by ryan.fun...@gmail.com on 18 Aug 2008 at 3:56

GoogleCodeExporter commented 9 years ago
In your minigraph example, it works because axis are disabled, and then 
setSpacing()
returns an offset of 0. Then, even if ctx is not restore, it doesn't really 
matter.

Original comment by dominiqu...@gmail.com on 18 Aug 2008 at 4:07

GoogleCodeExporter commented 9 years ago
Cool, so if it's the same fix please feel free to submit a patch on the 
lighthouse
tracker. Not sure when I'll get to it.

Thanks.

Original comment by ryan.fun...@gmail.com on 19 Aug 2008 at 6:55

GoogleCodeExporter commented 9 years ago
I just fixed this in another report. I guess I should have read this one first 
since
you already figured it out.

Original comment by olau%iol...@gtempaccount.com on 8 Sep 2008 at 10:07

GoogleCodeExporter commented 9 years ago

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