2 Replies Latest reply: Nov 18, 2014 10:35 AM by Thibaut Lorimier RSS

    Select multiple rows with a javascript extension

      Hi,

       

      I try to filter out values using a javascript extension. I use a javascript plugin called Highcharts which allows you to draw graphs.

      The selectRow () function works well but with only one column (X Axis), my goal is to select multiple values of X Axis (column).

       

      There are no SelectRows functions but there has SelectValuesInColumn (values, final) function, I tested it and I still can not get to filter multiple values.

      One example of the use case I would like to have:

       

      25-06-2014 11-07-16.jpg

      One example of the graph in QlikView

       

      25-06-2014 11-20-04.jpg

      X Axis is "SalesNet".

       

      When an user do a selection on the graph or other use cases, this function below is launch but it works only with one row so one column (x axis)

       

      function searchRowValue(x) {
        var i = 0;
        var boolSearch = true;
        var xtrouve ;
        var indextrouve;
                 
        while (i < _this.ExtData.length && boolSearch)
                      {
                        if(parseFloat(_this.ExtData[i].Dim0)==x)
         {
        xtrouve = _this.ExtData[i].Dim0;
        indextrouve = _this.ExtData[i].Index;
        boolSearch = false;
         }
                      i++;
                      }
      
      
      
        _this.Data.SelectRow(indextrouve);
                       InitData();
                       RenderChart();
                     
                  };
      

       

      Do you have a solution? Or an example?

       

      Thank you in advance to all.