Schema
configurationThe schema configuration of the PivotDataSource.
schema
Objectschema.axes
Function|StringThe field from the server response which contains the axes data of the columns and rows. Can be set to a function which is called to return the column and row axes data for the response.
—The axes data of the columns and rows from the response.
schema.catalogs
Function|StringThe field from the server response which contains the list of catalogs that are available on the server. Can be set to a function which is called to return the schema information of the catalogs for the response. Executed during the schema discovery.
—The catalogs schema from the response.
schema.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.
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.PivotDataSource({
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 PivotDataSource.
schema.cubes
Function|StringThe field from the server response which contains the list of cubes that are available in the catalog. Can be set to a function which is called to return the schema information of the cubes for the response. Executed during the schema discovery.
—The cubes schema from the response.
schema.data
Function|StringThe field from the server response which contains the data of the cells. Can be set to a function which is called to return the cell data for the response.
—The cell data from the response.
schema.dimensions
Function|StringThe field from the server response which contains the dimensions schema information. Can be set to a function which is called to return the dimensions schema information for the response. Executed during the schema discovery.
—The dimensions schema from the response.
schema.hierarchies
Function|StringThe field from the server response which contains the hierarchies schema information. Can be set to a function which is called to return the hierarchies schema information for the response. Executed during the schema discovery requests.
—The cube hierarchies schema from the response.
schema.levels
Function|StringThe field from the server response which contains the levels schema information. Can be set to a function which is called to return the levels schema information for the response. Executed during the schema discovery.
—The levels schema from the response.
schema.measures
Function|StringThe field from the server response which contains the measures schema information. Can be set to a function which is called to return the measures schema information for the response. Executed during the schema discovery.
—The measures schema from the response.