TanTayBui / flot

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

Stack plugin does not clearly explain dataset requirements #661

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I was plugging sets of data into the stack plugin, and was unable to make a 
working stack unless all data sets have all x values filled (at least with 
zeros).

Compare this (all x values filled, even just with zeros):  
http://jsfiddle.net/ryleyb/2B6uq/

To this (all x values filled, using null for values we don't have):
http://jsfiddle.net/ryleyb/2B6uq/1/

To this: (all data sets do not overlap completely in x values):
http://jsfiddle.net/ryleyb/2B6uq/2/

I'm not sure which is correct or which is supposed to work, but if the first 
one is the only correct one, the stack plugin needs to be better documented.  
Right now it just says that your data has to be in correct x order.  I think 
that is insufficient.

Original issue reported on code.google.com by ryl...@gmail.com on 20 Jan 2012 at 8:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Quote:"For line charts, it is assumed that if a line has an
undefined gap (from a null point), then the line above it should have
the same gap - insert zeros instead of "null" if you want another
behaviour. This also holds for the start and end of the chart."

So the stack plugin is documented fine.

But this is bad feature. Хрень. I want to stack over "null" values.
Can somebody fix it?

Original comment by kuzyara...@gmail.com on 25 Feb 2012 at 8:02

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
We're interested in working on this issue, but unsure of which behavior to 
implement. Here's one idea.

Imagine two datasets. d1 = [(1,3),(3,5)] and d2 = [(1,2),(2,7),(3,15),(4,1)]. 
Since d1 is missing x-values at x=2 and 4, we propose to interpolate between 1 
and 3, adding point (2,4) to d1.

But since x = 4 is an edge case, we propose to set that missing point to (4,0).

Essentially, if a missing point is within the dataset's range, we interpolate. 
Otherwise set y to zero.

Is this reasonable behavior?

Thanks,
Derrick & Yael

Original comment by drrc...@gmail.com on 9 Jul 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Hi Derrick & Yael,
well, I'd vote for filling all gaps with ZERO by default.
Your suggestion is a sophisticated one - why not enabling that by an additional 
switch?

Thanks for working on that
Andreas

Original comment by aaapoehl...@gmail.com on 6 Dec 2012 at 9:17