Sign in to follow this  
adaptdev24

SetDataURL and Encoding URL

Recommended Posts

I am trying to allow the setDataURL function to accept parameters, however everytime I try to render the chart, it says invalid data? I have provided the code below. However, without providing an parameter, it works. What is the issue?

function changeGraph()
                {
                        var url1 = escape("hppdetailed.php?clientName=Test");
                        var chartReference = FusionCharts("myChartId1");
                        chartReference.setDataURL(url1);

                }

When the function is called, the graph just says Invalid Data. The hppdetailed.php is configured to use the GET function to accept the parameter. I have tested that functionality and it is working correctly. 

Edited by adaptdev24

Share this post


Link to post
Share on other sites

I am trying to allow the setDataURL function to accept parameters, however everytime I try to render the chart, it says invalid data? I have provided the code below. However, without providing an parameter, it works. What is the issue?

function changeGraph()
                {
                        var url1 = escape("hppdetailed.php?clientName=Test");
                        var chartReference = FusionCharts("myChartId1");
                        chartReference.setDataURL(url1);

                }

When the function is called, the graph just says Invalid Data. The hppdetailed.php is configured to use the GET function to accept the parameter. I have tested that functionality and it is working correctly. 

Hi,

 

Could you please provide us with the relevant JSON/XML data that your passing to the chart so that we might test it?

 

Generally, "Invalid Data" error is shown when the data is malformed. More at:

Ref.- http://docs.fusioncharts.com/charts/contents/?Debug/Basic.html

 

Hope this helps. :)

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