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

Is it possible to subscribe to populate a chart with an object that was assembled from a JSON object?

Thread ID:





143499 Mar 22,2019 07:57 PM UTC Apr 1,2019 09:31 AM UTC Angular - EJ 2 3
Tags: Chart
Elise Rothberg
Asked On March 22, 2019 07:57 PM UTC


I am trying to implement two charts: a column chart and a drilldown pie chart.

I would be parsing out data for the charts from larger JSON objects that are returned from services.

I can get the args.dataSource in the load function of the column chart to populate with the correct data but the chart doesn't render. I have yet to try remote data with the pie chart.

Any help would be greatly appreciated.

Thank you,

P.S. I do not use VSCode so if you have the time to provide a sample, would it be possible to link to a Stackblitz example or just show the code here? Many, many thanks.

Dharanidharan Dharmasivam [Syncfusion]
Replied On March 25, 2019 06:45 AM UTC

Hi Elise, 
Greetings from Syncfusion.  
We have analyzed your query. You can pass the json data to chart in the load event as an array of object and the chart will render properly. We have prepared a column chart sample according to this requirement. 
Also, kindly find the sample for binding remote data to chart. Here we have used the data manager to fetch the data from server and bind to chart. This can be changed based on your scenario. And kindly find the sample for drilldown with pie chart. 
If you still face any issues in binding json data to chart, kindly revert us by modifying the sample or provide your sample with replication steps to replicate the reported scenario. 

Elise Rothberg
Replied On March 29, 2019 10:02 PM UTC

Thanks but I am using data that has been fetched previously from two different service calls so that won't work.

I did discover that wrapping the entire div in an *ngIf that looks to see if the chart data was received works.

Baby Palanidurai [Syncfusion]
Replied On April 1, 2019 09:31 AM UTC

Hi Elise,

Thanks for your update,

Please let us know if you need any further assistance on this.



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