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

problems with redrawing pie chart

I cannot refresh the datamanager datasource for a pie chart.
When I change the query for a series, it doesn't refresh.
When I change the datasource for a series, it doesn't refresh.
When I change both and call "redraw", it refreshes the drawing, but not the data.
Whenever it redraws, it limits the legend (on the right side) to 36px wide.

1 Reply

SK Sanjith Kesavan Syncfusion Team September 18, 2015 12:16 PM UTC

Hi David Elies,
We have analyzed your query and replicated the scenario in our sample. The reported issue not reproduced in our side. We have prepared the sample as per your requirement. In the button click event we are having the following code.

In the above code we have created the instance of the chart and created the new datamanager and query for the chart. After that we have bind the datamanager to the datasource of the chart. Chart is rendered as per the data stored in the new datamanager. After that we have redrawn the chart. Please find the below screenshots

Before the button click:

After the button click:

If the legend position is set as right in the sample, then legend is placed right side of the pie chart. Legend took only 20% of the space in the available space to render. If you want to increase the width of the legend contend please follow the below code example.

<div id="container"></div>


$("#container").ejChart({ legend :{ size :{width: 30%}} });

For more details please follow the below link:
Link: http://help.syncfusion.com/js/api/ejchart#members:legend-size

Please find the sample from below location.
Sample Link: http://www.syncfusion.com/downloads/support/forum/120292/ze/PIE174032198
Still you are facing this issue, please let us know by modifying the attached sample along with the replication procedure.

Sanjith K.

Live Chat Icon For mobile
Up arrow icon