This is a migrated thread and some comments may be shown as answers.

PivotGrid for flat data

1 Answer 168 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 01 Aug 2014, 07:06 PM
I'm trying to use the PivotGrid to display flat data (no sums, measures, etcetera). The field names need to appear on the left column and the data (rows) are added as columns:

e.g.:
Date                     8/1     8/2     8/3     8/4     8/5     8/6
Temperature       72      73      74      72      68      70
Humidity              72%   64%  65%   66%  64%  65%
Precipitation       0.1     0.1     0.2     0.1     0.1     0.2

A previous discussion thread suggested that the PivotGrid will handle this type of display.

The data will be flat and simple:
e.g.:
var forecast = [
    { Date: "8/1", Temperature: "72", Humidity: "72%", Precipitation: "0.1" },
    { Date: "8/2", Temperature: "73", Humidity: "64%", Precipitation: "0.1" },
    ...
];


The question is: how should the datasource be written? What would the schema, columns, rows, and measures be?

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 05 Aug 2014, 07:30 AM
Hello Robert,

You will need to set the schema.cube configuration option that should be configured when using flat data. More details can be found on the following link:

http://docs.telerik.com/kendo-ui/api/framework/pivotdatasource#configuration-schema.cube

I have also prepared a simple example without measures used, that you can use a starting point for your project:

http://dojo.telerik.com/UCiB

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
PivotGrid
Asked by
Robert
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or