Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
felisberto_joao
Contributor III
Contributor III

Extension for pivot table

hello,

I´m using enterprise edition.

I´m Trying to create a extension to change the css layout of pivot table. The problem is that the table look like a straight in spite of looking like a pivot table:

teste1.png

But I want it to look like this (using aggregations):

teste2.png

 

I have seen the JS Pivottable and others but the code is too much modified and return errors. I just one the core function of the pivot table and change only the CSS.

paint: function ( $element, layout ) {

var html = "<table><thead><tr>", self = this,

morebutton = false,

hypercube = layout.qHyperCube,

rowcount = hypercube.qDataPages[0].qMatrix.length,

colcount = hypercube.qDimensionInfo.length + hypercube.qMeasureInfo.length;

hypercube.qMode = 'P';


//render titles

hypercube.qDimensionInfo.forEach( function ( cell ) {

html += '<th>' + cell.qFallbackTitle + '</th>';

} );

hypercube.qMeasureInfo.forEach( function ( cell ) {

html += '<th>' + cell.qFallbackTitle + '</th>';

} );

html += "</tr></thead><tbody>";

//render data

html += createRows( hypercube.qDataPages[0].qMatrix, hypercube.qDimensionInfo );

html += "</tbody></table>";

//add 'more...' button

if ( hypercube.qSize.qcy > rowcount ) {

html += "<button class='more'>Mais...</button>";

morebutton = true;

}

$element.html( html );

Thanks,

Felisberto

0 Replies