Maria, thx a lot for answer. You helped me easy solve two of three problem.
But i am still trying to use you answer for second question about date format.
Simple insert your code with simple changes doesnt work for me.
First of all, i doubt about row pivot.config.structure.filterBy == “date” because in my structure row with data in a group by setting. Maybe i should use pivot.config.structure.groupBy == “date”?
Second question - in row
pivot.config.structure.groupBy == “date”
instead of “date” i should use name of field with date?
Third question. in part
return dateFormat(data.id);
return data.id;
what should i set instead of “id”? or nothing must be changed?
Here is my code, maybe it may help
webix.ready(function(){
var dateFormat = webix.Date.dateToStr("%m.%Y");
webix.ui({
container:"chart_div1",
id:"pivot",
view:"pivot-chart",
filterWidth: 1800,
height:420,
width:1150,
structure:{
groupBy: "dat",
values: [{name:"coun", operation:"sum",color:"#66ccff"}],
filters:[{name:"year", type:"select"},{name:"place_name", type:"select"}]
},
chart: {
type:"bar",
label: function(data){
return this.value?this.value(data):"";
},
xAxis: function(data){
if(pivot.config.structure.groupBy == "dat")
return dateFormat(data.id);
return data.id;
},
barWidth:35,
gradient:"falling",
padding: {bottom: 65, left: 90},
legend: {
layout: "x",
align: "center",
valign: "bottom"
}
},
chartMap:{
bar: function(color){
return {
border:0,
alpha:0.9,
gradient:"falling",
radius:5,
color: color
};
}
},
fieldMap:{ "coun" : "Кол-во закупок", "year" : "Год", "place_name" : "ЭТП", "value": "Объем закупок", "dat":"Месяц" },
url: "../php/table_data9.php"+"?inn="+a1+"&kpp="+a2,
});
delete $$("pivot").chartMap.radar;
});