Pivot Row Sorting Not Working

Sorting not working for rows in pivot but works for datatable

CODE:

var pivot_dataset = [
{"name": "Argentina", "year": 2005, "continent": "South America", "form": "Republic", "gdp": 181.357, "oil": 1.545, "balance": 4.699},
{"name": "Argentina", "year": 2006.5, "continent": "South America", "form": "Republic", "gdp": 212.507, "oil": 1.732, "balance": 7.167},
{"name": "Argentina", "year": 2006, "continent": "South America", "form": "Republic", "gdp": 260.071, "oil": 2.845, "balance": 6.728},
{"name": "Argentina", "year": 2008, "continent": "South America", "form": "Republic", "gdp": 324.405, "oil": 4.333, "balance": 5.990},
 {"name": "Georgia", "year": 2008, "continent": "Europe", "form": "Republic", "gdp": 12.870, "oil": 0.762, "balance": -2.824},
{"name": "Georgia", "year": 2009, "continent": "Europe", "form": "Republic", "gdp": 10.768, "oil": 0.555, "balance": -1.144},

];



  webix.ready(function(){
        grida = webix.ui({
            container:"webix_pivot_tb_container",
               id:"webix_pivot_tb_container_id",
            view:"pivot",

                    data:pivot_dataset,
                    max: true,
                    structure: {
                    rows: ["form","year"],
                    columns: [],
                    values: [{ name:"oil", operation:["min","sum"]}],
                    filters:[]
                   },
                    scheme:{
                    $sort:{
                          by:"year",
                          dir:"asc",
                          as: "int"
                     }
                    },


        });

    });
Tagged:

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!