Sign in to follow this  
egood

RealTime chart: No data received

Recommended Posts

My dataUrlStream uses a php script as its data source. If I hard-code this print statement in php:

 

 

 

print "&label=16:00:26&value=15&ignoreAll"

 

 

 

I'm able to see the data plotted on the graph. However, if I try to execute this slightly more intelligent script, which reads a file and prints its contents after removing a the trailing newline:

 

 

 

$myFile = "data.txt"; <-(data.txt contains "&label=16:00:26&value=15&ignoreAll")

 

$fh = fopen($myFile, 'r');

 

$theData = fread($fh, filesize($myFile));

 

fclose($fh);

 

$trimmed = rtrim($theData, "");

 

echo $trimmed;

 

 

 

The debug window gives me the following message:

 

 

 

"No data received: The chart couldn't find any data values in the real-time feed."

 

 

 

I can run the script from the command line and watch it print the identical line as above. But for some unholy reason, my RealTime chart doesn't receive it. Any ideas why this script won't work, but the previous one will?

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