Skip to content

Commit 4c7e5ca

Browse files
authored
Merge pull request #1 from Sridhar-Karunakaran/master
987889: Updating the Readme file content
2 parents dba05fc + 1d91664 commit 4c7e5ca

File tree

1 file changed

+70
-19
lines changed

1 file changed

+70
-19
lines changed

README.md

Lines changed: 70 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,83 @@
1-
# Essential JS 2 QuickStart
1+
# Syncfusion JavaScript Pivot Table – Custom Data Example
22

3-
## Installing
3+
This sample demonstrates how to **customize and display data in the Syncfusion JavaScript Pivot Table (PivotView)** component. It uses a client-side data source and shows how to modify fields dynamically before rendering.
44

5-
We can get all the Essential JS 2 components in a single npm package [`ej2`](https://www.npmjs.com/package/@syncfusion/ej2).
5+
## 📖 Overview
66

7-
We already configure the required packages in the `package.json` file.
7+
The Pivot Table (PivotView) is a powerful component for summarizing and analyzing large datasets. In this example:
88

9-
You can run the below command to install all dependent packages related to this seed project.
9+
- We define a **data source** with fields like `Country`, `Products`, `Year`, `Quarter`, `Sold`, and `Amount`.
10+
- We configure **rows**, **columns**, **values**, and **filters** for the Pivot Table.
11+
- We demonstrate **customization** by modifying the `Year` field during the `load` event.
1012

11-
```
12-
npm install
13-
```
13+
## 🛠 Prerequisites
1414

15-
## Running
15+
- [Node.js](https://nodejs.org/) (optional, for running a local server)
16+
- A modern browser (Chrome, Firefox, Edge)
1617

17-
The application is configured with `browser-sync`, so it will serve the web application in your default browser.
18+
## 🚀 Getting Started
1819

19-
We used `SystemJS` for module loading.
20+
1. **Clone the repository:**
21+
```bash
22+
git clone https://github.com/SyncfusionExamples/How-to-customize-the-data-in-PivotGrid
23+
```
2024

21-
You can use the below npm script to run the web application.
25+
2. **Install dependencies:**
26+
```bash
27+
npm install
28+
```
2229

23-
```
24-
npm start
25-
```
30+
3. **Run the application:**
31+
```bash
32+
npm start
33+
```
34+
This will launch the app in your default browser using **browser-sync**.
2635

27-
## Resources
36+
4. Alternatively, open `index.html` directly in your browser.
2837

29-
You can also refer the below resources to know more details about Essential JS 2 components.
38+
## 📂 Project Structure
3039

31-
* [Pure JS Demos](http://ej2.syncfusion.com/demos/)
32-
* [Pure JS Documentation](http://ej2.syncfusion.com/documentation/)
40+
- src/index.html – App host page and styles
41+
- src/app/app.ts – PivotView configuration and data customization logic
42+
- src/styles/styles.css – Optional custom styles
43+
- system.config.js – SystemJS configuration
44+
- package.json – Scripts and dependencies
45+
46+
## ✅ Key Features in This Sample
47+
48+
- **Custom Data Source:**
49+
The data includes sales information for different countries, products, and fiscal years.
50+
51+
- **Dynamic Field Customization:**
52+
In the `load` event, the `Year` field is modified to remove the `FY` prefix:
53+
```javascript
54+
load: function () {
55+
for (var i = 0; i < pivotGridObj.dataSource.data.length; i++) {
56+
pivotGridObj.dataSource.data[i]["Year"] =
57+
pivotGridObj.dataSource.data[i]["Year"].slice(3);
58+
}
59+
}
60+
```
61+
62+
- **Field Configuration:**
63+
- **Rows:** `Country`, `Products`
64+
- **Columns:** `Year`, `Quarter`
65+
- **Values:** `Sold` (Units Sold), `Amount` (Sold Amount)
66+
- **Formatting:** `Amount` displayed in currency format (`C0`)
67+
68+
- **Interactive Field List:**
69+
Users can drag and drop fields to customize the Pivot Table layout.
70+
71+
## 📚 Learn More
72+
73+
- [Pivot Table Documentation](https://ej2.syncfusion.com/documentation/pivotview/getting-started)
74+
- [Pivot Table Demos](https://ej2.syncfusion.com/demos/#/tailwind3/pivot-table/overview)
75+
76+
## 💬 Support
77+
78+
For questions or feedback, visit the [Syncfusion Support Portal](https://support.syncfusion.com) or [Community Forums](https://www.syncfusion.com/forums).
79+
80+
## 📜 License
81+
82+
This is a commercial product and requires a valid Syncfusion license.
83+
[View License Terms](https://www.syncfusion.com/license/studio/22.2.5/syncfusion_essential_studio_eula.pdf).

0 commit comments

Comments
 (0)