Bug in Pivot Column Header Sorting?

Hi there

In your Pivot sample 01_init/08_sorted_header, if I add multiple value columns when the header is sorted, the value columns do not fall in the same order for each item.

To reproduce the issue, use this structure in the sample code:

structure:{
rows: [“year”],
columns: [{id:“form”,sort:“string”}, {id:“continent”,sort:“string”}],
values: [
{name:“balance”, operation:“sum”},
{name:“gdp”, operation:“sum”},
]
}

You will notice that for each item, the gdp (sum) & balance (sum) will be in random order.

Is this fixable?

Thanks

Hi,

Header sorting is about columns order, not rows order (“Australia”, “Europe”, “North America” - the order is correct). Rows order depends on items in datasource. And anyway, it is possible to sort table rows only by values of one column, not by all of them. Please check my previous reply:

http://forum.webix.com/discussion/6015/pivot-table-default-row-order#latest

Hi, I’m not referring to the rows, I’m referring to the calculation columns (the ‘values’ field columns) end up in random order rather than sequential.

Hi,

Could provide a picture that shows what you mean ? The issue is not clear enough.

Hi,

If you look at this image: http://mystagingsite.com.au/sample.png

You will see Africa, the value calculation columns are in the order of gdp (sum), balance (sum) while the Asia value calculation colums are in the order of balance (sum), gdp (sum).

The value calculation columns aren’t maintaining the same order in the table.