Page 1 of 1

AJAX Datalog Graph

Posted: Tue May 21, 2013 2:05 pm
by dciliske
Someone was asking about doing dynamic graphs over AJAX from logfile data. This example gives a framework for doing that.

AJAX Graph example

This example demostrates the code to create a webpage with a dynamic graph,
generated by data from the Netburner device. Specifically, it has been
designed to imitate the data formats found in log files, where ordering and
frequency are varied between data sources.

The vast majority of the example is simply the support code needed to
generate the random data. This code is located in the other support files.
The locations that actually are relevant to the AJAX portion of the example
are:
main.cpp:
getSensorData()
DumpLogData()
data.html:
<!--CPPCALL getSensorData() -->
index.html:
Basically, all the Javascript.

Netburner, Inc.
version 1.0
2013-05-21