Jesús Report post Posted June 14, 2012 Hi there, Im new using Fusion Widgets and i want to create a Real-time line chart, my question is: Does anybody has an example to create a real time chart using xml? I mean, i have to use a data provider but i would like to build this provider using php, is this possible?? if this is right, how can i build it? thanks !! Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted June 14, 2012 Hi, Please find the Real-Time Line chart sample with data provider page in PHP (..//charts/CPU.php), as an attachment. It is very simple to provide and update the chart data using data provider page in PHP. You just need to echo the new data in the same format recommended by FusionCharts. The rest updating process is silently taken care by the FusionWidgets itself. For more information on "Data Streaming Capabilities", please follow the link below: http://docs.fusioncharts.com/widgets/Contents/?DataStreaming/Overview.html Hope this helps! Real-Time _LineChart_Sample.zip Share this post Link to post Share on other sites
Jesús Report post Posted June 14, 2012 Thanks a lot !!! Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted June 15, 2012 Hi, You are welcome. Share this post Link to post Share on other sites
Jesús Report post Posted June 19, 2012 Hi there !! Thanks for your example. I've created the chart succesfully. Now i have a new question. I'm retrieving data from a SQL database and i charting them correctly, but i would like to subtract the new query result, i mean if i have this results: 01:45 - 356190 01:46 - 357200 01:47 - 358210 01:48 - 359220 01:49 - 360230 01:50 - 361240 01:51 - 362351 01:52 - 363361 01:54 - 364371 01:55 - 365381 01:55 - 366391 01:56 - 367300 01:58 - 368310 I want to plot something like this: 01:45 - 356190 01:46 - 1010 01:47 - 1010 01:48 - 1010 01:49 - 1010 01:50 - 1010 01:51 - 1111 01:52 - 1010 01:54 - 1010 01:55 - 1010 01:55 - 1010 01:56 - 909 01:58 - 1010 I mean if i have a query result, the next point to chart will be the arithmetic difference between the first quey result and the second query result. Do you know how can i make it ?? Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted June 20, 2012 Hi, With regard to your query, please note that FusionCharts charts take only the simple values from the XML string to plot and not able to manipulate data based on some custom arithmetic operations. So, for your requirement, you can store the data retrieved from SQL database in a PHP variable and implement your own logic to get the result that you want to plot and then pass it to the XML code. Hope this helps! Share this post Link to post Share on other sites