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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Create a pie chart from a remote datasource

Thread ID:





120212 Sep 10,2015 08:09 PM UTC Sep 14,2015 11:56 AM UTC JavaScript 3
Tags: ejChart
David Elies
Asked On September 10, 2015 08:09 PM UTC

I have created a dataManager and used it to fill a grid with data.  Now, when I try to change the grid to a pie chart, I cannot get a chart to display.  I can't figure out how to get my json data from the dataManager into the pie chart. I have tried to initialize my pie chart like this:
chart = $("#chart").ejChart({
            title: { text: 'Top Ten Requests' },
            legend: { visible: true },
            series: [{
                type: 'pie',
                dataSource: dataManager,
                type: 'pie',
                xName: "Name",
                yName: "Requests",
                query: query

The data returned from the datasource looks like this:
[{"Requests":65,"Name":"Alan's Agriculture","ExtraData":"Akron, OH"},{"Requests":14,"Name":"Bob's Borders and Edging","ExtraData":"Juneau, AK"}...]

Sanjith Kesavan [Syncfusion]
Replied On September 11, 2015 01:54 PM UTC

Hi Davis Elies,
We have analyzed your query and replicated the scenario in our sample. But we are not able to reproduce the reported issue. We have prepared the sample based on your requirement. In the sample we have retrieved the data from the nortwnd service. Please find the below code example
Code example
In the above code we have used a “query” to retrieve the data from the Northwnd service. Using “query”  we took 3 data from the Nortwnd and bind that data to the pie chart. “Query” is must to bind the data to chart using datamanager.

Please find the screenshot of the chart below.

Please find the sample from below mentioned location.
Sample Link: http://www.syncfusion.com/downloads/support/forum/120212/ze/export1425557291
Still you are facing this issue means please let us know by modifying the existing sample along with a replication procedure or send us the code example, that how are trying to retrieve data, with the query you have used in the chart.

Please let us know if you have any concern.


Sanjith K.​

David Elies
Replied On September 11, 2015 03:36 PM UTC

I'm sorry, I was using a custom OData4Adaptor in order to fix a different problem, and the response wasn't being properly formatted.  I got it working now.  I will post another question about how to get the excel and PDF exports working.

Sanjith Kesavan [Syncfusion]
Replied On September 14, 2015 11:56 AM UTC

Hi David Elies,
Thanks for the update.
Sanjith K.


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