Highcharts - Realtime: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
(Created page with '{{AddOnBanner|name=Realtime_Highchart|type=PHP,AJAX|author=Mark Crossley|contact='MCrossley' via the forum|updated=28 November 2012|version=0.1}} = Dynamically Updating a Highc…')
 
No edit summary
Line 16: Line 16:
= Installation =
= Installation =


*Download and copy [http://www.highcharts.com/ Highcharts] on to your web server
*Download and copy the [http://www.highcharts.com/ Highcharts] files on to your web server
*Download the [http://unxutils.sourceforge.net/ GNU utilities for Win32] - I used the latest updates (after 14-04-03) 
*Download the GNU Windows
*Download the [http://wiki.sandaysoft.com/files/Realtime_Highcharts_v0-1.zip Realtime_Highcharts ZIP file]  (right click, Save as)
*Download the [http://wiki.sandaysoft.com/files/Realtime_Highcharts_v0-1.zip Realtime_Highcharts ZIP file]  (right click, Save as)

*Extract the contents and place as follows:
Next you have to decide where and how the realtime log file will be created. The zip file contains a simple Windows batch file that will create a log file of a specified length. If you have a Windows web server you could run it directly on there (this is how I do it), or run it on your Cumulus computer and get Cumulus to upload the log file periodically.
**realtimeCumulus.htm & realtimeLogParser go on to your web server

**
Alternatively Kevin at [http://cumulus.tnetweather.com/projects/ TNET Weather] has created a PHP script to create such a log file. The batch file is simple and creates a limited length log file, the TNET scripts typically create much larger log files, and the realtimeLogParser.php script I have written returns all the entries it finds in the file. It would require amendment to work with the larger TNET logs.

Revision as of 21:14, 28 November 2012

Name: Realtime_Highchart
Type: PHP,AJAX
Author: Mark Crossley
Contact: 'MCrossley' via the forum
Last update: 28 November 2012
Version: 0.1

Dynamically Updating a Highcharts Graph from Realtime.txt

This page describes how to implement a simple dynamically updating chart using Highcharts, PHP, realtime.txt, and AJAX.

Requirements

The web server must have..

  • PHP
  • Cumulus Realtime.txt


Installation

Next you have to decide where and how the realtime log file will be created. The zip file contains a simple Windows batch file that will create a log file of a specified length. If you have a Windows web server you could run it directly on there (this is how I do it), or run it on your Cumulus computer and get Cumulus to upload the log file periodically.

Alternatively Kevin at TNET Weather has created a PHP script to create such a log file. The batch file is simple and creates a limited length log file, the TNET scripts typically create much larger log files, and the realtimeLogParser.php script I have written returns all the entries it finds in the file. It would require amendment to work with the larger TNET logs.