defines data fields
webix.ui({
view: "pivot",
predicates: {
date: webix.Date.dateToStr(webix.i18n.dateFormat),
},
fields: [
{ id: "client", value: "client", type: "text" },
{ id: "date", value: "date", type: "date", predicate: "date" },
{ id: "statistics", value: "statistics", type: "number" },
],
});
The property allows specifying data fields manually. Each object can include the following fields:
The prepare function accepts a raw value (e.g. "2007") and makes it digestible for further processing by the predicate setting. Thus the "2007" can be transformed into JS date (Mon Jan Jan 01 2007 00:00:00).
The predicate field in its turn will format the transformed value according to the predicates set in the predicates object in the configuration.
Note that if the fields property is not set, fields will be automatically generated based on the incoming data.