Sign in to follow this  

Example Real-Time Line (Dual Y)

Recommended Posts

Hi there,

I'm a newbie with this software,just yesterday get to know and try this kind of software.

quite interesting and its challenging me to understand XML language that I never learned before.


I'm going to develop Real-time Line (Dual Y) which using php mysql as data backend.

I already try and run the example of Real-time Line (Dual Y) in d doc, but it just use the random data not extract from database(mysql)

Currently, the blueprint application (example in php mysql that I've downloaded) does not have d example Real-time Line (Dual Y).


I try to manipulate the example has given, but hard for me to manipulate it to do in Real-time Line (Dual Y).

So,anyone here have done it before and any example that I can refer straightly.

Thank u very much for your kindness to help me.

Share this post

Link to post
Share on other sites
Guest Angshu



Welcome to FusionCharts Forum! smile.gif


I am afraid, as of now, we do not have a sample using real time data from database. But, the process remains same; Instead of generating random data, all you would need to connect database, query data and form querystring response.


Hope this helps.

Share this post

Link to post
Share on other sites

Thanks Angshu for d feedback.


Ok,if so.

Based on my understanding, before I create real time chart using php mysql,

here is the list of file/folder I need to copy from d example (blueprint):

1-_mmServerScripts folder

2-charts folder

3-Includes (change the dbconnection) folder

4-JSClass folder

5-Default.php - this one as a main page right,then I need to make a changes.

6-DataGen.php - the query data inside this page right, so I just change based on my requirement right?

but,how about the function which using XML language inside, I'm not very undertand

when to apply with the realtime.could u help me?

7-LibFunctions.php - no need to change right?

8-Utilities.php - no need to change right?


ok thanks a lot! :)

Share this post

Link to post
Share on other sites

Okay,here I try the simple one, I'm not sure its right or wrong.

But,through all these codes, The data not run n display based what I want.

Actually, I want to display the status of car In/Out on current date (shows daily transaction) in every minute.

This data it just retrieve from table include time IN/OUT of that car.


XML Page



<chart caption='Status Car In/Out' subCaption='Daily Transaction' dataStreamURL='IparkTransaction.php' refreshInterval='60' numberPrefix='' setAdaptiveYMin='1' xAxisName='Time' showRealTimeValue='1' realTimeValuePadding='50' labelDisplay='Rotate' slantLabels='1'>



<dataset seriesName='In' showValues='0'>


<dataset seriesName='Out' showValues='0'>




<style type='font' name='captionFont' size='14' />



<apply toObject='Caption' styles='captionFont' />

<apply toObject='Realtimevalue' styles='captionFont' />






PHP page







//Get date Today - date format 2011-11-04

$dateTodayLabel = date("yy-d-m");


//Get label for the data - time in format hh:mn:ss

$dateTimeLabel = date('h:i:s');


// extract pertinent data from dataset

// we will get

$strSQLIn ="select count(EventTrans) where EventTrans = 'IN' and DateTrans=" . $_REQUEST['dateTodayLabel'] . " ";

$strSQLOut ="select count(EventTrans) where EventTrans = 'OUT' and DateTrans=" . $_REQUEST['dateTodayLabel'] . " ";


// execure SQL to create recordset

$resultIn=mysql_query($strSQLIn) or die(mysql_error());

$resultOut=mysql_query($strSQLOut) or die(mysql_error());


//Now write it to output stream

print "&label=" . $dateTimeLabel . "In=" . $resultIn . "Out" . $resultOut;




HTML page





<TITLE>FusionWidgets v3 - Multiple dataset example</TITLE>

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




<div id="chart1div">

This text is replaced by the Flash movie.


<script type="text/javascript">

var chart1 = new FusionCharts("../Charts/RealTimeLine.swf", "ChId1", "500", "350", "0", "0");







And also I attached print screen on display page and my table.




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