All Projects → lfittl → pgdatagraph

lfittl / pgdatagraph

Licence: BSD-3-Clause License
Interactive widget for graphing time-series data - based on D3 and Rickshaw.

Programming Languages

coffeescript
4710 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language

pgdatagraph

Screenshot of pgdatagraph

Interactive widget for graphing time-series data - based on D3 and Rickshaw.

Note that the repository is structured as a Ruby gem. If you don't use this as a library inside a Ruby project just copy the code from app/assets to your project directory.

Example Use

The following Javascript renders a datagraph into the #cpu_graph element

new PG.DataGraph("#cpu_graph.datagraph", "https://yourapp.com/data/cpu_graph");

The server should return a JSON time series on GET, structured like this and sorted chronologically:

callbackFunction({"Label 1":[[1383257416,0.95],[1383258014,0.96]], "Label 2":[[1383257416,8.77],[1383258014,0.0]]})

There is three GET parameters we send:

  • callback: Name of the callback function
  • start: Requested start timestamp (UNIX timestamp)
  • end: Requested end timestamp (UNIX timestamp)

Authors

License

Copyright (c) 2013-2014 pganalyze

pgdatagraph is licensed under the 3-clause BSD license, see LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].