hi,
when i pass parameter to value filter in pivot it is not working
var id="amount";
var cal="sum";
var values="name:id, operation:cal";
var valuesarray=[];
valuesarray.push(values);
webix.ui({
popup:{
width:800, height:600
},
rows:[
{
cols:[
{ view: "list", id: "fields", template: "#text#", width: 200},
{
rows:[
{cols:[
{id: "filters", view: "list"},
{id: "columns", view: "list"}
]},
{cols:[
{id: "rows", view: "list"},
{id: "values", view: "list"}
]}
]
}
]
},
{
id:"pivot",
view:"pivot",
height:400,
readonly: true,
structure: {
rows: ["name"],
columns: ["year"],
values: valuesarray,
filters:[id]
}
}
]
});
$$("pivot").attachEvent("onAfterLoad", setData)
$$("pivot").parse([
{id: "1", name: "USA", amount: 100000, quantity: 130, year:2014, period: 1},
{id: "2", name: "USA", amount: 120000, quantity: 170, year:2014, period: 2},
{id: "3", name: "Europe", amount: 90000, quantity: 120, year:2014, period: 1},
{id: "4", name: "Europe", amount: 150000, quantity: 200, year:2014, period: 2},
{id: "5", name: "USA", amount: 110000, quantity: 80, year:2015, period: 1},
{id: "6", name: "USA", amount: 70000, quantity: 50, year:2015, period: 2},
{id: "7", name: "Europe", amount: 50000, quantity: 70, year:2015, period: 1},
{id: "8", name: "Europe", amount: 80000, quantity: 100, year:2015, period: 2}
]);
function setData(){
var data = $$("pivot").getFields();
$$("fields").parse(data.fields);
}