donatj/ticker-graph

Simple JavaScript Ticker Graph using the Quorum JS Installer

Installs: 61 610

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0

Language:TypeScript

Type:quorum-js

v0.2.2 2019-09-05 19:09 UTC

This package is auto-updated.

Last update: 2020-01-29 16:58:11 UTC


README

npm version

Ticker Image Example

Simple JavaScript Real Time "Ticker Graph"

Requires no external libraries. It is require-able with RequireJS but RequireJS is by no means required.

Dead simple, should work in any browser that supports the <canvas> tag.

Here are some more examples.

Features

  • Auto Scales to min and max values.
  • Color set-able per column via callback.

Dead Simple Example

To output a simple sine wave like so: Small Ticker Sine Wave Example

<script src="src/TickerGraph.js"></script>
<canvas id="cv" width="100" height="40"></canvas>
<script>
	var t = new TickerGraph( document.getElementById("cv") );
	var i = 0;
	setInterval(function(){
		t.push( Math.sin(i++ / 10) );
	}, 20);
</script>