3
votes

In icCube reporting tool 6.1 is there a possibility to retrieve data like a cellValue(rowindex,columnindex) while i'm in a diffrent widget like chart box for example and wanna get a cell value from different table in the report? with Widget's JavaScript...? and also do other functions like column count or row count as i'm in the Widget's JavaScript of the actual table...?

UPDATED QUESTION

Example:

enter image description here

i wanna be able for example to get in the chart palette by Expression to retrieve the number of the 1 row and column 2 (value 12) and then for the example i wanna use this number and see if the number is greater then 10 then i will want the chart color to be Green and if less the blue... so i wanna know how to retrieve a specific cell from the table when the chart loads... and the chart will wait for a click on row from the table so it will load after the table... so the rendering problem you've mentioned you have won't be a problem here.

1
I'm not sure icCube 6.2 has such interface... Could you please describe needed functionality more precisely? Should this data be dynamic or static?Artem Lopatiy
on top, we've a problem of rendering order. Is the table already loaded when this js is executed ?ic3
yes the table is already loadedItay Regev
@ArtemLopatiy I've hone the questionItay Regev

1 Answers

2
votes

You can share Table's data with global variable.

In On Data Received hook:

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

Then you can easily use PublicTableContext API from table widget in other charts. For example in a coloring expression for an AmChart:

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