sunjavagroups / flot

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

plotLine fails on Safari #601

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When I send too many points to a line plot in Safari (more than 10000), my page 
refreshes and then fails to load.
I think the issue is related to the ctx.stroke() failing at the end of the 
function
I patched it by limiting the number of points before a stroke() to be an 
arbitrary amount (a parameter I use to set to 5000) and now it works.
It would be great to have this one, or a better solution, in the official code.

Regards
Ce

Original issue reported on code.google.com by cesco.lu...@gmail.com on 13 Sep 2011 at 1:24

GoogleCodeExporter commented 8 years ago
This is a problem in excanvas as well.  It sounds like Flot should have a 
generalized system of splitting very large lines into smaller ones.

Original comment by dnsch...@gmail.com on 9 May 2012 at 12:34

GoogleCodeExporter commented 8 years ago
Ce, could you explain how you patched the code? I'm having the same problem.

Thanks!
Ruby

Original comment by roobee...@gmail.com on 20 Jun 2012 at 10:26

GoogleCodeExporter commented 8 years ago
Dear Ruby, 
I'm sorry but I'm not a javascript developer so, as far as I can remember, I 
just plugged some code in.
Moreover, I'm not directly using flot anymore (note: flot is great and I 
strongly recommend it, it is just that I am not developing for the web now). 
Anyway, the code addition is about 10 lines, all confined in the 
drawSeriesLines(series) function (the only I used, sorry, I know it sounds 
really lazy). You'll find starting and closing comments like "modified by cesco 
...".
It is just a trivial windowing mechanism and maybe it could be implemented in 
several better ways or just improved by parametrizing the chunk variable and 
extending to other drawing methods. I agree with David but don't look at me for 
such a coding ;)
I attached the complete code for drawSeriesLines so I think you just need to 
copy and paste it over the original one.

Hope this helps
Ce

Original comment by cesco.lu...@gmail.com on 21 Jun 2012 at 8:01

Attachments: