0
votes

I am using fusion chart for rendering pie chart. In some scenario all the values passing to the graph string will be zero. That is returning the chart in a wrong way instead of showing no data to display. the following is the graph tag I am using.

 Int  PendingAmount =0;
Int PaidAmount =0;
"<graph showNames=\"1\" bgAlpha=\"0,0\" numberPrefix=\"Rs. \" decimalPrecision=\"0\"><set name=\"Paid\" value=\"" + PendingAmount + "\"  color=\"A4CFD7\"/>  <set name=\"Pending\" value=\"" + PaidAmount + "\" color=\"58A1C7\" /></graph>";

This is how the graph is displayed.

enter image description here

2

2 Answers

1
votes

I had the similar problem with fusion charts. I would first suggest you to use their latest build. They may have solved this problem.

In my case, I was manually checking for no values or zero values and was in turn, replacing the chart with a simple html text like No data to show.

0
votes

If you define only the chart element like , then you will get "No Data to Display" error message.

If you define at least one set element, then you wont get "No data to display" error message as there is data to display, but this time zero data and hence zero pie(only the chart canvas) will be rendered.

Hope this helps!