Skip to content

Commit 908735f

Browse files
Merge pull request #460 from Syncfusion-Content/hotfix/hotfix-v26.1.35
DOCINFRA-2341_merged_using_automation
2 parents aac73a7 + bf882ed commit 908735f

File tree

98 files changed

+2966
-51768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

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

ej2-react/code-snippet/pivot-table/default-cs146/app/datasource.tsx

Lines changed: 22 additions & 6367 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
let gData = [
2+
{ 'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1001, 'Sold': 2 },
3+
{ 'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 3 },
4+
{ 'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1003, 'Sold': 3 },
5+
{ 'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 4 },
6+
{ 'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 1 },
7+
{ 'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 6 },
8+
{ 'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 8 },
9+
{ 'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1001, 'Sold': 4 },
10+
{ 'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 2 },
11+
{ 'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1004, 'Sold': 1 },
12+
{ 'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 2 },
13+
{ 'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1006, 'Sold': 1 },
14+
{ 'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 5 },
15+
{ 'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1004, 'Sold': 1 },
16+
{ 'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 1 },
17+
{ 'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 2 },
18+
{ 'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1003, 'Sold': 4 },
19+
{ 'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 2 },
20+
{ 'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1007, 'Sold': 5 },
21+
{ 'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1008, 'Sold': 2 },
22+
{ 'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 1 },
23+
];
24+
export let Group_Data = getGroupData(gData);
25+
function getGroupData(data) {
26+
let date;
27+
let products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
28+
let amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2]
29+
for (let ln = 0, lt = data.length; ln < lt; ln++) {
30+
date = new Date(data[ln].Date.toString());
31+
data[ln].Date = date.toString();
32+
data[ln].Products = products[data[ln].Product_ID - 1000];
33+
data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
34+
data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
35+
}
36+
return data;
37+
}

ej2-react/code-snippet/pivot-table/default-cs147/app/datasource.tsx

Lines changed: 22 additions & 6367 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
let gData = [
2+
{ 'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1001, 'Sold': 2 },
3+
{ 'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 3 },
4+
{ 'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1003, 'Sold': 3 },
5+
{ 'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 4 },
6+
{ 'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 1 },
7+
{ 'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 6 },
8+
{ 'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 8 },
9+
{ 'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1001, 'Sold': 4 },
10+
{ 'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 2 },
11+
{ 'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1004, 'Sold': 1 },
12+
{ 'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 2 },
13+
{ 'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1006, 'Sold': 1 },
14+
{ 'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 5 },
15+
{ 'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1004, 'Sold': 1 },
16+
{ 'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 1 },
17+
{ 'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 2 },
18+
{ 'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1003, 'Sold': 4 },
19+
{ 'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 2 },
20+
{ 'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1007, 'Sold': 5 },
21+
{ 'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1008, 'Sold': 2 },
22+
{ 'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 1 },
23+
];
24+
export let Group_Data = getGroupData(gData);
25+
function getGroupData(data) {
26+
let date;
27+
let products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
28+
let amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2]
29+
for (let ln = 0, lt = data.length; ln < lt; ln++) {
30+
date = new Date(data[ln].Date.toString());
31+
data[ln].Date = date.toString();
32+
data[ln].Products = products[data[ln].Product_ID - 1000];
33+
data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
34+
data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
35+
}
36+
return data;
37+
}

ej2-react/code-snippet/pivot-table/default-cs148/app/datasource.tsx

Lines changed: 22 additions & 6367 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
let gData = [
2+
{ 'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1001, 'Sold': 2 },
3+
{ 'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 3 },
4+
{ 'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1003, 'Sold': 3 },
5+
{ 'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 4 },
6+
{ 'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 1 },
7+
{ 'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 6 },
8+
{ 'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 8 },
9+
{ 'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1001, 'Sold': 4 },
10+
{ 'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 2 },
11+
{ 'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1004, 'Sold': 1 },
12+
{ 'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 2 },
13+
{ 'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1006, 'Sold': 1 },
14+
{ 'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 5 },
15+
{ 'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1004, 'Sold': 1 },
16+
{ 'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 1 },
17+
{ 'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 2 },
18+
{ 'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1003, 'Sold': 4 },
19+
{ 'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 2 },
20+
{ 'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1007, 'Sold': 5 },
21+
{ 'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1008, 'Sold': 2 },
22+
{ 'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 1 },
23+
];
24+
export let Group_Data = getGroupData(gData);
25+
function getGroupData(data) {
26+
let date;
27+
let products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
28+
let amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2]
29+
for (let ln = 0, lt = data.length; ln < lt; ln++) {
30+
date = new Date(data[ln].Date.toString());
31+
data[ln].Date = date.toString();
32+
data[ln].Products = products[data[ln].Product_ID - 1000];
33+
data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
34+
data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
35+
}
36+
return data;
37+
}

ej2-react/code-snippet/pivot-table/default-cs149/app/datasource.tsx

Lines changed: 22 additions & 6367 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
let gData = [
2+
{ 'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1001, 'Sold': 2 },
3+
{ 'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 3 },
4+
{ 'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1003, 'Sold': 3 },
5+
{ 'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 4 },
6+
{ 'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 1 },
7+
{ 'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 6 },
8+
{ 'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 8 },
9+
{ 'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1001, 'Sold': 4 },
10+
{ 'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 2 },
11+
{ 'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1004, 'Sold': 1 },
12+
{ 'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 2 },
13+
{ 'Date': '2/19/2018 18:51:14 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1006, 'Sold': 1 },
14+
{ 'Date': '3/20/2018 06:31:12 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 5 },
15+
{ 'Date': '3/06/2018 06:31:20 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1004, 'Sold': 1 },
16+
{ 'Date': '5/04/2018 21:41:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 1 },
17+
{ 'Date': '5/11/2018 21:45:15 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1010, 'Sold': 2 },
18+
{ 'Date': '6/17/2018 07:09:27 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1003, 'Sold': 4 },
19+
{ 'Date': '7/1/2018 03:47:38 GMT+0530 (India Standard Time)', 'Product_Categories': 'Bikes', 'Product_ID': 1005, 'Sold': 2 },
20+
{ 'Date': '7/2/2018 05:47:38 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1007, 'Sold': 5 },
21+
{ 'Date': '9/8/2018 11:50:17 GMT+0530 (India Standard Time)', 'Product_Categories': 'Clothings', 'Product_ID': 1008, 'Sold': 2 },
22+
{ 'Date': '12/2/2018 16:05:33 GMT+0530 (India Standard Time)', 'Product_Categories': 'Accessories', 'Product_ID': 1002, 'Sold': 1 },
23+
];
24+
export let Group_Data = getGroupData(gData);
25+
function getGroupData(data) {
26+
let date;
27+
let products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
28+
let amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2]
29+
for (let ln = 0, lt = data.length; ln < lt; ln++) {
30+
date = new Date(data[ln].Date.toString());
31+
data[ln].Date = date.toString();
32+
data[ln].Products = products[data[ln].Product_ID - 1000];
33+
data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
34+
data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
35+
}
36+
return data;
37+
}

ej2-react/code-snippet/pivot-table/default-cs150/app/datasource.tsx

Lines changed: 22 additions & 6367 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)