This sample demonstrates how to integrate the Syncfusion Pivot Table (PivotView) component into a Vue 3 application using Vue CLI. It showcases key features such as field list, grouping bar, calculated fields, and custom formatting.
The Syncfusion Pivot Table (PivotView) is a powerful component for summarizing and analyzing large datasets. This sample helps you get started with the Pivot Table in a Vue 3 project and demonstrates how to:
- Bind a JSON data source.
- Configure rows, columns, values, and filters.
- Set custom height and width for the Pivot Table.
- Enable dynamic field manipulation using the Field List.
- Use the Grouping Bar for drag-and-drop field arrangement.
- Add calculated fields using basic arithmetic operations.
Before running this sample, ensure you have the following installed:
- 
Clone the repository: git clone https://github.com/SyncfusionExamples/vue3-pivottable-getting-started cd vue3-pivottable-getting-started
- 
Install dependencies: npm install 
- 
Run the application: npm run serve 
- 
Open in browser: Navigate to http://localhost:8080to view the Pivot Table in action.
- 
JSON Data Binding: The Pivot Table is populated using a local JSON array containing sales data. 
- 
Field Configuration: - Rows: Country
- Columns: Year
- Values: Amount,Total(calculated field)
 
- Rows: 
- 
Calculated Fields: A new field Totalis added using the formula:calculatedFieldSettings: [{ name: 'Total', formula: '"Sum(Amount)"+"Sum(Sold)"' }] 
- 
Field List: Allows users to dynamically add, remove, and rearrange fields at runtime. 
- 
Grouping Bar: Enables drag-and-drop interaction for customizing the Pivot Table layout. 
- 
Formatting: Currency formatting is applied to the Amountfield:formatSettings: [{ name: 'Amount', format: 'C1' }] 
vue3-pivottable-getting-started/
├─ public/
│  ├─ favicon.ico
│  └─ index.html
├─ src/
│  ├─ assets/
│  │  └─ logo.png
│  ├─ App.vue
│  └─ main.js
├─ README.md
├─ package.json
└─ babel.config.js
For questions or feedback, visit the Syncfusion Support Portal or Community Forums.
This is a commercial product and requires a valid Syncfusion license.
View License Terms