Stacked Bar Graph doesn't work over a time series
Opened this issue · 6 comments
Repro case: http://jsfiddle.net/u2Wje/4/
If you set bars: { show: false }
then you can see line graphs with the expected data, but setting show:true
does not show the expected bars.
Am I doing something wrong? I modeled it very closely after this example.
For comparison purposes, instead of setting bars: show: false
, you can also turn off time mode for the x-axis and change the x-axis data values to integers, and you get the desired stacked bar graph. Here's a fiddle for that: http://jsfiddle.net/3fCpW/2/
Hi atuttle,
I'm using flotr for stacked bar graphs with time series.
See example on http://jsfiddle.net/LFFt2/
@gadeynebram Your fiddle has a bug (missing a comma before labelsAngle
), but I would say it is not equivalent to my use case.
I see that you're using a time series (x-axis mode time
), but your x-axis data is not time data, it's still integers. I'm interested in plotting things against an actual timeline: volume of thing a, thing b, thing c, on a certain day. Your x-axis labels are "0:00:00.1" etc, which is ultimately unhelpful for what I'm trying to do.
I suppose I could hack it so that I know x=1 corresponds to a certain day and use custom functions to render axis labels and hover tooltips, but I'd still like to see this bug fixed.
@atuttle managed to get this working by using timeUnit: 'second'
and setting the data with .getTime() / 1000
. It's a hack but then I have working stacked bars with nice time scaling. Seems stacked bars doesn't do well with large numbers...
Eh, I just switched to nvd3. Looks better, more interactive, and doesn't have this issue. It's also easier to code the graphs.
The only good news from this bug is mentioning nvd3. I will probably switch also..