Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.Dim0)==x)

   {

  xtrouve = _this.ExtData.Dim0;

  indextrouve = _this.ExtData.Index;

  boolSearch = false;

   }

                i++;

                }

  _this.Data.SelectRow(indextrouve);

                 InitData();

                 RenderChart();

              

            };

Do you have a solution? Or an example?

Thank you in advance to all.

2 Replies
Not applicable
Author

Hi Alexis,

did you find a solution for this?

I currently strugle with the same problem.

Thank you in advance!

tlorimier
Partner - Contributor III
Partner - Contributor III

Hi,

What do you want to filter on your graph ?

This method : SelectValuesInColumn allow you to filter in the dimension of your extension.

For example you have a graph with : Client as dimension and Sum(Sales) as Expression.

With SelectValuesInColumn you can only filter Client (because it's the only dimension inside your extension).

After you need to get all your value at once and call SelectValuesInColumn with your parameter. All the value must be in an array when you call SelectValuesInColumn. I usually use SelectTextInColumn

Hope this help.