Sign in to follow this  
Cheiro

"no Data To Display" Still Exports

Recommended Posts

Hi,

 

Sometimes when there is no data, the chart shows "no Data to display" still the export of chart works and it gives a blank image.

 

is there a way to check if the chart has given " no data to display" error and stop export?

 

Regards,

Cheiro

Share this post


Link to post
Share on other sites

Hi,

 

Could you please send us a Live URL or an erroneous sample so that we can test it?

 

Looking forward to your feedback.

 

Hi,

 

Please find the attached screen shots of chart export and code...

 

the page renders chart using below here the xml has no data... intentionally

protected void Page_Load(object sender, EventArgs e)
 	{
      		Literal1.Text = FusionCharts.RenderChart("../FusionCharts/Column3D.swf", "../FusionCharts/SaveDataEmpty.xml", "", "myFirst", "600", "300", false, true);
 	}

 

The xml is like so... the data inside is intentionally commented to simulate no data


<chart exportEnabled='1' exportAction='Save' exportAtClient='0' exportHandler='../Export_Handler/FCExporter.aspx'
caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' formatNumberScale='0' showBorder='1' >
 <!--<set label='Jan' value='462' />
 <set label='Feb' value='857' />
 <set label='Mar' value='671' />
 <set label='Apr' value='494' />
 <set label='May' value='761' />
 <set label='Jun' value='960' />
 <set label='Jul' value='629' />
 <set label='Aug' value='622' />
 <set label='Sep' value='376' />
 <set label='Oct' value='494' />
 <set label='Nov' value='761' />
 <set label='Dec' value='960' />-->
</chart>

 

Even if the chart shows no data, it allows it to export which results in generation of a blank image.

post-19875-0-02460700-1313733134_thumb.jpg

post-19875-0-86556900-1313733150_thumb.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this