Implementing Syncfusion Vue PivotView
The Syncfusion Vue Pivot Grid is a powerful data visualization and analysis component for creating interactive pivot tables, aggregating multidimensional data, and performing advanced analytics operations.
Important: Always verify API class names, properties, and method signatures by consulting the reference files in this skill (references/*.md). These are maintained with verified, working examples. Do not assume API details from other sources.
⚠️ Security Warning: Data Source Validation
CRITICAL SECURITY NOTICE: When implementing pivot tables, always use trusted data sources. Never fetch or bind data from untrusted or user-provided URLs without proper validation and sanitization.
Security Best Practices:
- Use Local Data: Prefer local, in-memory data sources for maximum security
- Validate Remote Sources: Only connect to authenticated and authorized API endpoints under your control
- Sanitize User Input: Never allow users to specify arbitrary URLs or data sources
- Implement Authentication: Always use authentication headers and secure API endpoints
- Content Validation: Validate and sanitize all data received from external sources before binding
- Use HTTPS: Always use HTTPS for remote data connections
- Rate Limiting: Implement rate limiting on API endpoints to prevent abuse
Security Risks:
- Indirect Prompt Injection: Untrusted third-party data can contain malicious content that manipulates AI agent behavior
- Data Exfiltration: Malicious data sources could attempt to extract sensitive information
- Code Injection: Untrusted data may contain scripts or harmful content
Recommended Approach:
✅ DO: Use controlled, authenticated backend APIs
✅ DO: Implement server-side data validation
✅ DO: Use environment variables for API endpoints
✅ DO: Whitelist allowed data sources
❌ DON'T: Accept user-provided URLs
❌ DON'T: Bind to public, untrusted endpoints
❌ DON'T: Skip data validation and sanitization
❌ DON'T: Use HTTP for sensitive data
Table of Contents
Overview
The Syncfusion Vue PivotView (Pivot Table) component provides a powerful, interactive way to analyze and visualize large datasets. It supports:
- Multiple data sources (JSON, OLAP, relational databases like MySQL, SQL Server, MongoDB)
- Rich drill-down functionality for detailed exploration
- Pivot charts for visual data representation
- Export to Excel, CSV, and PDF
- Customizable layouts (Compact and Classic/Tabular)
- Performance optimization for large datasets
- State persistence for user experience continuity
Use this skill whenever implementing:
- Pivot Tables in Vue applications
- Data aggregation and analysis UI
- Interactive data exploration interfaces
- Business intelligence dashboards
Core APIs & Properties
Component Props
| Property |
Type |
Description |
dataSourceSettings |
IDataOptions |
Configure data source, rows, columns, values, filters, formatting |
height |
number | string |
Set component height in pixels or percentage |
width |
number | string |
Set component width in pixels or percentage |
gridSettings |
IGridSettings |
Control layout (Compact/Tabular), column width, row height, resizing |
displayOption |
IDisplayOption |
Control Grid vs Chart view: { view: 'Grid' | 'Chart' | 'Both' } |
chartSettings |
IChartSettings |
Configure chart type, series, legend, axes, tooltip |
groupingBarSettings |
IGroupingBarSettings |
Customize grouping bar appearance and behavior |
allowExcelExport |
boolean |
Enable Excel export functionality |
allowPdfExport |
boolean |
Enable PDF export functionality |
allowCsvExport |
boolean |
Enable CSV export functionality |
allowMemberFilter |
boolean |
Enable member filtering in UI |
allowLabelFilter |
boolean |
Enable label filtering in UI |
allowValueFilter |
boolean |
Enable value filtering in UI |
allowSorting |
boolean |
Enable sorting functionality |
allowDrilling |
boolean |
Enable drill-down/drill-through actions |
allowDrillThrough |
boolean |
Enable drill-through to detail data (more granular than allowDrilling) |
allowResizing |
boolean |
Enable column and row resizing |
allowNumberFormatting |
boolean |
Show number formatting options in toolbar and dialogs |
allowConditionalFormatting |
boolean |
Enable conditional formatting feature via toolbar button |
allowCalculatedField |
boolean |
Enable calculated field creation |
showFieldList |
boolean |
Display field list panel (UI for field configuration) |
showGroupingBar |
boolean |
Display grouping bar at top (UI for drag-drop field organization) |
showToolbar |
boolean |
Display toolbar with export/report/field management buttons |
toolbar |
string[] |
Array of toolbar items: ['New', 'Save', 'SaveAs', 'Rename', 'Remove', 'Load', 'Grid', 'Chart', 'MDX', 'Export', 'SubTotal', 'GrandTotal', 'ConditionalFormatting', 'NumberFormatting', 'FieldList'] |
showTooltip |
boolean |
Display tooltips when hovering over cells |
enablePersistence |
boolean |
Save pivot state to local storage automatically |
conditionalFormatSettings |
IConditionalFormatSettings[] |
Pre-define conditional formatting rules: value ranges, operators, styling |
aggregateTypes |
string[] |
Limit available aggregation types in dropdown |
maxNodeLimitInMemberEditor |
number |
Maximum members to load in member filter dialog (default 1000) |
saveReport |
Function(args) |
Callback when user saves a report via toolbar |
loadReport |
Function(args) |
Callback when user loads a report via toolbar |
renameReport |
Function(args) |
Callback when user renames a report via toolbar |
removeReport |
Function(args) |
Callback when user removes a report via toolbar |
newReport |
Function(args) |
Callback when user creates a new report via toolbar |
fetchReport |
Function() |
Callback to retrieve list of saved reports |
DataSourceSettings Properties
| Property |
Type |
Description |
dataSource |
any[] |
JSON array or DataManager instance with data |
type |
'JSON' | 'CSV' |
Data source type (default: 'JSON') |
rows |
IField[] |
Fields to display in row axis |
columns |
IField[] |
Fields to display in column axis |
values |
IField[] |
Value/measure fields for aggregation |
filters |
IField[] |
Fields to display in filter axis |
expandAll |
boolean |
Expand all row/column groups initially |
drilledMembers |
IDrilledMember[] |
Pre-drilled members: [{ name: 'Country', items: ['France'] }] |
filterSettings |
IFilter[] |
Member/label/value filters to apply |
sortSettings |
ISort[] |
Sort rules for fields |
formatSettings |
IFormatSettings[] |
Number formatting: [{ name: 'Amount', format: 'C0' }] |
calculatedFieldSettings |
ICalculatedFieldSettings[] |
Calculated field formulas |
Core Methods
// Export methods
excelExport() // Export pivot to Excel (.xlsx)
pdfExport() // Export pivot to PDF
csvExport() // Export pivot to CSV
// Dialog methods
createCalculatedFieldDialog() // Show calculated field creation dialog
showConditionalFormattingDialog() // Open conditional formatting dialog
createDrillThroughDialog() // Show drill-through data dialog
// Data manipulation
refresh() // Refresh pivot with current settings
setProperties({...}) // Update properties dynamically
// Data retrieval
getFieldList() // Get all available fields from data source
getDataSourceSettings() // Get current dataSourceSettings configuration
// Persistence
getPersistData() // Get serialized pivot state
loadPersistData(data) // Restore pivot state
Events
All events from PivotViewComponent documentation are listed below. Use Vue's :eventName="handler" syntax to bind.
Data Manipulation Events
| Event |
Parameters |
Triggered When |
| actionBegin |
dataSourceSettings, actionName, fieldInfo, cancel |
Before any pivot operation (filtering, sorting, aggregation, calculated field) |
| actionComplete |
dataSourceSettings, actionName, fieldInfo, actionInfo |
After pivot operation completes successfully |
| actionFailure |
actionName, errorInfo |
Pivot operation fails or encounters error |
Common actionName values:
"Aggregate field" - When aggregation type is selected
"Field filtered" - When member/label/value filter applied
"Field sorted" - When field sorted via UI
"Edit pivot table" - When cell edited in pivot
"Remove field" / "Add field" - When field removed/added from grouping bar
Cell Interaction Events
| Event |
Parameters |
Triggered When |
| aggregateCellInfo |
rowHeaders, columnHeaders, value, valueField, aggregateType |
Each value cell renders (use to override value or skip formatting) |
| cellClick |
Cell coordinates, member info |
User clicks on pivot cell |
| cellDoubleClick |
Cell coordinates, member info |
User double-clicks on pivot cell |
Field Configuration Events
| Event |
Parameters |
Triggered When |
| calculatedFieldCreate |
calculatedField, calculatedFieldSettings, fieldName, dataSourceSettings, cancel |
User creates/edits calculated field in dialog |
Export Events
| Event |
Parameters |
Triggered When |
| beforeExcelExport |
dataSourceSettings, isCollapsedStateSaved |
Before Excel export starts |
| excelExportComplete |
Export result data |
After Excel export completes |
| beforePdfExport |
dataSourceSettings, isCollapsedStateSaved |
Before PDF export starts |
| pdfExportComplete |
Export result data |
After PDF export completes |
| beforePrint |
dataSourceSettings |
Before printing starts |
| printComplete |
Print result |
After printing completes |
Drill & Expand Events
| Event |
Parameters |
Triggered When |
| drillThrough |
Row/column headers, raw data records |
User initiates drill-through action |
| beginDrillThrough |
Cell context, member info |
Before drill-through action starts (set args.cancel = true to prevent) |
Field Configuration & Grouping Bar Events
| Event |
Parameters |
Triggered When |
| fieldDrop |
Field being dropped, destination axis (rows/columns/values/filters) |
Field dropped in grouping bar to add it |
| fieldDragStart |
Field being dragged, source axis |
Field drag initiated from grouping bar |
| fieldRemove |
Field being removed, source axis |
Field removed from grouping bar |
| onFieldDropped |
Field dropped, destination axis |
After field successfully dropped (similar to fieldDrop but triggers after) |
| aggregateMenuOpen |
Field, current aggregation type |
Aggregation type dropdown opened in grouping bar/field list |
Export Customization Events
| Event |
Parameters |
Triggered When |
| excelQueryCellInfo |
Cell data, row/column info, cell type |
For each cell during Excel export (customize cell styling, value, formatting) |
| excelHeaderQueryCellInfo |
Header cell info, row/column hierarchy |
For each header cell in Excel export (customize header styling) |
| pdfQueryCellInfo |
Cell data, row/column info, pdfCell |
For each cell during PDF export (customize PDF cell appearance) |
| headerCellInfo |
Header cell context, style info |
For each header cell render in UI (customize header appearance) |
| queryCellInfo |
Value cell data, style, aggregateType |
For each value cell render in UI (customize cell appearance, value, formatting) |
Example Event Usage:
<template>
<ejs-pivotview
:dataSourceSettings="dataSourceSettings"
@actionBegin="onActionBegin"
@actionComplete="onActionComplete"
@aggregateCellInfo="onAggregateCellInfo">
</ejs-pivotview>
</template>
<script setup>
const => {
if (args.actionName === 'Aggregate field') {
console.log('User changing aggregation for:', args.fieldInfo.name);
// Set args.cancel = true to prevent action
}
};
const => {
if (args.actionName === 'Field filtered') {
console.log('Filter applied successfully');
}
};
const => {
// Override cell value: args.value = customValue;
// Skip formatting: args.isFormatted = false;
};
</script>
Getting Started
📄 Read: references/getting-started.md
- Installation steps and dependencies
- Setting up a basic PivotView
- Configuration fundamentals
- CSS imports and theming — including the Tailwind 3 single-import theme package (
@syncfusion/ej2-tailwind3-theme)
- Theme application methods — npm theme package, CDN, CRG, Theme Studio
- Vue 2 and Vue 3 compatibility
- Field List Component - UI for dynamic field configuration
- Grouping Bar Component - Inline field organization and drag-drop
- Loading States & Indicators - Managing UI feedback during data loading
- Accessibility Basics - WCAG compliance, keyboard navigation, screen readers
Data Binding & Sources
JSON Data Binding
📄 Read: references/data-binding.md
- Binding local JSON data
- Using DataManager with JsonAdaptor
- File upload and JSON loading
- Local vs remote data approaches
- Server-Side Pivot Processing - Backend aggregation for large datasets
- Complex Data Binding Patterns - Multi-source, real-time updates, lazy loading
External Data Sources
📄 Read: references/connecting-to-data-source.md
- MySQL database connections
- SQL Server integration
- MongoDB connectivity
- PostgreSQL, Oracle, Elasticsearch, Snowflake
- Creating Web API controllers for data retrieval
OLAP (Analysis Services)
📄 Read: references/olap.md
- SQL Server Analysis Services (SSAS) configuration
- OLAP field naming convention
[Dimension].[Hierarchy]
- Connecting to SSAS cubes for multi-dimensional analysis
- Handling massive datasets (millions of rows)
- OLAP vs JSON binding comparison
- Drill-down with OLAP hierarchies
Data Operations & Formatting
Data Formatting
📄 Read: references/data-formatting.md
- Number formatting (currency, percentages, decimals)
- Date and time value formatting
- Custom format patterns
- Format settings configuration
- Internationalization & Localization - Multi-language support, RTL, regional formatting
- Accessible Styling - High contrast, color-blind friendly, font sizing
Conditional Formatting
📄 Read: references/conditional-formatting.md
- Enable conditional formatting feature
- Define formatting rules with conditions and operators
- Apply styles based on cell values (backgroundColor, color, fontFamily, etc.)
- Pre-define rules in dataSourceSettings
- Show conditional formatting dialog via toolbar
- Dynamic rule modification and effects
Data Shaping & Field Configuration
📄 Read: references/data-shaping.md
- Defining rows, columns, and values
- Field hierarchy and nesting
- Captions and field organization
- Expand/collapse behaviors
- Configuration best practices
Row & Column Properties
📄 Read: references/row-and-column.md
- Setting width and height (pixels, percentage, auto)
- Row height customization
- Column width settings
- Responsive sizing
- Minimum width guarantees
Show/Hide Totals
📄 Read: references/show-hide-totals.md
- Grand total visibility control
- Subtotal positioning and display
- Summary row configuration
- Conditional total display
Data Analysis & Pivot Operations
Filtering Data
📄 Read: references/filtering.md
- Member filtering (include/exclude specific members, select all, search, sort)
- Label filtering (contains, starts with, ends with, between, etc., for string, number, and date)
- Value filtering (filter by aggregated value ranges, including Top N and Bottom N)
- Programmatic filter configuration via
filterSettings
- Filter dialog UI features (search, select all, sort, append current selection to filter)
- OLAP-specific options:
loadOnDemandInMemberEditor and levelCount
- Large dataset filter optimization with
maxNodeLimitInMemberEditor
- Filter-related events:
memberFiltering, memberEditorOpen, actionBegin, actionComplete, actionFailure
Sorting Fields & Values
📄 Read: references/sorting.md
- Member sorting (ascending/descending)
- Value sorting (sort by aggregated values)
- Custom sorting (user-defined member order)
- Alphanumeric sorting (numeric vs alphabetical)
- Sort settings configuration
- Multi-level sorting in complex hierarchies
Aggregation & Calculated Fields
📄 Read: references/aggregation-and-calculated-fields.md
- Aggregation types (Sum, Average, Count, Min, Max, etc.)
- Percentage aggregations (% of Total, % of Row, % of Parent, etc.)
- Comparative aggregations (Difference From, Percentage Difference)
- Running totals and percentage of running totals (cumulative % of running totals; client-side engine only)
- Aggregation dropdown customization
- Hiding aggregation labels for cleaner UI
- Calculated fields and custom formulas
Grouping Data
📄 Read: references/grouping.md
- Number grouping (ranges like 1-5, 6-10)
- Date grouping (Year, Quarter, Month, Week, Day)
- Custom grouping (business-specific categories)
- Programmatic grouping configuration
- Multi-type grouping in same pivot
- Grouping UI operations and ungroup functionality
Editing Cell Data
📄 Read: references/editing.md
- Cell editing modes (Normal, Dialog, Batch, Command Columns)
- CRUD operations (Create, Read, Update, Delete)
- Edit settings configuration
- Confirmation dialogs for safety
- Edit events and validation
- Bulk editing with batch mode
- Data Grid Editor Configuration - Grid behavior, selection, performance, pagination
Drill-Down & Navigation
Drill-Down & Drill-Up
📄 Read: references/drill-down-up.md
- Expand/collapse hierarchical data
- Drill position and specific member drilling
- expandAll property configuration
- Expand specific fields only
- Drill member exclusions
- Position-aware drilling
Report Manipulation
📄 Read: references/report-manipulation.md
- Dynamic report modification
- Field list interactions
- Grouping bar operations
- Report updates and refresh
- Loading Predefined Reports - Report templates, server-side templates, initial report loading
Hyperlinks
📄 Read: references/hyperlink.md
- Enable hyperlinks in cells
- Hyperlink settings configuration
- Row header hyperlinks
- Column header hyperlinks
- Value cell hyperlinks
- Summary cell hyperlinks
- Conditional hyperlink rules
- Custom CSS styling
Visualization & Layout
Classic/Tabular Layout
📄 Read: references/classic-layout.md
- Tabular layout benefits and setup
- Row field side-by-side display
- Grand total positioning
- Subtotal placement
- Layout configuration (
gridSettings.layout)
- Limitations and compatibility notes
Pivot Chart Integration
📄 Read: references/pivot-chart.md
- Pivot Chart setup and display modes
- 21+ chart types (Line, Column, Area, Bar, Bubble, Scatter, etc.)
- Display options (Grid only, Chart only, Both)
- Primary view selection
- Chart customization (series, axes, legends)
- Drill-down in charts
Tooltip Configuration
📄 Read: references/tooltip.md
- Enable/disable tooltips with
showTooltip property
- Custom tooltip templates with HTML and dynamic placeholders
- Template placeholders:
${rowHeaders}, ${columnHeaders}, ${valueField}, ${aggregateType}, ${value}
- Basic and advanced template examples with CSS styling
- Chart-specific tooltips via
chartSettings.tooltip
- Tooltip positioning and mobile considerations
- Accessibility best practices and keyboard support
Export & Toolbar
Export to Excel & PDF
📄 Read: references/export.md
- Excel export (.xlsx format)
- CSV export functionality
- PDF export capabilities
- Export method invocation
- Toolbar export options
- Data preservation during export
Toolbar & Report Management
📄 Read: references/toolbar.md
- Enable toolbar with
showToolbar property
- Configure toolbar items array (New, Save, SaveAs, Load, Rename, Remove, Grid, Chart, Export, ConditionalFormatting, etc.)
- Report lifecycle callbacks: saveReport(), loadReport(), renameReport(), removeReport()
- fetchReport() to retrieve saved reports
- Custom toolbar items and styling
- Report data persistence and retrieval
- Sizing & Layout Configuration - Component dimensions, responsive behavior, container sizing
State & Performance
State Persistence
📄 Read: references/state-persistence.md
- Enable persistence (
enablePersistence)
- Automatic state saving to local storage
- Layout retention across sessions
- Save and load pivot layout programmatically
getPersistData() and loadPersistData() methods
- Custom persistence workflows
Performance Best Practices
📄 Read: references/performance.md
- Virtual scrolling for large datasets
- Paging implementation
- Server-side pivot engine
- Data compression techniques
- Defer layout update feature
- Sorting optimization
- Member filtering performance
- Grouping impacts and alternatives
Quick Start Example
<template>
<div id="app">
<ejs-pivotview
:dataSourceSettings="dataSourceSettings"
:height="height"
:width="width"
:gridSettings="gridSettings"
:showFieldList="showFieldList">
</ejs-pivotview>
</div>
</template>
<script setup>
import { PivotViewComponent as EjsPivotview, FieldList } from "@syncfusion/ej2-vue-pivotview";
import { pivotData } from './pivotData.js';
import { provide } from "vue";
const dataSourceSettings = {
dataSource: pivotData,
expandAll: false,
columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
rows: [{ name: 'Country' }, { name: 'Products' }],
values: [
{ name: 'Sold', caption: 'Units Sold' },
{ name: 'Amount', caption: 'Sold Amount' }
],
formatSettings: [{ name: 'Amount', format: 'C0' }],
filters: []
};
const height = '450px';
const width = '100%';
const showFieldList = true;
const gridSettings = { columnWidth: 120, layout: 'Compact' };
provide('pivotview', [FieldList]);
</script>
<style>
/* Tailwind 3 theme package — single import covers all Pivot Table dependencies */
@import "../node_modules/@syncfusion/ej2-tailwind3-theme/styles/pivotview/index.css";
</style>
Common Patterns
Pattern 1: Aggregated Analysis
Define rows, columns, and values to create aggregated summaries of your data.
Pattern 2: Drill-Down Exploration
Use expandAll: false with drill-down icons to allow users to explore hierarchical data.
Pattern 3: Multi-Source Analysis
Use dataSourceSettings.type to bind different data sources (JSON, OLAP, relational databases).
Pattern 4: Visual Representation
Enable Pivot Chart with displayOption: { view: 'Chart' } for graphical insights.
Pattern 5: Large Dataset Handling
Combine virtualScrolling: true, allowPaging: true, or server-side engine for performance.
Key Props Reference
| Prop |
Type |
Purpose |
dataSourceSettings |
Object |
Defines data source, fields, and aggregation rules |
gridSettings |
Object |
Controls layout, dimensions, and grid behavior |
displayOption |
Object |
Controls Grid vs Chart visibility |
chartSettings |
Object |
Configures chart type and appearance |
hyperlinkSettings |
Object |
Enables and configures hyperlinks |
allowExcelExport |
Boolean |
Enables Excel export functionality |
allowPaging |
Boolean |
Enables paging for large datasets |
enableVirtualization |
Boolean |
Enables virtual scrolling |
enablePersistence |
Boolean |
Preserves component state in local storage |
showFieldList |
Boolean |
Displays field list UI |
showGroupingBar |
Boolean |
Displays grouping bar UI |
When to Read Each Reference
- Need to set up PivotView? →
getting-started.md
- Binding data? →
data-binding.md or connecting-to-data-source.md
- Configuring fields/layout? →
data-shaping.md, row-and-column.md
- Adding drill-down? →
drill-down-up.md, report-manipulation.md
- Showing charts? →
pivot-chart.md
- Adding hyperlinks? →
hyperlink.md
- Exporting data? →
export.md, toolbar.md
- Saving state? →
state-persistence.md
- Optimizing performance? →
performance.md
Next Steps
- Start with getting-started.md to set up your first PivotView
- Bind your data using data-binding.md or connecting-to-data-source.md
- Configure fields and layout with data-shaping.md
- Customize appearance and behavior with the relevant reference guides
- Implement export and persistence features as needed
- Optimize performance for large datasets using performance.md
1---2name: syncfusion-vue-pivot-table3description: Use this skill when users ask how to implement Syncfusion PivotView pivot tables in Vue. Trigger for Vue pivot grid/OLAP analysis, measures/dimensions, data binding, drill-down/drill-through, grouping, filtering, calculated fields, conditional formatting, exports, or pivot charts. Vue-only, not React/Angular/Blazor.4---56# Implementing Syncfusion Vue PivotView78The Syncfusion Vue Pivot Grid is a powerful data visualization and analysis component for creating interactive pivot tables, aggregating multidimensional data, and performing advanced analytics operations.910**Important:** Always verify API class names, properties, and method signatures by consulting the **reference files in this skill** (`references/*.md`). These are maintained with verified, working examples. Do not assume API details from other sources.1112## ⚠️ Security Warning: Data Source Validation1314**CRITICAL SECURITY NOTICE:** When implementing pivot tables, always use trusted data sources. **Never** fetch or bind data from untrusted or user-provided URLs without proper validation and sanitization.1516### Security Best Practices:17181. **Use Local Data**: Prefer local, in-memory data sources for maximum security192. **Validate Remote Sources**: Only connect to authenticated and authorized API endpoints under your control203. **Sanitize User Input**: Never allow users to specify arbitrary URLs or data sources214. **Implement Authentication**: Always use authentication headers and secure API endpoints225. **Content Validation**: Validate and sanitize all data received from external sources before binding236. **Use HTTPS**: Always use HTTPS for remote data connections247. **Rate Limiting**: Implement rate limiting on API endpoints to prevent abuse2526### Security Risks:2728- **Indirect Prompt Injection**: Untrusted third-party data can contain malicious content that manipulates AI agent behavior29- **Data Exfiltration**: Malicious data sources could attempt to extract sensitive information30- **Code Injection**: Untrusted data may contain scripts or harmful content3132### Recommended Approach:3334✅ **DO**: Use controlled, authenticated backend APIs35✅ **DO**: Implement server-side data validation36✅ **DO**: Use environment variables for API endpoints37✅ **DO**: Whitelist allowed data sources3839❌ **DON'T**: Accept user-provided URLs40❌ **DON'T**: Bind to public, untrusted endpoints41❌ **DON'T**: Skip data validation and sanitization42❌ **DON'T**: Use HTTP for sensitive data4344## Table of Contents4546- [Overview](#overview)47- [Core APIs & Properties](#core-apis--properties)48- [Events](#events)49- [Getting Started](#getting-started)50- [Data Binding & Sources](#data-binding--sources)51- [Data Operations & Formatting](#data-operations--formatting)52- [Data Analysis & Pivot Operations](#data-analysis--pivot-operations)53- [Drill-Down & Navigation](#drill-down--navigation)54- [Visualization & Layout](#visualization--layout)55- [Export & Toolbar](#export--toolbar)56- [State & Performance](#state--performance)5758---5960## Overview6162The Syncfusion Vue PivotView (Pivot Table) component provides a powerful, interactive way to analyze and visualize large datasets. It supports:6364- **Multiple data sources** (JSON, OLAP, relational databases like MySQL, SQL Server, MongoDB)65- **Rich drill-down functionality** for detailed exploration66- **Pivot charts** for visual data representation67- **Export to Excel, CSV, and PDF**68- **Customizable layouts** (Compact and Classic/Tabular)69- **Performance optimization** for large datasets70- **State persistence** for user experience continuity7172Use this skill whenever implementing:73- Pivot Tables in Vue applications74- Data aggregation and analysis UI75- Interactive data exploration interfaces76- Business intelligence dashboards7778---7980## Core APIs & Properties8182### Component Props8384| Property | Type | Description |85|----------|------|-------------|86| `dataSourceSettings` | `IDataOptions` | Configure data source, rows, columns, values, filters, formatting |87| `height` | `number \| string` | Set component height in pixels or percentage |88| `width` | `number \| string` | Set component width in pixels or percentage |89| `gridSettings` | `IGridSettings` | Control layout (Compact/Tabular), column width, row height, resizing |90| `displayOption` | `IDisplayOption` | Control Grid vs Chart view: `{ view: 'Grid' \| 'Chart' \| 'Both' }` |91| `chartSettings` | `IChartSettings` | Configure chart type, series, legend, axes, tooltip |92| `groupingBarSettings` | `IGroupingBarSettings` | Customize grouping bar appearance and behavior |93| `allowExcelExport` | `boolean` | Enable Excel export functionality |94| `allowPdfExport` | `boolean` | Enable PDF export functionality |95| `allowCsvExport` | `boolean` | Enable CSV export functionality |96| `allowMemberFilter` | `boolean` | Enable member filtering in UI |97| `allowLabelFilter` | `boolean` | Enable label filtering in UI |98| `allowValueFilter` | `boolean` | Enable value filtering in UI |99| `allowSorting` | `boolean` | Enable sorting functionality |100| `allowDrilling` | `boolean` | Enable drill-down/drill-through actions |101| `allowDrillThrough` | `boolean` | Enable drill-through to detail data (more granular than allowDrilling) |102| `allowResizing` | `boolean` | Enable column and row resizing |103| `allowNumberFormatting` | `boolean` | Show number formatting options in toolbar and dialogs |104| `allowConditionalFormatting` | `boolean` | Enable conditional formatting feature via toolbar button |105| `allowCalculatedField` | `boolean` | Enable calculated field creation |106| `showFieldList` | `boolean` | Display field list panel (UI for field configuration) |107| `showGroupingBar` | `boolean` | Display grouping bar at top (UI for drag-drop field organization) |108| `showToolbar` | `boolean` | Display toolbar with export/report/field management buttons |109| `toolbar` | `string[]` | Array of toolbar items: `['New', 'Save', 'SaveAs', 'Rename', 'Remove', 'Load', 'Grid', 'Chart', 'MDX', 'Export', 'SubTotal', 'GrandTotal', 'ConditionalFormatting', 'NumberFormatting', 'FieldList']` |110| `showTooltip` | `boolean` | Display tooltips when hovering over cells |111| `enablePersistence` | `boolean` | Save pivot state to local storage automatically |112| `conditionalFormatSettings` | `IConditionalFormatSettings[]` | Pre-define conditional formatting rules: value ranges, operators, styling |113| `aggregateTypes` | `string[]` | Limit available aggregation types in dropdown |114| `maxNodeLimitInMemberEditor` | `number` | Maximum members to load in member filter dialog (default 1000) |115| `saveReport` | `Function(args)` | Callback when user saves a report via toolbar |116| `loadReport` | `Function(args)` | Callback when user loads a report via toolbar |117| `renameReport` | `Function(args)` | Callback when user renames a report via toolbar |118| `removeReport` | `Function(args)` | Callback when user removes a report via toolbar |119| `newReport` | `Function(args)` | Callback when user creates a new report via toolbar |120| `fetchReport` | `Function()` | Callback to retrieve list of saved reports |121122### DataSourceSettings Properties123124| Property | Type | Description |125|----------|------|-------------|126| `dataSource` | `any[]` | JSON array or DataManager instance with data |127| `type` | `'JSON' \| 'CSV'` | Data source type (default: 'JSON') |128| `rows` | `IField[]` | Fields to display in row axis |129| `columns` | `IField[]` | Fields to display in column axis |130| `values` | `IField[]` | Value/measure fields for aggregation |131| `filters` | `IField[]` | Fields to display in filter axis |132| `expandAll` | `boolean` | Expand all row/column groups initially |133| `drilledMembers` | `IDrilledMember[]` | Pre-drilled members: `[{ name: 'Country', items: ['France'] }]` |134| `filterSettings` | `IFilter[]` | Member/label/value filters to apply |135| `sortSettings` | `ISort[]` | Sort rules for fields |136| `formatSettings` | `IFormatSettings[]` | Number formatting: `[{ name: 'Amount', format: 'C0' }]` |137| `calculatedFieldSettings` | `ICalculatedFieldSettings[]` | Calculated field formulas |138139### Core Methods140141```typescript142// Export methods143excelExport() // Export pivot to Excel (.xlsx)144pdfExport() // Export pivot to PDF145csvExport() // Export pivot to CSV146147// Dialog methods148createCalculatedFieldDialog() // Show calculated field creation dialog149showConditionalFormattingDialog() // Open conditional formatting dialog150createDrillThroughDialog() // Show drill-through data dialog151152// Data manipulation153refresh() // Refresh pivot with current settings154setProperties({...}) // Update properties dynamically155156// Data retrieval157getFieldList() // Get all available fields from data source158getDataSourceSettings() // Get current dataSourceSettings configuration159160// Persistence161getPersistData() // Get serialized pivot state162loadPersistData(data) // Restore pivot state163```164165---166167## Events168169All events from PivotViewComponent documentation are listed below. Use Vue's `:eventName="handler"` syntax to bind.170171### Data Manipulation Events172173| Event | Parameters | Triggered When |174|-------|-----------|-----------------|175| **actionBegin** | `dataSourceSettings`, `actionName`, `fieldInfo`, `cancel` | Before any pivot operation (filtering, sorting, aggregation, calculated field) |176| **actionComplete** | `dataSourceSettings`, `actionName`, `fieldInfo`, `actionInfo` | After pivot operation completes successfully |177| **actionFailure** | `actionName`, `errorInfo` | Pivot operation fails or encounters error |178179**Common actionName values:**180- `"Aggregate field"` - When aggregation type is selected181- `"Field filtered"` - When member/label/value filter applied182- `"Field sorted"` - When field sorted via UI183- `"Edit pivot table"` - When cell edited in pivot184- `"Remove field"` / `"Add field"` - When field removed/added from grouping bar185186### Cell Interaction Events187188| Event | Parameters | Triggered When |189|-------|-----------|-----------------|190| **aggregateCellInfo** | `rowHeaders`, `columnHeaders`, `value`, `valueField`, `aggregateType` | Each value cell renders (use to override value or skip formatting) |191| **cellClick** | Cell coordinates, member info | User clicks on pivot cell |192| **cellDoubleClick** | Cell coordinates, member info | User double-clicks on pivot cell |193194### Field Configuration Events195196| Event | Parameters | Triggered When |197|-------|-----------|-----------------|198| **calculatedFieldCreate** | `calculatedField`, `calculatedFieldSettings`, `fieldName`, `dataSourceSettings`, `cancel` | User creates/edits calculated field in dialog |199200### Export Events201202| Event | Parameters | Triggered When |203|-------|-----------|-----------------|204| **beforeExcelExport** | `dataSourceSettings`, `isCollapsedStateSaved` | Before Excel export starts |205| **excelExportComplete** | Export result data | After Excel export completes |206| **beforePdfExport** | `dataSourceSettings`, `isCollapsedStateSaved` | Before PDF export starts |207| **pdfExportComplete** | Export result data | After PDF export completes |208| **beforePrint** | `dataSourceSettings` | Before printing starts |209| **printComplete** | Print result | After printing completes |210211### Drill & Expand Events212213| Event | Parameters | Triggered When |214|-------|-----------|-----------------|215| **drillThrough** | Row/column headers, raw data records | User initiates drill-through action |216| **beginDrillThrough** | Cell context, member info | Before drill-through action starts (set `args.cancel = true` to prevent) |217218### Field Configuration & Grouping Bar Events219220| Event | Parameters | Triggered When |221|-------|-----------|-----------------|222| **fieldDrop** | Field being dropped, destination axis (rows/columns/values/filters) | Field dropped in grouping bar to add it |223| **fieldDragStart** | Field being dragged, source axis | Field drag initiated from grouping bar |224| **fieldRemove** | Field being removed, source axis | Field removed from grouping bar |225| **onFieldDropped** | Field dropped, destination axis | After field successfully dropped (similar to fieldDrop but triggers after) |226| **aggregateMenuOpen** | Field, current aggregation type | Aggregation type dropdown opened in grouping bar/field list |227228### Export Customization Events229230| Event | Parameters | Triggered When |231|-------|-----------|-----------------|232| **excelQueryCellInfo** | Cell data, row/column info, cell type | For each cell during Excel export (customize cell styling, value, formatting) |233| **excelHeaderQueryCellInfo** | Header cell info, row/column hierarchy | For each header cell in Excel export (customize header styling) |234| **pdfQueryCellInfo** | Cell data, row/column info, pdfCell | For each cell during PDF export (customize PDF cell appearance) |235| **headerCellInfo** | Header cell context, style info | For each header cell render in UI (customize header appearance) |236| **queryCellInfo** | Value cell data, style, aggregateType | For each value cell render in UI (customize cell appearance, value, formatting) |237238**Example Event Usage:**239240```vue241<template>242 <ejs-pivotview 243 :dataSourceSettings="dataSourceSettings"244 @actionBegin="onActionBegin"245 @actionComplete="onActionComplete"246 @aggregateCellInfo="onAggregateCellInfo">247 </ejs-pivotview>248</template>249250<script setup>251const onActionBegin = (args) => {252 if (args.actionName === 'Aggregate field') {253 console.log('User changing aggregation for:', args.fieldInfo.name);254 // Set args.cancel = true to prevent action255 }256};257258const onActionComplete = (args) => {259 if (args.actionName === 'Field filtered') {260 console.log('Filter applied successfully');261 }262};263264const onAggregateCellInfo = (args) => {265 // Override cell value: args.value = customValue;266 // Skip formatting: args.isFormatted = false;267};268</script>269```270271---272273## Getting Started274275📄 **Read:** [references/getting-started.md](references/getting-started.md)276277- Installation steps and dependencies278- Setting up a basic PivotView279- Configuration fundamentals280- **CSS imports and theming** — including the Tailwind 3 single-import theme package (`@syncfusion/ej2-tailwind3-theme`)281- **Theme application methods** — npm theme package, CDN, CRG, Theme Studio282- Vue 2 and Vue 3 compatibility283- **Field List Component** - UI for dynamic field configuration284- **Grouping Bar Component** - Inline field organization and drag-drop285- **Loading States & Indicators** - Managing UI feedback during data loading286- **Accessibility Basics** - WCAG compliance, keyboard navigation, screen readers287288---289290## Data Binding & Sources291292### JSON Data Binding293📄 **Read:** [references/data-binding.md](references/data-binding.md)294295- Binding local JSON data296- Using DataManager with JsonAdaptor297- File upload and JSON loading298- Local vs remote data approaches299- **Server-Side Pivot Processing** - Backend aggregation for large datasets300- **Complex Data Binding Patterns** - Multi-source, real-time updates, lazy loading301302### External Data Sources303📄 **Read:** [references/connecting-to-data-source.md](references/connecting-to-data-source.md)304305- MySQL database connections306- SQL Server integration307- MongoDB connectivity308- PostgreSQL, Oracle, Elasticsearch, Snowflake309- Creating Web API controllers for data retrieval310311### OLAP (Analysis Services)312📄 **Read:** [references/olap.md](references/olap.md)313314- SQL Server Analysis Services (SSAS) configuration315- OLAP field naming convention `[Dimension].[Hierarchy]`316- Connecting to SSAS cubes for multi-dimensional analysis317- Handling massive datasets (millions of rows)318- OLAP vs JSON binding comparison319- Drill-down with OLAP hierarchies320321---322323## Data Operations & Formatting324325### Data Formatting326📄 **Read:** [references/data-formatting.md](references/data-formatting.md)327328- Number formatting (currency, percentages, decimals)329- Date and time value formatting330- Custom format patterns331- Format settings configuration332- **Internationalization & Localization** - Multi-language support, RTL, regional formatting333- **Accessible Styling** - High contrast, color-blind friendly, font sizing334335### Conditional Formatting336📄 **Read:** [references/conditional-formatting.md](references/conditional-formatting.md)337338- Enable conditional formatting feature339- Define formatting rules with conditions and operators340- Apply styles based on cell values (backgroundColor, color, fontFamily, etc.)341- Pre-define rules in dataSourceSettings342- Show conditional formatting dialog via toolbar343- Dynamic rule modification and effects344345### Data Shaping & Field Configuration346📄 **Read:** [references/data-shaping.md](references/data-shaping.md)347348- Defining rows, columns, and values349- Field hierarchy and nesting350- Captions and field organization351- Expand/collapse behaviors352- Configuration best practices353354### Row & Column Properties355📄 **Read:** [references/row-and-column.md](references/row-and-column.md)356357- Setting width and height (pixels, percentage, auto)358- Row height customization359- Column width settings360- Responsive sizing361- Minimum width guarantees362363### Show/Hide Totals364📄 **Read:** [references/show-hide-totals.md](references/show-hide-totals.md)365366- Grand total visibility control367- Subtotal positioning and display368- Summary row configuration369- Conditional total display370371---372373## Data Analysis & Pivot Operations374375### Filtering Data376📄 **Read:** [references/filtering.md](references/filtering.md)377378- Member filtering (include/exclude specific members, select all, search, sort)379- Label filtering (contains, starts with, ends with, between, etc., for string, number, and date)380- Value filtering (filter by aggregated value ranges, including **Top N** and **Bottom N**)381- Programmatic filter configuration via `filterSettings`382- Filter dialog UI features (search, select all, sort, **append current selection to filter**)383- OLAP-specific options: `loadOnDemandInMemberEditor` and `levelCount`384- Large dataset filter optimization with `maxNodeLimitInMemberEditor`385- Filter-related events: `memberFiltering`, `memberEditorOpen`, `actionBegin`, `actionComplete`, `actionFailure`386387### Sorting Fields & Values388📄 **Read:** [references/sorting.md](references/sorting.md)389390- Member sorting (ascending/descending)391- Value sorting (sort by aggregated values)392- Custom sorting (user-defined member order)393- Alphanumeric sorting (numeric vs alphabetical)394- Sort settings configuration395- Multi-level sorting in complex hierarchies396397### Aggregation & Calculated Fields398📄 **Read:** [references/aggregation-and-calculated-fields.md](references/aggregation-and-calculated-fields.md)399400- Aggregation types (Sum, Average, Count, Min, Max, etc.)401- Percentage aggregations (% of Total, % of Row, % of Parent, etc.)402- Comparative aggregations (Difference From, Percentage Difference)403- Running totals and percentage of running totals (cumulative % of running totals; client-side engine only)404- Aggregation dropdown customization405- Hiding aggregation labels for cleaner UI406- Calculated fields and custom formulas407408### Grouping Data409📄 **Read:** [references/grouping.md](references/grouping.md)410411- Number grouping (ranges like 1-5, 6-10)412- Date grouping (Year, Quarter, Month, Week, Day)413- Custom grouping (business-specific categories)414- Programmatic grouping configuration415- Multi-type grouping in same pivot416- Grouping UI operations and ungroup functionality417418### Editing Cell Data419📄 **Read:** [references/editing.md](references/editing.md)420421- Cell editing modes (Normal, Dialog, Batch, Command Columns)422- CRUD operations (Create, Read, Update, Delete)423- Edit settings configuration424- Confirmation dialogs for safety425- Edit events and validation426- Bulk editing with batch mode427- **Data Grid Editor Configuration** - Grid behavior, selection, performance, pagination428429---430431## Drill-Down & Navigation432433### Drill-Down & Drill-Up434📄 **Read:** [references/drill-down-up.md](references/drill-down-up.md)435436- Expand/collapse hierarchical data437- Drill position and specific member drilling438- expandAll property configuration439- Expand specific fields only440- Drill member exclusions441- Position-aware drilling442443### Report Manipulation444📄 **Read:** [references/report-manipulation.md](references/report-manipulation.md)445446- Dynamic report modification447- Field list interactions448- Grouping bar operations449- Report updates and refresh450- **Loading Predefined Reports** - Report templates, server-side templates, initial report loading451452### Hyperlinks453📄 **Read:** [references/hyperlink.md](references/hyperlink.md)454455- Enable hyperlinks in cells456- Hyperlink settings configuration457- Row header hyperlinks458- Column header hyperlinks459- Value cell hyperlinks460- Summary cell hyperlinks461- Conditional hyperlink rules462- Custom CSS styling463464---465466## Visualization & Layout467468### Classic/Tabular Layout469📄 **Read:** [references/classic-layout.md](references/classic-layout.md)470471- Tabular layout benefits and setup472- Row field side-by-side display473- Grand total positioning474- Subtotal placement475- Layout configuration (`gridSettings.layout`)476- Limitations and compatibility notes477478### Pivot Chart Integration479📄 **Read:** [references/pivot-chart.md](references/pivot-chart.md)480481- Pivot Chart setup and display modes482- 21+ chart types (Line, Column, Area, Bar, Bubble, Scatter, etc.)483- Display options (Grid only, Chart only, Both)484- Primary view selection485- Chart customization (series, axes, legends)486- Drill-down in charts487488### Tooltip Configuration489📄 **Read:** [references/tooltip.md](references/tooltip.md)490491- Enable/disable tooltips with `showTooltip` property492- Custom tooltip templates with HTML and dynamic placeholders493- Template placeholders: `${rowHeaders}`, `${columnHeaders}`, `${valueField}`, `${aggregateType}`, `${value}`494- Basic and advanced template examples with CSS styling495- Chart-specific tooltips via `chartSettings.tooltip`496- Tooltip positioning and mobile considerations497- Accessibility best practices and keyboard support498499---500501## Export & Toolbar502503### Export to Excel & PDF504📄 **Read:** [references/export.md](references/export.md)505506- Excel export (.xlsx format)507- CSV export functionality508- PDF export capabilities509- Export method invocation510- Toolbar export options511- Data preservation during export512513### Toolbar & Report Management514📄 **Read:** [references/toolbar.md](references/toolbar.md)515516- Enable toolbar with `showToolbar` property517- Configure toolbar items array (New, Save, SaveAs, Load, Rename, Remove, Grid, Chart, Export, ConditionalFormatting, etc.)518- Report lifecycle callbacks: saveReport(), loadReport(), renameReport(), removeReport()519- fetchReport() to retrieve saved reports520- Custom toolbar items and styling521- Report data persistence and retrieval522- **Sizing & Layout Configuration** - Component dimensions, responsive behavior, container sizing523524---525526## State & Performance527528### State Persistence529📄 **Read:** [references/state-persistence.md](references/state-persistence.md)530531- Enable persistence (`enablePersistence`)532- Automatic state saving to local storage533- Layout retention across sessions534- Save and load pivot layout programmatically535- `getPersistData()` and `loadPersistData()` methods536- Custom persistence workflows537538### Performance Best Practices539📄 **Read:** [references/performance.md](references/performance.md)540541- Virtual scrolling for large datasets542- Paging implementation543- Server-side pivot engine544- Data compression techniques545- Defer layout update feature546- Sorting optimization547- Member filtering performance548- Grouping impacts and alternatives549550---551552## Quick Start Example553554```vue555<template>556 <div id="app">557 <ejs-pivotview558 :dataSourceSettings="dataSourceSettings"559 :height="height"560 :width="width"561 :gridSettings="gridSettings"562 :showFieldList="showFieldList">563 </ejs-pivotview>564 </div>565</template>566567<script setup>568import { PivotViewComponent as EjsPivotview, FieldList } from "@syncfusion/ej2-vue-pivotview";569import { pivotData } from './pivotData.js';570import { provide } from "vue";571572const dataSourceSettings = {573 dataSource: pivotData,574 expandAll: false,575 columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],576 rows: [{ name: 'Country' }, { name: 'Products' }],577 values: [578 { name: 'Sold', caption: 'Units Sold' },579 { name: 'Amount', caption: 'Sold Amount' }580 ],581 formatSettings: [{ name: 'Amount', format: 'C0' }],582 filters: []583};584585const height = '450px';586const width = '100%';587const showFieldList = true;588const gridSettings = { columnWidth: 120, layout: 'Compact' };589590provide('pivotview', [FieldList]);591</script>592593<style>594/* Tailwind 3 theme package — single import covers all Pivot Table dependencies */595@import "../node_modules/@syncfusion/ej2-tailwind3-theme/styles/pivotview/index.css";596</style>597```598599---600601## Common Patterns602603### Pattern 1: Aggregated Analysis604Define `rows`, `columns`, and `values` to create aggregated summaries of your data.605606### Pattern 2: Drill-Down Exploration607Use `expandAll: false` with drill-down icons to allow users to explore hierarchical data.608609### Pattern 3: Multi-Source Analysis 610Use `dataSourceSettings.type` to bind different data sources (JSON, OLAP, relational databases).611612### Pattern 4: Visual Representation613Enable Pivot Chart with `displayOption: { view: 'Chart' }` for graphical insights.614615### Pattern 5: Large Dataset Handling616Combine `virtualScrolling: true`, `allowPaging: true`, or server-side engine for performance.617618---619620## Key Props Reference621622| Prop | Type | Purpose |623|------|------|---------|624| `dataSourceSettings` | Object | Defines data source, fields, and aggregation rules |625| `gridSettings` | Object | Controls layout, dimensions, and grid behavior |626| `displayOption` | Object | Controls Grid vs Chart visibility |627| `chartSettings` | Object | Configures chart type and appearance |628| `hyperlinkSettings` | Object | Enables and configures hyperlinks |629| `allowExcelExport` | Boolean | Enables Excel export functionality |630| `allowPaging` | Boolean | Enables paging for large datasets |631| `enableVirtualization` | Boolean | Enables virtual scrolling |632| `enablePersistence` | Boolean | Preserves component state in local storage |633| `showFieldList` | Boolean | Displays field list UI |634| `showGroupingBar` | Boolean | Displays grouping bar UI |635636---637638## When to Read Each Reference639640- **Need to set up PivotView?** → `getting-started.md`641- **Binding data?** → `data-binding.md` or `connecting-to-data-source.md`642- **Configuring fields/layout?** → `data-shaping.md`, `row-and-column.md`643- **Adding drill-down?** → `drill-down-up.md`, `report-manipulation.md`644- **Showing charts?** → `pivot-chart.md`645- **Adding hyperlinks?** → `hyperlink.md`646- **Exporting data?** → `export.md`, `toolbar.md`647- **Saving state?** → `state-persistence.md`648- **Optimizing performance?** → `performance.md`649650---651652## Next Steps6536541. Start with [getting-started.md](references/getting-started.md) to set up your first PivotView6552. Bind your data using [data-binding.md](references/data-binding.md) or [connecting-to-data-source.md](references/connecting-to-data-source.md)6563. Configure fields and layout with [data-shaping.md](references/data-shaping.md)6574. Customize appearance and behavior with the relevant reference guides6585. Implement export and persistence features as needed6596. Optimize performance for large datasets using [performance.md](references/performance.md)660