Menu

Retrieve the category from selected point

b3t
2014-03-06
2014-03-07
  • b3t

    b3t - 2014-03-06

    Hi, I'm working with GWT 2.6.0 and GWT Highcharts 1.6.0, and I want retrieve the category from a selected point, but options of selected point are null.

    Here the code:

    private void manageHandlers() {
        super.setSeriesPlotOptions(new SeriesPlotOptions()
                .setPointSelectEventHandler(new PointSelectEventHandler() {
    
                    @Override
                    public boolean onSelect(final PointSelectEvent event) {
                        Point point = event.getPoint();
                        JSONObject options = point.getOptions();
                        System.out.println("Options: " + options); // NULL
                        // JSONValue category = options.get("category");
                        // System.out.println("Category: " + category);
    
                        return true;
                    }
                })
                .setAllowPointSelect(true)
        );
    }
    

    Is there a workaround for that?
    Thanks

     
  • Shawn Quinn

    Shawn Quinn - 2014-03-06

    You may want to take a look at "Point.setUserData()" and "Point.getUserData()" for this kind of thing.

     
  • b3t

    b3t - 2014-03-07

    Resolved.
    @Shawn thank you very much!

     

Log in to post a comment.