We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Data Doesn't change on tab change in pivot view

Thread ID:





149147 Nov 15,2019 04:26 PM UTC Nov 18,2019 03:23 PM UTC Angular 1
Tags: ejPivotChart
Amit Vijayvargiya
Asked On November 15, 2019 04:26 PM UTC

Hi Team,

I am trying to implement to pivot component.

Requirement: On tab click, I want to load the pivot component. Whatever the data comes from the response bind to the pivot view.

I have load the pivot view on ngOnIt() function with sample data. When i click on another tab and the repsonse comes from the API, i need to map those data on the pivot view data source setting. But it is referring to the old data which is loaded on ngOnIt.

Sivamathi Natarajan [Syncfusion]
Replied On November 18, 2019 03:23 PM UTC

Hi Amit, 
Thanks for contacting Syncfusion Support. 
We have prepared a sample as per requirement. Code changes made in the provide sample. Please change the values of the rows, columns  and values axis data to the appropriate binded dataSource. 
Code Example: [app.component.ts] 
loadJsonData() { 
      data => { 
        this.pivotObj.dataSourceSettings.dataSource = data as IDataSet[]; 
        this.pivotObj.dataSourceSettings.rows = [{ name: 'Orders.customerNumber' }, { name: 'Customers.city' }]; 
        this.pivotObj.dataSourceSettings.columns = [{ name: 'Offices.city' }, { name: 'Employees.reportsTo' }]; 
        this.pivotObj.dataSourceSettings.values = [{ name: 'Orders.customerNumber' }]; 
      error => { 
        console.log('errors', error); 
Meanwhile, we have prepared a sample for your reference. Kindly check the below sample for your reference. 
Please let us know if you have concern. 
Sivamathi Natarajan 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon