nicolaskruchten / pivottable

Open-source Javascript Pivot Table (aka Pivot Grid, Pivot Chart, Cross-Tab) implementation with drag'n'drop.
https://pivottable.js.org/
MIT License
4.35k stars 1.08k forks source link

Flat table view is available? #1299

Open donriga opened 2 years ago

donriga commented 2 years ago

It is possible to view the display flat table?

nicolaskruchten commented 2 years ago

If you mean a view without rowspans and colspans, there is no renderer that does this, but it shouldn't be too hard to modify the table renderer to do it :)

donriga commented 2 years ago

No.

Column1 | Column 2| Column 3
Value1 | Value 2 | Value 3
Value1 | Value 2 | Value 3
Value1 | Value 2 | Value 3

Instead

Column1 |                    | 
                | Column 2. |
                |                   | Column 3
nicolaskruchten commented 2 years ago

I'm afraid I don't understand what you're looking for...

donriga commented 2 years ago

How to get this table for PivotUI?

html-styling-tables-example

nicolaskruchten commented 2 years ago

Ah I see. You can get this type of output if the leftmost attribute is unique per record.

donriga commented 2 years ago

May be make it and option with no ID?

nicolaskruchten commented 2 years ago

The purpose of this library is aggregation of data, and it looks like the display you're looking for is an unaggregated one, so it feels pretty out-of-scope to add such an option...

donriga commented 2 years ago

New library?) https://github.com/nicolaskruchten/flattable

rdstern commented 1 year ago

I am adding to this discussion, because we have just added RPivotTable to our software - one of the free front-ends to R - and have been very happy with it, in its current form. And that includes showing the "flat table".

@nicolaskruchten you say above: The purpose of this library is aggregation of data, and it looks like the display you're looking for is an unaggregated one

I'd like to change that statement to The main purpose of this library is aggregation of data, but it can easily be used for unaggregated data if you wish.

Here is a simple survey example we use for our teaching: This is the spreadsheet view:

image

And here are the same data in your pivot table:

image

To me the unusual feature of the flat view, is not aggregation but that a pivot table usually looks at a single response variable. We encourage that this should start with the primary data, because then the data can more easily be studied in a 2-way table: Here is an example:

image

Then we take the field number away to get a more usual summary table:

image

All nice and pleasingly fast for my usuall data sets of daily climatic data with maybe 50,000 records. So many thanks.