pingjiang / flot

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

Feature request: Splines #226

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What I would love to have:
The ability to set an option that renders lines with spline interpolation.

Thanks for a wonderful library!

Original issue reported on code.google.com by gus...@gmail.com on 27 Sep 2009 at 8:16

GoogleCodeExporter commented 9 years ago
For this to happen, someone has to consider the support in native canvas and in
Excanvas. I'll just mark it as an enhancement for the time being.

Original comment by olau%iol...@gtempaccount.com on 7 Oct 2009 at 6:12

GoogleCodeExporter commented 9 years ago
I extended flot for approximation curves. You can see it here - 
http://dumpz.org/13470/

Original comment by nergal.dev@gmail.com on 20 Oct 2009 at 7:45

GoogleCodeExporter commented 9 years ago
nergal: Can you also post a diff/patch? That way it is easier to see what you 
have
changed. And example or screenshot would be great. :)

I guess this issue is not necessarily about splines, but rather about smoothing 
a
jagged line chart?

Original comment by olau%iol...@gtempaccount.com on 22 Oct 2009 at 1:05

GoogleCodeExporter commented 9 years ago
Yeah, that was my initial meaning, to smooth a curve. Splines is just one way 
to do
that :-)

Original comment by gus...@gmail.com on 22 Oct 2009 at 5:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Here is a diff file - http://dumpz.org/13712/ and here is screenshot - 
http://dl.getdropbox.com/u/556442/jquery.flot.example.png - for this code 
http://dumpz.org/13715/

Original comment by nergal.dev@gmail.com on 27 Oct 2009 at 8:32

GoogleCodeExporter commented 9 years ago
Is this patch being considered for inclusion in the library? It would be a very 
nice
addition.

Original comment by PlasticL...@gmail.com on 4 May 2010 at 7:34

GoogleCodeExporter commented 9 years ago
Sorry but can you reshare code on other hosting? Dumpz not responding now.

Original comment by adWol...@gmail.com on 26 Jul 2010 at 9:14

GoogleCodeExporter commented 9 years ago
Reshared on PasteBin:
http://pastebin.com/Dzk6BHCe - diff
http://pastebin.com/iYYrmLnb - example

Original comment by nergal.dev@gmail.com on 4 Sep 2010 at 9:26

GoogleCodeExporter commented 9 years ago
Would it be possible to have this integrated (or at least the diff file) with 
the current, 0.6 version?

Original comment by francesco.spreafico on 23 Sep 2010 at 9:53

GoogleCodeExporter commented 9 years ago
Sorry for bad response time. It seems like solid work, but I think this needs 
to be done as a plugin rather than inline in the core.

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

GoogleCodeExporter commented 9 years ago
Hi everyone,

I needed the smooth lines for a project at the university and therefore created 
a plugin containing nergal.dev s code and a additional feature to force the 
curves min/max to match the points.

@nergal
before adding the plugin to the plugin section I wanted to ask you if I can use 
your code. I think it should be ok because as far as I understand you posted it 
here for public use, but I would feel better if I get your permission first. 
Hope you are still active.

regards Michael

Original comment by michael....@googlemail.com on 9 May 2011 at 1:09

GoogleCodeExporter commented 9 years ago
Hi nergal,

I posted the link now. If you have any problems with this send me an email to 
michael.zinsmaier (at) web.de and I shut the page down.

regards Michael

Original comment by michael....@googlemail.com on 15 May 2011 at 8:59

GoogleCodeExporter commented 9 years ago
Sorry for bad response time :)

@michael, there is no any restrictions, if you need it you can use it at your 
leisure.

@olau%iol, sorry for such representation - I was need this functionality to fix 
only one specific emergency task

Original comment by nergal.dev@gmail.com on 14 Nov 2011 at 11:09

GoogleCodeExporter commented 9 years ago
@olau%iol, here is a plugin with above patch 
https://github.com/flot/flot/pull/26

Original comment by nergal.dev@gmail.com on 14 Nov 2011 at 1:23

GoogleCodeExporter commented 9 years ago
@nergal, michael

Hi guys,

I have just added the fill functionality to this plugin and am about to put it 
up on my website for public use.

Do you guys have any objections to that ?

Here is the link where it will be up shortly. Please email me at monemihir (at) 
gmail (dot) com and I will remove it from my page.

http://mihirmone.dyndns.org

Cheers,
Mihir

Original comment by monemi...@gmail.com on 16 Nov 2011 at 5:03

GoogleCodeExporter commented 9 years ago
@monemi, there is no any objections. Nice to know that this code has helped to 
someone  :)

Original comment by nergal.dev@gmail.com on 17 Nov 2011 at 1:46

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Nergal, I'm trying to use the curvedLines plugin and it errors out with 
pointsTop is null (see 
https://github.com/MichaelZinsmaier/CurvedLines/issues/9). Since the code is 
coming from here- any idea what might be wrong? I'm lost...
Thanks!

Original comment by cpui...@gmail.com on 29 Mar 2013 at 10:44

GoogleCodeExporter commented 9 years ago
Hi @nergal, michael,

Thank you for this awesome plugin. My Client (who is a lot better at 
mathematics than me) has commented on the graph I have created using flot and 
curved lines:

"It looks like they’re using cubic interpolation which doesn’t preserve 
monotonicity between the points. Have a look at this image (from Wikipedia) 
which shows the difference between a cubic and monotone cubic interpolation - 
notice how the blue line doesn’t “overshoot” the next point on the 
Y-axis."

Can flot or curvedLines to a "monotone cubic interpolation"?

Cheers,

Ryano

Original comment by ryanocon...@adam.com.au on 19 Sep 2014 at 4:30

Attachments:

GoogleCodeExporter commented 9 years ago
thanks for the link, with the latest version hermite splines are the new 
default (-:
however the old implementation will be still accessible because it gives often 
also goodlooking results

Original comment by michael....@googlemail.com on 3 Nov 2014 at 11:22