encodle / gflot

Automatically exported from code.google.com/p/gflot
0 stars 0 forks source link

When hovering stacked bars, absolute Y values are passed in DataPoint #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hover a stacked bar chart. If you have three bars stacked on top of each other 
and you hover the top most bar, then the item that is passed to onPlotHover() 
returns an absolute Y value when you call item.getDataPoint.getY(). Instead it 
should (additionally) provide me with the relativ Y value (the height of the 
bar segment).
When adding the DataPoints to the Model I provide the correct Y value, but in 
onPlotHover() I get the Y sum of all segments up to the one I hovered.
This behaviour is not useful as one normally wants to show the value of the 
hovered bar segment.

Original issue reported on code.google.com by wolfgang...@movilitas.com on 12 Jun 2012 at 2:45

GoogleCodeExporter commented 8 years ago
Try this :
item.getSeries().getData().getY( item.getDataIndex() )

Original comment by nmr.morel on 12 Jun 2012 at 8:52

GoogleCodeExporter commented 8 years ago
series.getData() method isn't public.

Original comment by nmr.morel on 14 Jun 2012 at 5:15

GoogleCodeExporter commented 8 years ago

Original comment by nmr.morel on 16 Jun 2012 at 4:30

GoogleCodeExporter commented 8 years ago

Original comment by nmr.morel on 16 Jun 2012 at 4:31