TanTayBui / flot

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

stacking symbols on top of each other #703

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have 5 different arrays of data points being plotted as just points on the 
graph.  All 5 are supposed to show up with a different symbol (using the 
symbols plugin) but instead its drawing all points as all symbols stacked on 
top of each other even though each series specifically states its own 
individual symbol to draw with.

Here's a summary of how the data looks in the DOM (as viewed in firebug's DOM 
inspector)

0
    Object { points={...}, data=[1]}

data
    [[1338466306000, 12.1833333333333]]

0
    [1338466306000, 12.1833333333333]

points
    Object { symbol="circle"}

1
    Object { points={...}, data=[7]}

data
    [[1338466306000, 12.1833333333333], [1337729756000, 23.5833333333333], [1338380166000, 12.2666666666667], 4 more...]

points
    Object { symbol="square"}

2
    Object { points={...}, data=[22]}

data
    [[1338466306000, 12.1833333333333], [1337729756000, 23.5833333333333], [1338380166000, 12.2666666666667], 19 more...]

points
    Object { symbol="triangle"}

3
    Object { points={...}, data=[41]}

data
    [[1338466306000, 12.1833333333333], [1337729756000, 23.5833333333333], [1338380166000, 12.2666666666667], 38 more...]

points
    Object { symbol="diamond"}

4
    Object { points={...}, data=[41]}

data
    [[1338466306000, 12.1833333333333], [1337729756000, 23.5833333333333], [1338380166000, 12.2666666666667], 38 more...]

points
    Object { symbol="cross"}

Original issue reported on code.google.com by j...@ezsoftwareinc.com on 12 Jun 2012 at 8:57

Attachments:

GoogleCodeExporter commented 9 years ago
It's difficult to see what's going on from the DOM inspector output, but it 
looks as though most of your series share the same datapoints, i.e. 
[1338466306000, 12.1833333333333].  Is that the case?  If so, wouldn't you 
expect multiple symbols at that point?

Otherwise, please pare it down into a simpler example, and post the code used 
to create the plot.

Original comment by dnsch...@gmail.com on 13 Jun 2012 at 1:30

GoogleCodeExporter commented 9 years ago
I see what I did now... you're correct its a mistake on my end, forgot to clear 
the array I was storing the datapoints in between each series so instead of 
creating a new series each time, it was creating a new series with more the old 
datapoints from the old series in there as well...

I feel stupid, sorry for bothering you, thanks for the 2nd pair of eyes though, 
I was going insane with this.

Original comment by j...@ezsoftwareinc.com on 13 Jun 2012 at 2:36

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 13 Jun 2012 at 2:38