Pivot

Hello



is it possible to define for x and for y more than one column?

because the current version is only for one column index:

mygrid.makePivot(‘gridboxP’,{x:0,y:2,value:4,action:0})



We need the possibility for example:

mygrid.makePivot(‘gridboxP’,{x:0|1,y:2|3,value:3,action:0})



Kind Regards

klaus

Unfortunately, nested pivot tables not supported


so would it be possible to make a subgrid with pivot as work around



or isn’t this possible?

It is not possible. Pivot works only with plain tables ( without sub-grids and sub-levels) and can use only one parameter per dimension.

I have troubles with makePivot
if the grid has only 3 columns and
so the pivot selectbox for X axle isn’t preselected??
eg.:
mygrid.makePivot(‘gridboxP’,{x:0,y:1,value:2,action:0});

Another question:
Is it possible to call makePivot on page load or must it be called by user interaction?
Now there come js errors because the grid will not be completely initialized,
if I do this:

mygrid.parse(data,“jsarray”);
mygrid.makePivot(‘gridboxP’,{x:0,y:1,value:2,action:0});

mygrid.makePivot(‘gridboxP’,{x:0,y:1,value:2,action:0});
Problem confirmed and fixed, please contact us directly at support@dhtmlx.com and provide your ref. number - we will send an updated js file.

>>We need the possibility for example:

>>mygrid.makePivot(‘gridboxP’,{x:0|1,y:2|3,value:3,action:0})

Actually this must work , the pivot can be initialized in any moment after data loaded from grid
If problem still occurs - please provide any kind of sample where it can be reconstructed.

Hello

the error still occurs in my JSP
I think that anything will not be completely initialized because
the following javascript line brings an error
gr.style.height=cont.offsetHeight-20+"px"
I have seen that the value of “cont.offsetHeight” is 0,
but only if I call “mygrid.makePivot” directly after the call "mygrid.parse"
My current workaround is the following call:
function doPivot()
{
   mygrid.makePivot(’’,{x:1,y:2,value:3,action:0});
}
setTimeout(“doPivot()”,200);
but I’m not sure that this will also work with big datasets and
the page loading will take longer time.



The problem may occur if you are initializing pivot  table in hidden container ( in such case the container has zero size and grid can’t set correct dimensions )
Also, if you are using complex layout and calling the functionality before it fully rendered ( from not closed table for example ) - the size also can be counted as zero and cause mentioned error.
In both cases problem caused not because of grid state, but because of not fully loaded page.

You can try to use onload event of page as moment for pivot table initialization.


ok, thanks



 



have you already seen that the current version (1.6) doesn’t work well



after a mouseclick into a pivot a js error occurs (online and local)



=> dhtmlx.com/docs/products/dht … 2125907000



Message: this.cell.parentNode is null

This problem already confirmed and fixed, please contact us directly at support@dhtmlx.com - we will send you an updated js file.

ok, thanks

another question about pivot
is there a possibility to increase the performance
because we have big troubles with “big” datasets

for example:
the normal grid has 1000 rows and 5 cols
and the pivot has 100 rows with 30 cols
I must not use the option “smartrendering” because
so not all datarows will be shown in the pivot??

so sometimes the Internet Explorer Task must be killed or
it takes much time for calculating.

Any ideas?

Kind Regards

I must not use the option “smartrendering” because
>>so not all datarows will be shown in the pivot??

To access data related rows must be parsed. So you can’t use smart-rendering and pivot functionality in the same time.

The code of pivot calculation can be optimized, but in any case it will not be fast in case of big datasets , as in your case.
Currently this task has a low priority, so I’m not sure when such update will be available.