PivotGrid for flat data

2 posts, 0 answers
  1. Robert
    Robert avatar
    39 posts
    Member since:
    Oct 2012

    Posted 01 Aug 2014 Link to this post

    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?
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 05 Aug 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top