Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Stack plugin handling of duplicate x-axis values within a series #594

Open
dnschnur opened this Issue Sep 28, 2012 · 5 comments

Comments

Projects
None yet
1 participant
Owner

dnschnur commented Sep 28, 2012

Original author: dark.sm...@gmail.com (April 19, 2011 13:41:54)

I'm running into a bug within the stacking plugin. I'm using bar chars and plotting then on the x axis with the time plotter ( xaxis: { mode: "time", timeformat: "%d/%m" } ).

Now the bars stack correctly if they fall on the same day and are in diffrent data sets, but if they are in the same data set they don't stack but instead they overlap.

Won't stack
var d0 = [[1299718800000, 3.0], [1299718800000, 4.30]];

Will stack
var d0 = [[1299718800000, 3.0]];
var d1 = [[1299718800000, 4.30]];

I don't think this the intended behaviour ?

Original issue: http://code.google.com/p/flot/issues/detail?id=515

Owner

dnschnur commented Sep 28, 2012

From olau%iol...@gtempaccount.com on April 19, 2011 13:51:43
Actually it sort of was, or in other words, I don't think I thought that anyone needed two bars on the same x value in the same series - why do you want to put them in the same dataset?

For reference, the stacking plugin also stacks line charts where two values on the same x value sometimes make sense to create a vertical line but where you don't want any self-aware additive effect.

Owner

dnschnur commented Sep 28, 2012

From dark.sm...@gmail.com on April 19, 2011 14:22:50
Well I'm plotting hours per day a user worked, they can add multiple hours per day with comments as to what they did in that period. Anything I can do to fix this ?

Owner

dnschnur commented Sep 28, 2012

From olau%iol...@gtempaccount.com on April 19, 2011 16:29:25
Ah, okay. That makes sense. If I were you, I'd just stack them manually. You can specify the bottom of each of them as the third coordinate I think, and the algorithm should be simple enough as long as you're only dealing with bars.

Owner

dnschnur commented Sep 28, 2012

From dark.sm...@gmail.com on April 20, 2011 12:29:51
Thanks for your quick comments, I've solved the issue with your help ! Though I still think they should stack ;) Now I just have to find a way to make the top pieces a bit more visible.

Owner

dnschnur commented Sep 28, 2012

From dnsch...@gmail.com on June 04, 2012 21:51:09
Turning this into an enhancement for recognizing multiple entries with the same x-axis value within a series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment