How to get cell data from another table and then current widget in icCube

In icCube 6.1 reporting tool, is it possible to retrieve data of type cellValue (rowindex, columnindex) while I am entering a great widget like a chart field and want to get the cell value from another table in the report? with JavaScript widgets ...? and also perform other functions like counting columns or number of rows like I do in JavaScript of an actual table widget ...?

UPDATED QUESTION

Example:

enter image description here

I want to be able to, for example, get in the Expression chart palette to get the number 1 of row and column 2 (value 12) and then for example I want to use that number and see if the number is greater than 10, then I want the color the chart was green and if smaller it was blue ... so I want to know how to get a specific cell from the table when the chart is loaded ... and the graph will wait for a row to be clicked from the table so it will load after the table ... so the rendering problem which you mentioned won't be a problem here.

+3


source to share


1 answer


You can share table data with a global variable.

In the Data entered :

/**
 * Return data object
 */
function(context, data, $box) {
    window.ic3Data = {};
    window.ic3Data.tableContext = context;
    return data;
}

      



Then you can easily use the PublicTableContext API from the table widget in other charts. For example, in color expression for AmChart:

return window.ic3Data.tableContext.cellValue(0,1) > 10 ? 'green' : 'red';

      

+2


source







All Articles