Search results

Grouping in Vue Pivot Table component

14 Oct 2021 / 13 minutes to read

This feature is applicable only for the relational data source.

Grouping is the most-useful feature in pivot table and the component automatically groups date, time, number and string. For example, the date type can be formatted and displayed based on year, quarter, month, and more. Likewise, the number type can be grouped range-wise, such as 1-5, 6-10, etc. These group fields will act as individual fields and allows users to drag them between different axes such as columns, rows, values, and filters and create pivot table at runtime.

The grouping can be enabled by setting the allowGrouping property to true property in the pivot table. To perform the grouping action via UI, right click on the pivot table’s row or column header, select ”Group”, a dialog will appear in which fill the appropriate options to group the data. To ungroup,right click on the pivot table’s row or column header, select ”Ungroup“.

To use calculated field option, you need to inject the Grouping module in pivot table. The following are the three different types of grouping:

  • Number Grouping
  • Date Grouping
  • Custom Grouping

Similar to Excel, only one type of grouping can be applied for a field.

Source
Preview
app.vue
datasource.js
Copied to clipboard
<template>
<div id="app">
    <ejs-pivotview :dataSourceSettings="dataSourceSettings" :height="height" :showGroupingBar="showGroupingBar" :allowGrouping="allowGrouping"> </ejs-pivotview>
</div>
</template>

<script>
import Vue from "vue";
import { PivotViewPlugin, GroupingBar, Grouping } from "@syncfusion/ej2-vue-pivotview";
import { Group_Data } from './datasource.js';

Vue.use(PivotViewPlugin);

export default {
  data () {
return {
  dataSourceSettings: {
    dataSource: Group_Data,
    expandAll: false,
    enableSorting: true,
    formatSettings: [{ name: 'Amount', format: 'C' }, { name: 'Product_ID', format: 'N0' },
    { name: 'Date', type: 'date', format: 'dd/MM/yyyy-hh:mm a' }],
    rows: [{ name: 'Date', caption: 'Date' }],
    columns: [{ name: 'Product_ID', caption: 'Product ID' },
    { name: 'Products', caption: 'Products' }],
    values: [{ name: 'Sold', caption: 'Unit Sold' },
    { name: 'Amount', caption: 'Sold Amount' }],
    filters: []
  },
  height: 350,
  showGroupingBar: true,
  allowGrouping: true
}
  },
  provide: {
    pivotview: [GroupingBar, Grouping]
}
}
</script>
<style>
@import "@syncfusion/ej2-vue-pivotview/styles/material.css";
</style>


{% endraw %}
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });

    var gData = [
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2016 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2016 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2017 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2017 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2017 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2018 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2018 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        }
    ];
    
    exports.Group_Data = getGroupData(gData);
    function getGroupData(data) {
        var date;
        var products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
        var amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2];
        for (var ln = 0, lt = data.length; ln < lt; ln++) {
            date = new Date(data[ln].Date.toString());
            data[ln].Date = date.toString();
            data[ln].Products = products[data[ln].Product_ID - 1000];
            data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
            data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
        }
        return data;
    }
});

Number Grouping

Number grouping allows users to organize data, which is in number format into different ranges, such as 1-5, 6-10, etc. Number grouping can be configured via UI, by right-clicking on the number based header in the pivot table.

Source
Preview
app.vue
datasource.js
Copied to clipboard
<template>
<div id="app">
    <ejs-pivotview :dataSourceSettings="dataSourceSettings" :height="height" :showGroupingBar="showGroupingBar" :allowGrouping="allowGrouping"> </ejs-pivotview>
</div>
</template>

<script>
import Vue from "vue";
import { PivotViewPlugin, GroupingBar, Grouping } from "@syncfusion/ej2-vue-pivotview";
import { Group_Data } from './datasource.js';

Vue.use(PivotViewPlugin);

export default {
  data () {
return {
  dataSourceSettings: {
    dataSource: Group_Data,
    expandAll: false,
    enableSorting: true,
    formatSettings: [{ name: 'Amount', format: 'C' }, { name: 'Product_ID', format: 'N0' }],
    rows: [{ name: 'Product_ID', caption: 'Product ID' }],
    columns: [{ name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Unit Sold' },
    { name: 'Amount', caption: 'Sold Amount' }],
    filters: []
  },
  height: 350,
  showGroupingBar: true,
  allowGrouping: true
}
  },
  provide: {
    pivotview: [GroupingBar, Grouping]
}
}
</script>
<style>
@import "@syncfusion/ej2-vue-pivotview/styles/material.css";
</style>


{% endraw %}
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });

    var gData = [
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2016 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2016 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2017 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2017 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2017 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2018 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2018 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        }
    ];
    
    exports.Group_Data = getGroupData(gData);
    function getGroupData(data) {
        var date;
        var products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
        var amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2];
        for (var ln = 0, lt = data.length; ln < lt; ln++) {
            date = new Date(data[ln].Date.toString());
            data[ln].Date = date.toString();
            data[ln].Products = products[data[ln].Product_ID - 1000];
            data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
            data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
        }
        return data;
    }
});

output

Range selection

The ”Starting at” and ”Ending at” options are used to set the number range depending on which the headers will be grouped. For example, if the “Product_ID” field holds the number from “1001” to “1010” and the user chooses to group the number range by setting ”1004” to ”Starting at” and ”1008” to ”Ending at” options on their own. Then the specified number range will be used for number grouping and the rest will be grouped as ”Out of Range“.

output

Range interval

The ”Interval by” option is used to separate the selected number data type field into range-wise such as 1-5, 6-10, etc. For example, if the user wants to display the “ProductID” data field with a group interval of ”2” by setting the ”Interval by” option on their own. The “ProductID” field will then be grouped by the specified range of intervals, such as ”1004-1005”, ”1006-1007“,etc.

output
output

Number grouping can also be configured using the groupSettings property through code-behind. The properties required are:

  • name: Allows user to set the field name.
  • rangeInterval: Allows user to set the interval between two numbers.
  • startingAt: Allows user to set the starting number.
  • endingAt: Allows user to set the ending number.
  • type: Allows user to set the group type. For number grouping, Number is set.

If starting and ending numbers specified in startingAt and endingAt properties are in-between the number range, then rest of the numbers will be grouped and placed in “Out of Range” section introduced specific to this feature.

Source
Preview
app.vue
datasource.js
Copied to clipboard
<template>
<div id="app">
    <ejs-pivotview :dataSourceSettings="dataSourceSettings" :height="height" :showGroupingBar="showGroupingBar" :allowGrouping="allowGrouping"> </ejs-pivotview>
</div>
</template>

<script>
import Vue from "vue";
import { PivotViewPlugin, GroupingBar, Grouping } from "@syncfusion/ej2-vue-pivotview";
import { Group_Data } from './datasource.js';

Vue.use(PivotViewPlugin);

export default {
  data () {
return {
  dataSourceSettings: {
    dataSource: Group_Data,
    expandAll: false,
    enableSorting: true,
    formatSettings: [{ name: 'Amount', format: 'C' }, { name: 'Product_ID', format: 'N0' }],
    rows: [{ name: 'Product_ID', caption: 'Product ID' }],
    columns: [{ name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Unit Sold' },
    { name: 'Amount', caption: 'Sold Amount' }],
    filters: [],
    groupSettings: [{ name: 'Product_ID', type: 'Number', rangeInterval: 2, startingAt: 1004, endingAt: 1008 }]
  },
  height: 350,
  showGroupingBar: true,
  allowGrouping: true
}
  },
  provide: {
    pivotview: [GroupingBar, Grouping]
}
}
</script>
<style>
@import "@syncfusion/ej2-vue-pivotview/styles/material.css";
</style>


{% endraw %}
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });

    var gData = [
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2016 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2016 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2017 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2017 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2017 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2018 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2018 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        }
    ];
    
    exports.Group_Data = getGroupData(gData);
    function getGroupData(data) {
        var date;
        var products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
        var amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2];
        for (var ln = 0, lt = data.length; ln < lt; ln++) {
            date = new Date(data[ln].Date.toString());
            data[ln].Date = date.toString();
            data[ln].Products = products[data[ln].Product_ID - 1000];
            data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
            data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
        }
        return data;
    }
});

output

Ungrouping the existing number groups

By right-clicking the appropriate header and selecting ”Ungroup” from the context menu in the pivot table component, users can ungroup the applied number grouping.

output

Date Grouping

Date grouping allows users to organize data, which is in date format into different sections such as years, quarters, months, days, hours, minutes, and seconds. Date grouping can be configured via UI, by right-clicking on the date and time based header in the pivot table.

Source
Preview
app.vue
datasource.js
Copied to clipboard
<template>
<div id="app">
    <ejs-pivotview :dataSourceSettings="dataSourceSettings" :height="height" :showGroupingBar="showGroupingBar" :allowGrouping="allowGrouping"> </ejs-pivotview>
</div>
</template>

<script>
import Vue from "vue";
import { PivotViewPlugin, GroupingBar, Grouping } from "@syncfusion/ej2-vue-pivotview";
import { Group_Data } from './datasource.js';

Vue.use(PivotViewPlugin);

export default {
  data () {
return {
  dataSourceSettings: {
    dataSource: Group_Data,
    expandAll: false,
    enableSorting: true,
    formatSettings: [{ name: 'Amount', format: 'C' }, { name: 'Date', type: 'date', format: 'dd/MM/yyyy-hh:mm a' }],
    rows: [{ name: 'Date' }],
    columns: [{ name: 'Product_Categories', caption: 'Product Categories' }],
    values: [{ name: 'Sold', caption: 'Unit Sold' },
    { name: 'Amount', caption: 'Sold Amount' }],
    filters: [{ name: 'Products' }, { name: 'Product_ID', caption: 'Product ID' }]
  },
  height: 350,
  showGroupingBar: true,
  allowGrouping: true
}
  },
  provide: {
    pivotview: [GroupingBar, Grouping]
}
}
</script>
<style>
@import "@syncfusion/ej2-vue-pivotview/styles/material.css";
</style>


{% endraw %}
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });

    var gData = [
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2016 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2016 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2017 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2017 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2017 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2018 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2018 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        }
    ];
    
    exports.Group_Data = getGroupData(gData);
    function getGroupData(data) {
        var date;
        var products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
        var amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2];
        for (var ln = 0, lt = data.length; ln < lt; ln++) {
            date = new Date(data[ln].Date.toString());
            data[ln].Date = date.toString();
            data[ln].Products = products[data[ln].Product_ID - 1000];
            data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
            data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
        }
        return data;
    }
});

output

Range selection

The ”Starting at” and ”Ending at” options are used to set the date range depending on which the headers will be grouped. For example, if the “Date” field holds the date from “01/01/2015” to “02/12/2018” and the user chooses to group the date range by setting ”01/07/2015” to ”Starting at” and ”31/07/2017” to ”Ending at” options on their own. Then the specified date range will be used for date grouping and the rest will be considered as ”Out of Range“.

output

Group interval

The ”Interval by” option is used to separate the selected date fields into years, quarters, months, days, hours, minutes and seconds. For example, if the user wants to display the “Date” field with group intervals as ”Years” and ”Months” by selecting the ”Interval by” option on their own. The “Date” field will then be separated by the specified group intervals and created as two new fields, namely ”Years (Date)” which holds the date years and ”Months (Date)” which holds the date months. Such fields can be used for report manipulations in the pivot table at runtime.

When none of the Interval by options are chosen, the OK button in the dialog will be disabled, meaning that at least one interval option should be selected in order to apply the date grouping.

output
output
output

Date grouping can also be configured using the groupSettings property through code-behind. The properties required are:

  • name: Allows user to set the field name.
  • type: Allows user to set the group type. For date grouping, Date is set.
  • startingAt: Allows user to set starting date.
  • endingAt: Allows user to set ending date.
  • groupInterval: Allows user to set interval in year, quarter, month, day, hour, minute, or second pattern.

From the date format “YYYY-DD-MM HH:MM:SS”, if user wants to display only year and month, then the groupInterval property should be set with Years and Months alone. Also, user can shuffle the order of year, quarter, month, day, hour, minute, or second based on their requirement and display the same in the pivot table.

Source
Preview
app.vue
datasource.js
Copied to clipboard
<template>
<div id="app">
    <ejs-pivotview :dataSourceSettings="dataSourceSettings" :height="height" :showGroupingBar="showGroupingBar" :allowGrouping="allowGrouping"> </ejs-pivotview>
</div>
</template>

<script>
import Vue from "vue";
import { PivotViewPlugin, GroupingBar, Grouping } from "@syncfusion/ej2-vue-pivotview";
import { Group_Data } from './datasource.js';

Vue.use(PivotViewPlugin);

export default {
  data () {
return {
  dataSourceSettings: {
    dataSource: Group_Data,
    expandAll: false,
    enableSorting: true,
    formatSettings: [{ name: 'Amount', format: 'C' }, { name: 'Date', type: 'date', format: 'dd/MM/yyyy-hh:mm a' }],
    rows: [{ name: 'Date' }],
    columns: [{ name: 'Product_Categories', caption: 'Product Categories' }],
    values: [{ name: 'Sold', caption: 'Unit Sold' },
    { name: 'Amount', caption: 'Sold Amount' }],
    filters: [{ name: 'Products' }, { name: 'Product_ID', caption: 'Product ID' }],
    groupSettings: [{ name: 'Date', type: 'Date', groupInterval: ['Years', 'Months'], startingAt: new Date(2015, 6, 1), endingAt: new Date(2017, 6, 31) }]
  },
  height: 350,
  showGroupingBar: true,
  allowGrouping: true
}
  },
  provide: {
    pivotview: [GroupingBar, Grouping]
}
}
</script>
<style>
@import "@syncfusion/ej2-vue-pivotview/styles/material.css";
</style>


{% endraw %}
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });

    var gData = [
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2016 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2016 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2017 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2017 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2017 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2018 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2018 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        }
    ];
    
    exports.Group_Data = getGroupData(gData);
    function getGroupData(data) {
        var date;
        var products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
        var amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2];
        for (var ln = 0, lt = data.length; ln < lt; ln++) {
            date = new Date(data[ln].Date.toString());
            data[ln].Date = date.toString();
            data[ln].Products = products[data[ln].Product_ID - 1000];
            data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
            data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
        }
        return data;
    }
});

output

Ungrouping the existing date groups

By right-clicking the appropriate header and selecting ”Ungroup” from the context menu in the pivot table component, users can ungroup the applied date grouping.

output

Custom Grouping

Custom grouping can group any data type, such as date, time, number and string, into a custom field based on the user’s needs. It can be configured via the UI by right-clicking on any header in the pivot table.

Source
Preview
app.vue
datasource.js
Copied to clipboard
<template>
<div id="app">
    <ejs-pivotview :dataSourceSettings="dataSourceSettings" :height="height" :showGroupingBar="showGroupingBar" :allowGrouping="allowGrouping"> </ejs-pivotview>
</div>
</template>

<script>
import Vue from "vue";
import { PivotViewPlugin, GroupingBar, Grouping } from "@syncfusion/ej2-vue-pivotview";
import { Group_Data } from './datasource.js';

Vue.use(PivotViewPlugin);

export default {
  data () {
return {
  dataSourceSettings: {
    dataSource: Group_Data,
    expandAll: false,
    enableSorting: true,
    formatSettings: [{ name: 'Amount', format: 'C' }, { name: 'Product_ID', format: 'N0' }],
    columns: [{ name: 'Product_ID', caption: 'Product ID' }],
    rows: [{ name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Unit Sold' },
    { name: 'Amount', caption: 'Sold Amount' }],
    filters: []
  },
  height: 350,
  showGroupingBar: true,
  allowGrouping: true
}
  },
  provide: {
    pivotview: [GroupingBar, Grouping]
}
}
</script>
<style>
@import "@syncfusion/ej2-vue-pivotview/styles/material.css";
</style>


{% endraw %}
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });

    var gData = [
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2015 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2015 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2015 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2015 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2016 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2016 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2016 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2016 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2016 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2016 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 5
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '2/19/2016 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '3/20/2016 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '3/23/2016 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 1
        },
        {
            'Date': '3/06/2016 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '5/04/2016 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/11/2016 21:45:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 4
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 5
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '6/17/2016 07:09:27 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '7/1/2016 03:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '7/2/2016 05:47:38 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 4
        },
        {
            'Date': '9/8/2016 11:50:17 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '12/2/2016 16:05:33 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 5
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 1
        },
        {
            'Date': '1/1/2017 20:18:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 3
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 4
        },
        {
            'Date': '1/5/2017 20:19:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 8
        },
        {
            'Date': '2/2/2017 10:22:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 1
        },
        {
            'Date': '2/10/2017 10:23:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 6
        },
        {
            'Date': '2/20/2017 11:25:07 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 8
        },
        {
            'Date': '3/07/2017 05:11:50 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '3/13/2017 05:11:55 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 2
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '9/1/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 2
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 10
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1009,
            'Sold': 3
        },
        {
            'Date': '9/05/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 2
        },
        {
            'Date': '9/12/2017 04:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 3
        },
        {
            'Date': '9/25/2017 04:15:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 2
        },
        {
            'Date': '9/29/2017 05:14:43 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1008,
            'Sold': 7
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 4
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 3
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1003,
            'Sold': 2
        },
        {
            'Date': '10/3/2017 18:11:47 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/3/2018 17:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1
        },
        {
            'Date': '1/4/2018 15:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/5/2018 17:30:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '1/8/2018 07:26:11 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '1/10/2018 17:26:25 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1007,
            'Sold': 7
        },
        {
            'Date': '2/11/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 3
        },
        {
            'Date': '2/12/2018 19:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1001,
            'Sold': 2
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 5
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 1
        },
        {
            'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1006,
            'Sold': 1
        },
        {
            'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Clothings',
            'Product_ID': 1010,
            'Sold': 5
        },
        {
            'Date': '3/23/2018 05:33:12 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Accessories',
            'Product_ID': 1002,
            'Sold': 4
        },
        {
            'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1005,
            'Sold': 1
        },
        {
            'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)',
            'Product_Categories': 'Bikes',
            'Product_ID': 1004,
            'Sold': 1