Sign in to follow this  
buddy123

Real Time Data

Recommended Posts

Hello,

 

I have been playing with the thermometer gauge and when I try to use the real-time feature it does not work.

 

Here is my html page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

 

<title>FusionWidgets XT - My First Chart </title>

<script type="text/javascript" src="../../Charts/FusionCharts.js"></script>

<script type="text/javascript" language="Javascript" src="../assets/ui/js/jquery.min.js"></script>

<script type="text/javascript" language="Javascript" src="../assets/ui/js/lib.js"></script>

 

<link href="../assets/ui/css/style.css" rel="stylesheet" type="text/css" />

 

<!--[if IE 6]>

<script type="text/javascript" src="../assets/ui/js/DD_belatedPNG_0.0.8a-min.js"></script>

 

<script>

/* select the element name, css selector, background etc */

DD_belatedPNG.fix('img');

 

/* string argument can be any CSS selector */

</script>

<![endif]-->

 

<style type="text/css">

h2.headline {

font: normal 110%/137.5% "Trebuchet MS", Arial, Helvetica, sans-serif;

padding: 0;

margin: 25px 0 25px 0;

color: #7d7c8b;

text-align: center;

}

p.small {

font: normal 68.75%/150% Verdana, Geneva, sans-serif;

color: #919191;

padding: 0;

margin: 0 auto;

width: 664px;

text-align: center;

}

</style>

 

</head>

<body>

 

<div id="wrapper">

 

<div id="header">

 

 

<div class="logo"><a class="imagelink" href="http://www.fusioncharts.com/widgets" target="_blank"><img src="../assets/ui/images/fwxt-logo.png" width="73" height="74" alt="FusionWidgets XT logo" /></a></div>

<h1 class="brand-name">FusionWidgets XT</h1>

<h1 class="logo-text">First Thermometer Gauge</h1>

</div>

 

<div class="content-area">

<div id="content-area-inner-main">

<p class="text" align="center">The sample represents a simple Thermometer Gauge showing the temperature of Antarctica.</p>

<div id="messageBox" style="margin-left:130px; margin-right:130px; display:none;"></div>

<p> </p>

 

<div class="gen-chart-render">

 

<div id="chartContainer">FusionWidgets will load here</div>

 

<script type="text/javascript"><!--

var myChart = new FusionCharts( "../../Charts/Thermometer.swf", "myChartId", "120", "350", "0", "1" );

 

myChart.setXMLData('<chart dataStreamURL="rt.php" refreshInterval="3" palette="4" lowerLimit="0" upperLimit="110" numberSuffix="° F" chartRightMargin="20"><value>40</value></chart> ');

myChart.render("chartContainer");

// -->

</script>

 

 

</div>

<div class="clear"></div>

<p> </p>

<p class="small"> </p>

<div class="underline-dull"></div>

</div>

</div>

<div id="footer">

<p class="highlightBlock">The above sample showcases how to create a simple Thermometer Gauge. Click <a href="../../Contents/Index.html?Thermometer/Create.html" target="_blank">here</a> to know more on how the code of this example works.</p>

</div>

</div>

</div>

<script type="text/javascript"><!--//

$(document).ready ( function() {

showConditionalMessage( "Your browser does not seem to have Flash Player support. JavaScript chart is rendered instead.", isJSRenderer(myChart) );

});

// -->

</script>

</body>

</html>

 

And here is my php file rt.php

<?php

 

return "&value=84";

 

?>

 

It renders the 40 as the default value, but after that it should render 84 but it does not?

 

Thanks,

Buddy

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Could you please try echoing the value from PHP file, as follows:

 

Ref. Code:

<?php 
 print "&value=84";
?> 

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi,

 

Could you please try echoing the value from PHP file, as follows:

 

Ref. Code:

<?php 
 print "&value=84";
?> 

 

Hope this helps!

 

There was some other issue. The refresh parameter was not set.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

I am afraid, from the code snippet that you have provided, it seems you have set the refreshInterval="3" in the <chart> element of XML string.

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