Treetable

Hi,

I want to build a treetable and before starting I’d like to solve some questions:
The treetable will be grouped into several layers.

  1. What’s the best data structure for treetable?
    Flat-table or pivot-table?

  2. How to aggregate the different layers? Layer 1 must be the sum of all Layer 2 - Layer 2 must be the sum of all Layer 3…

  3. Is there any drill-down and bottom-up aggregation for numeric data, when editing cells?

Thank’s

So…
Is it possible to get this structure from flat-table with grouping-method?
data: [
{ “id”:“1”, “value”:“The Shawshank Redemption”, “open”:true, “data”:[
{ “id”:“1.1”, “value”:“Part 1”, “chapter”:“alpha”},
{ “id”:“1.2”, “value”:“Part 2”, “chapter”:“beta”, “open”:true, “data”:[
{ “id”:“1.2.1”, “value”:“Part 1”, “chapter”:“beta-twin”},
{ “id”:“1.2.2”, “value”:“Part 1”, “chapter”:“beta-twin”}
]},
{ “id”:“1.3”, “value”:“Part 3”, “chapter”:“gamma” }
]},
{ “id”:“2”, “value”:“The Godfather”, “data”:[
{ “id”:“2.1”, “value”:“Part 1”, “chapter”:“alpha” },
{ “id”:“2.2”, “value”:“Part 2”, “chapter”:“beta” }
]}
]

http://docs.webix.com/samples/15_datatable/30_treetable/01_init.html

  1. Pivot also receives a flat structure and then groups the data according to the defined configuration. The same way flat data can be loaded into the treetable and grouped as you need.

  2. Here’s a related topic. Initially, data can be aggregated through the grouping function.

  3. Current math does not support such features by default, but it’s possible to add custom data aggregation, such as http://webix.com/snippet/685a9367