pranjal-goswami / multifact-pivottable

A JavaScript plugin for PivotTable.js. It renders multiple aggregations simultaneously with added configurations for rendering beautiful tables http://pranjalgoswami.in/multifact-pivottable/examples/index.html
MIT License
18 stars 13 forks source link

Moving aggregators column names to thead #19

Open uerlings opened 2 years ago

uerlings commented 2 years ago

As a suggestion: Why the aggregators column names (tbody´s 1s row) aren´t at thead> area?

It will make it easy to apply styles, repeating the headers when printing or even making headers sticky on top for screen.

...
        if(opts.table.prependRowTotals){
            renderMeasuredHeadersForTotals();
            renderMeasureHeadersForValues();
        } else {
            renderMeasureHeadersForValues();
            renderMeasuredHeadersForTotals();
        }

//     tbody.appendChild(tr); // change this line with the line below
        thead.appendChild(tr);

...