miunsi63 / gflot

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

PlotItem getDataIndex() method always null. Should be "dataIndex" rather than "dataindex"? #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the code snippet:-

PlotHoverListener hoverListener = new PlotHoverListener() {
            public void onPlotHover(Plot plot, PlotPosition position, PlotItem item) {
                Window.alert(""+item.getDataIndex());
            }
        };

        plot.addHoverListener(hoverListener , true);

I'm expecting to be alerted with the index of the item in the series. Instead I 
always get null. I'm using the true attribute of addHoverListener() so I should 
be only being told about events where points are hovered over.

I'm using gflot 1.0.0 on Windows.

I think the problem might be that the underlying property in PlotItem for flot 
should be "dataIndex" and not "dataindex" as in 
ca.nanometrics.gflot.client.PlotItem. This is according to 
http://flot.googlecode.com/svn/trunk/API.txt .

Can you please fix it? Also, if you can provide some build instructions for how 
I can create my own version of gflot that would be very useful. I can then help 
to improve the project.

Original issue reported on code.google.com by chris.me...@gmail.com on 23 Feb 2011 at 3:03

GoogleCodeExporter commented 9 years ago
Verified the fix. Updated file attached.

Original comment by chris.me...@gmail.com on 23 Feb 2011 at 4:39

Attachments:

GoogleCodeExporter commented 9 years ago
I have maven working now but maybe some trivial instructions would be good for 
those who don't know how?

Original comment by chris.me...@gmail.com on 23 Feb 2011 at 4:40

GoogleCodeExporter commented 9 years ago

Original comment by nmr.morel on 3 Jan 2012 at 9:55

GoogleCodeExporter commented 9 years ago

Original comment by nmr.morel on 3 Jan 2012 at 9:55