arkahnz

Data Streaming Chart - Invalid Data: Non-Numeric Data " Roundedrandomvalue

Recommended Posts

Hi,

 

I am trying to run the simple example under Data Streaming Charts Stock Price Monitor tutorial. However I keep getting invalid data: Non-numeric data " roundedRandomValue error when I run the chart in debug mode. I tried using .asp , .jsp and .php data providers. But the result is the same. In x-axis it keeps populating "timeLabel". Please suggest a solution.

 

Thanks and Regards

 

 

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

Could you please send us a screenshot or any live link of the error?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

Could you please send us a screenshot or any live link of the error?

 

Awaiting for your response.

 

 

Hi Angshu,

 

Please find the attached screen shot. I have changed the refresh interval to 2 seconds instead of the default 60 seconds and set debug mode on. Please notice the highlighted circle in red at bottom right corner. Instead of populating time intervals it keeps generating these.

 

Thanks and Regards

post-20287-0-18101400-1313079594_thumb.jpg

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

Please follow the steps below:

 

  • Check if path dataStreamURL provided in XML is correct.

  • Check if you've specified a valid value for refreshInterval in your XML document.

  • Check if dataStreamURL is returning proper data. To test this, just open your browser and run this page. It should return the data in text format.

  • Make sure the output data doesn't contain any carraige returns or HTML elements. In many scripting languages, these are automatically added. You'll need to remove them.

  • You also need to make sure that the page which provides the incremental update data to FusionCharts must be hosted on the same sub-domain in which the chart .swf is hosted - otherwise, FusionWidgets, owing to Flash Sandbox security model, won't be able to receive updated data. Due to Flash sandbox security restrictions, you are allowed to retrieve data only from the same sub-domain in which the flash movie is residing. Data can only be loaded from a domain that is an exact match to the location of the SWF, including subdomains. For this reason a SWF residing at server1.mydomain.com will not be able to access data from a SWF at mydomain.com.

If the problem persists, please send us the entire code to look into the issue.

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for your response.

 

Please follow the steps below:

 

  • Check if path dataStreamURL provided in XML is correct.

  • Check if you've specified a valid value for refreshInterval in your XML document.

  • Check if dataStreamURL is returning proper data. To test this, just open your browser and run this page. It should return the data in text format.

  • Make sure the output data doesn't contain any carraige returns or HTML elements. In many scripting languages, these are automatically added. You'll need to remove them.

  • You also need to make sure that the page which provides the incremental update data to FusionCharts must be hosted on the same sub-domain in which the chart .swf is hosted - otherwise, FusionWidgets, owing to Flash Sandbox security model, won't be able to receive updated data. Due to Flash sandbox security restrictions, you are allowed to retrieve data only from the same sub-domain in which the flash movie is residing. Data can only be loaded from a domain that is an exact match to the location of the SWF, including subdomains. For this reason a SWF residing at server1.mydomain.com will not be able to access data from a SWF at mydomain.com.

If the problem persists, please send us the entire code to look into the issue.

 

Awaiting for your response.

 

 

Dear Angshu,

 

Please find my findings for the above troubleshooting tips -

1) 'Check if path dataStreamURL provided in XML is correct'. -

 

- dataStreamURL is correct since minor changes made in the jsp code are reflecting in the chart. eg. I hard coded few values with appropriate datastream format in out.print() of stockprice.jsp and it was generating those hard coded values in the chart.

 

2) 'Check if you've specified a valid value for refreshInterval in your XML document'. -

 

- refreshInterval is set to 2 seconds. This is also working fine as chart is updating with hard coded values every 2 seconds.

 

3) Check if dataStreamURL is returning proper data. To test this, just open your browser and run this page. It should return the data in text format.

 

- When I run the page on a browser I am getting the code itself in text format on the browser instead of the output data. (I am not sure if I am doing this the right way)

 

4) Make sure the output data doesn't contain any carriage returns or HTML elements. In many scripting languages, these are automatically added. You'll need to remove them.

 

- Since I am not able to see the output generated on the browser I can't verify that. However as I said, it is working fine with hard coded values. I need to be able to check output data of the

default code on the browser. Please suggest me steps to do that since I am unsure of the same.

 

5) You also need to make sure that the page which provides the incremental update data to FusionCharts must be hosted on the same sub-domain in which the chart .swf is hosted - otherwise, FusionWidgets, owing to Flash Sandbox security model, won't be able to receive updated data. Due to Flash sandbox security restrictions, you are allowed to retrieve data only from the same sub-domain in which the flash movie is residing. Data can only be loaded from a domain that is an exact match to the location of the SWF, including subdomains. For this reason a SWF residing at server1.mydomain.com will not be able to access data from a SWF at mydomain.com.

 

- This I believe is not a concern since I am running a sample tutorial and keeping all the files on the same folder.

 

 

I guess problem is with the .asp, .jsp code since it isn't generating the required output as per debug report. Although the code seems fine. I am attaching all the files for your review. (I do not have permissions to upload .jsp files therefore I have converted it into a .txt and attached).

 

Thanks and Regards

SimpleExample.html

Data.xml

StockPrice.txt

Share this post


Link to post
Share on other sites

Hi,

 

I was wondering if I can get a solution some time this week end.

 

Thanks and Regards

 

Khalid

 

 

 

Dear Angshu,

 

Please find my findings for the above troubleshooting tips -

1) 'Check if path dataStreamURL provided in XML is correct'. -

 

- dataStreamURL is correct since minor changes made in the jsp code are reflecting in the chart. eg. I hard coded few values with appropriate datastream format in out.print() of stockprice.jsp and it was generating those hard coded values in the chart.

 

2) 'Check if you've specified a valid value for refreshInterval in your XML document'. -

 

- refreshInterval is set to 2 seconds. This is also working fine as chart is updating with hard coded values every 2 seconds.

 

3) Check if dataStreamURL is returning proper data. To test this, just open your browser and run this page. It should return the data in text format.

 

- When I run the page on a browser I am getting the code itself in text format on the browser instead of the output data. (I am not sure if I am doing this the right way)

 

4) Make sure the output data doesn't contain any carriage returns or HTML elements. In many scripting languages, these are automatically added. You'll need to remove them.

 

- Since I am not able to see the output generated on the browser I can't verify that. However as I said, it is working fine with hard coded values. I need to be able to check output data of the

default code on the browser. Please suggest me steps to do that since I am unsure of the same.

 

5) You also need to make sure that the page which provides the incremental update data to FusionCharts must be hosted on the same sub-domain in which the chart .swf is hosted - otherwise, FusionWidgets, owing to Flash Sandbox security model, won't be able to receive updated data. Due to Flash sandbox security restrictions, you are allowed to retrieve data only from the same sub-domain in which the flash movie is residing. Data can only be loaded from a domain that is an exact match to the location of the SWF, including subdomains. For this reason a SWF residing at server1.mydomain.com will not be able to access data from a SWF at mydomain.com.

 

- This I believe is not a concern since I am running a sample tutorial and keeping all the files on the same folder.

 

 

I guess problem is with the .asp, .jsp code since it isn't generating the required output as per debug report. Although the code seems fine. I am attaching all the files for your review. (I do not have permissions to upload .jsp files therefore I have converted it into a .txt and attached).

 

Thanks and Regards

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for the reply. I am not deploying it to a webserver. I have used the exact instructions from the tutroial and am running it locally on my machine by copying the necessary files to the respective folders. There wern't any instructions in the tutorial regarding deployment on a web server.

 

Hi,

 

Can you please confirm that you are running this after deploying to a web server and StockPrice.jsp is accessible from the web address?

 

Srividya

Share this post


Link to post
Share on other sites

Hi

 

In order to use a jsp file you would need to deploy it as part of an application in a web server like tomcat.

 

If you already have IIS installed, you should probably try deploying the asp file.

 

Hope this helps. :)

 

Srividya

Share this post


Link to post
Share on other sites

I have the same problem when using Thermometer widget with live data. When the called script does return 25.0 every thing works fine, if it returns 25 as integer I get the "not a number" error as mentioned above.

 

Looks like a bug to me. I have kit #95515, if you might want to check versions. I can do a work around by using float numbers, but I think this should be fixe in one of the next updates/bug fixe.

Edited by docbee

Share this post


Link to post
Share on other sites

Hi Srividya,

 

Thanks for the tip. I have not been at this task for some time now and hence the delay in response. However I am back to exploring it. Yes, it worked after deploying the application in tomcat 7.0. But now I need to make this real-time graph appear on my sharepoint site as a web-part. Please provide steps to do so. I have used fusion charts in my SharePoint site that read from SharePoint lists and it works fine. However I need to know how to get the real-time example running in sharepoint specially since I am using a JSP data provider that uses tomcat. I am using WSS 3.0. awaiting early reply.

 

Thanks and Regards

 

Khalid

 

 

 

 

 

Hi

 

In order to use a jsp file you would need to deploy it as part of an application in a web server like tomcat.

 

If you already have IIS installed, you should probably try deploying the asp file.

 

Hope this helps. :)

 

Srividya

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