Skip to content

Commit 9652e4f

Browse files
Integrated latest changes at 09-26-2025 10:30:07 AM
1 parent d0b4940 commit 9652e4f

17 files changed

+1230
-27
lines changed

ej2-javascript/code-snippet/pivot-table/pivot-table-cs504/datasource.ts

Lines changed: 157 additions & 0 deletions
Large diffs are not rendered by default.

ej2-javascript/code-snippet/pivot-table/pivot-table-cs504/es5-datasource.js

Lines changed: 157 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#container {
2+
visibility: hidden;
3+
}
4+
5+
#loader {
6+
color: #008cff;
7+
height: 40px;
8+
width: 30%;
9+
position: absolute;
10+
top: 45%;
11+
left: 45%;
12+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
var pivotTableObj = new ej.pivotview.PivotView({
2+
dataSourceSettings: {
3+
dataSource: pivotData,
4+
expandAll: false,
5+
valueSortSettings: {
6+
columnHeaderText: "FY 2015##Unit Sold",
7+
headerDelimiter: '##',
8+
columnSortOrder: "Sorting.Descending",
9+
rowHeaderText: "France",
10+
rowSortOrder: "Sorting.Ascending"
11+
},
12+
drilledMembers: [{ name: 'Country', items: ['France'] }],
13+
columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
14+
values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }],
15+
rows: [{ name: 'Country' }, { name: 'Products' }],
16+
filters: [],
17+
},
18+
height: 350,
19+
enableValueSorting: true
20+
});
21+
pivotTableObj.appendTo('#PivotTable');
22+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
3+
import { PivotView, IDataSet } from '@syncfusion/ej2-pivotview';
4+
import { pivotData } from './datasource.ts';
5+
6+
let pivotTableObj: PivotView = new PivotView({
7+
dataSourceSettings: {
8+
dataSource: pivotData as IDataSet[],
9+
expandAll: false,
10+
valueSortSettings: {
11+
columnHeaderText: "FY 2015##Unit Sold",
12+
headerDelimiter: '##',
13+
columnSortOrder: "Sorting.Descending",
14+
rowHeaderText: "France",
15+
rowSortOrder: "Sorting.Ascending"
16+
},
17+
drilledMembers: [{ name: 'Country', items: ['France'] }],
18+
columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
19+
values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }],
20+
rows: [{ name: 'Country' }, { name: 'Products' }],
21+
filters: [],
22+
},
23+
enableValueSorting: true,
24+
height: 350
25+
});
26+
pivotTableObj.appendTo('#PivotTable');
27+
28+
29+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<title>EJ2 Pivot Grid</title>
6+
<meta charset="utf-8">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta name="description" content="Typescript Pivot Grid Control">
9+
<meta name="author" content="Syncfusion">
10+
<link href="index.css" rel="stylesheet">
11+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-base/styles/material.css" rel="stylesheet">
12+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-buttons/styles/material.css" rel="stylesheet">
13+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-calendars/styles/material.css" rel="stylesheet">
14+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-dropdowns/styles/material.css" rel="stylesheet">
15+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-grids/styles/material.css" rel="stylesheet">
16+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-charts/styles/material.css" rel="stylesheet">
17+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-inputs/styles/material.css" rel="stylesheet">
18+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-lists/styles/material.css" rel="stylesheet">
19+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-navigations/styles/material.css" rel="stylesheet">
20+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-popups/styles/material.css" rel="stylesheet">
21+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-splitbuttons/styles/material.css" rel="stylesheet">
22+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-pivotview/styles/material.css" rel="stylesheet">
23+
24+
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
25+
26+
<script src="https://cdn.syncfusion.com/ej2/31.1.17/dist/ej2.min.js" type="text/javascript"></script>
27+
<script src="es5-datasource.js" type="text/javascript"></script>
28+
</head>
29+
30+
<body>
31+
32+
<div id="container">
33+
<div>
34+
<div id="PivotTable"></div>
35+
</div>
36+
</div>
37+
38+
39+
<script>
40+
var ele = document.getElementById('container');
41+
if (ele) {
42+
ele.style.visibility = "visible";
43+
}
44+
</script>
45+
<script src="index.js" type="text/javascript"></script>
46+
</body>
47+
48+
</html>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
System.config({
2+
transpiler: "typescript",
3+
typescriptOptions: {
4+
compilerOptions: {
5+
target: "umd",
6+
module: "commonjs",
7+
moduleResolution: "node",
8+
emitDecoratorMetadata: true,
9+
experimentalDecorators: true
10+
}
11+
},
12+
paths: {
13+
"syncfusion:": "https://cdn.syncfusion.com/ej2/31.1.17/"
14+
},
15+
map: {
16+
main: "index.ts",
17+
typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js",
18+
'plugin-json':'https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js',
19+
"@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js",
20+
"@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js",
21+
"@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js",
22+
"@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js",
23+
"@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js",
24+
"@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js",
25+
"@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js",
26+
"@syncfusion/ej2-grids": "syncfusion:ej2-grids/dist/ej2-grids.umd.min.js",
27+
"@syncfusion/ej2-charts": "syncfusion:ej2-charts/dist/ej2-charts.umd.min.js",
28+
"@syncfusion/ej2-svg-base": "syncfusion:ej2-svg-base/dist/ej2-svg-base.umd.min.js",
29+
"@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js",
30+
"@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js",
31+
"@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js",
32+
"@syncfusion/ej2-excel-export": "syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js",
33+
"@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js",
34+
"@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js",
35+
"@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js",
36+
"@syncfusion/ej2-pivotview": "syncfusion:ej2-pivotview/dist/ej2-pivotview.umd.min.js",
37+
"@syncfusion/ej2-notifications":"syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js",
38+
},
39+
meta: {
40+
'*.json': { loader: 'plugin-json' }
41+
}
42+
});
43+
44+
System.import('index.ts').catch(console.error.bind(console)).then(function () {
45+
document.getElementById('loader').style.display = "none";
46+
document.getElementById('container').style.visibility = "visible";
47+
});
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<title>EJ2 Pivot Grid</title>
6+
<meta charset="utf-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<meta name="description" content="Typescript Pivot Grid Control" />
9+
<meta name="author" content="Syncfusion" />
10+
<link href="index.css" rel="stylesheet" />
11+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-base/styles/material.css" rel="stylesheet" />
12+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-buttons/styles/material.css" rel="stylesheet" />
13+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-calendars/styles/material.css" rel="stylesheet" />
14+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-dropdowns/styles/material.css" rel="stylesheet" />
15+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-grids/styles/material.css" rel="stylesheet" />
16+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-charts/styles/material.css" rel="stylesheet" />
17+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-inputs/styles/material.css" rel="stylesheet" />
18+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-lists/styles/material.css" rel="stylesheet" />
19+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-navigations/styles/material.css" rel="stylesheet" />
20+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-popups/styles/material.css" rel="stylesheet" />
21+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-pivotview/styles/material.css" rel="stylesheet" />
22+
<link href="https://cdn.syncfusion.com/ej2/31.1.17/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
23+
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
24+
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
25+
<script src="systemjs.config.js"></script>
26+
</head>
27+
28+
<body>
29+
<div id='loader'>Loading....</div>
30+
<div id='container'>
31+
<div>
32+
<div id='PivotTable'></div>
33+
</div>
34+
</div>
35+
</body>
36+
37+
</html>
49.5 KB
Loading
40.1 KB
Loading

0 commit comments

Comments
 (0)