Schema
configurationThe schema configuration of the PivotDataSourceV2.
schema
Objectschema.cube
ObjectThe cube declaration. If configured, this option will enable the client cube processing that is useful for binding to flat data.
Only applicable if client cube processing is used. Necessary when binding the Pivot to data of type "odata".
schema.cube.dimensions Object
A set of key/value pairs which specifies the field-dimension mapping that is available for processing dimensions. The key specifies the name of the field to which the dimension will be mapped.
The key has to match the column name that is used in the columns definition.
Example - define the cube dimensions
<script>
var dataSource = new kendo.data.PivotDataSourceV2({
columns: ["ProductName" ],
rows: ["Category"],
data: [{ ProductName: "Chai", UnitPrice: 42, Cateogry: "Beverages" } ],
schema: {
cube: {
dimensions: {
ProductName: { caption: "All Products" },
Category: { caption: "All Cateogries" }
}
}
}
});
dataSource.fetch(function() {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(dataSource.data(), dataSource.axes());
});
</script>
schema.cube.dimensions.dimensionName String
The name of the field which maps to the dimension.
schema.cube.dimensions.dimensionName.caption String
A user-friendly name of the dimension.
schema.cube.measures Object
A set of key/value pairs which specifies the available measures. The key specifies the name of measure.
The key has to match the measure name that is used in the measures definition of the PivotDataSourceV2.