13 Replies Latest reply: Jun 4, 2007 11:48 PM by 577627 RSS

    How to get to the underlying data element for a Graph ClickEvent?

    Lucas Jellema
      I have created a StackedBarChart, added a ClickListener, created a ClickListener method and succeeded in reading the Series and Group of the element I have clicked:
          public void ClickListener(ClickEvent clickEvent) {
              DataComponentHandle dch = (DataComponentHandle)clickEvent.getComponentHandle();
              ComponentInfo ci = dch.getComponentInfo();
              /* I can use
                 dch.getGroup();   
                 dch.getRow();
                 dch.getSeries();
                 dch.getColumn();       
             */

              UIGraph b = (UIGraph)clickEvent.getSource();
              // is this a path with any chance of success?? b.getDataModel().getDataAccess().getValue()
              DataModel c = b.getDataModel();
              QDR v;
              // I have tried:
                  v = b.getGraphDataModel().getDataAccess().getValueQDR(0,0,0);
             // but it did not seem to get me the/any data.
      What I have not been able to find out is how to get to actual values for the Dimensions and the Measure. I can get to the QDR - but it does not seem to help.

      Can anyone tell how I can extract the data of the clicked element from the ClickEvent? I can use the value to synchronize for example a second chart or some other data element.

      thanks!

      Lucas