KirkH123

Invalid Data with Linked Charts

Recommended Posts

I am building xml on the fly and passing it to the rendering function. When I add a link in the xml, I get an Invalid Data message. I have already ensured that the Flash security settings are correct and tried changing the ' to quot; .

 

Here is the xml that is being passed to rendering function:

"<chart caption='Incidents in the Last 30 Days' xAxisName='Date' yAxisName='# of Incidents' showValues='1' showLabels='0' >

  <set label='2014-01-02' value='2' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-02',1);' />

  <set label='2014-01-03' value='1' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-03',1);' />

  <set label='2014-01-04' value='1' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-04',1);' />

  <set label='2014-01-05' value='0' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-05',1);' />

  <set label='2014-01-06' value='0' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-06',1);' />

  <set label='2014-01-07' value='0' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-07',1);' />

  <set label='2014-01-08' value='0' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-08',1);' />

  <set label='2014-01-09' value='0' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-09',1);' />

  <set label='2014-01-10' value='0' link='JavaScript: isJavaScriptCall=true; ShowDrillDownChart('2014-01-10',1);' />

</chart>"

 

I am using FusionCharts version 3.3 on my local machine.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hello,

 

Since, you have generated your chart XML with ' (single quotes) try to escape the single quotes or try to build the chart XML with double quotes (").

 

The single quotes are conflicting here in your XML.

Share this post


Link to post
Share on other sites

Hello. Sorry to jump your problem, but I'm having a similar problem.

I'm using the 3 tier page setup derived from the FusionCharts Demo.

The charts do not like the date:                                                                dashboard.php?sumindex=2013-12-14

It works fine with everything else and even works without the dashes:    dashboard.php?sumindex=2013214

 

It is a DateTime field in a MYSQL Table.

 

Cannot work it out, but maybe we have the same problem?

 

Jamie

Edited by Jamie 1

Share this post


Link to post
Share on other sites

Ok I fixed my problem by conditioning the send from the default (index) page to remove the dashes..

 

$intsumindex = date("Ymd", strtotime($_GET['sumindex']));

 

Strange to have to do that and threw me for 2 days. Ok now thanks.

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