tiny-vis.js - Canvas Visualisation for tinyJS

tiny-vis.js allows the Visualisation of statistical Data in Canvas.

Download

tiny-vis.js [?b] - tiny-vis-min.js.gz [?b]

Hint

The t.vis-System requires only tiny.js. In Internet Explorer, the lack of Support for Canvas can be compensated through solutions like iecanvas or chromeframe. Other scripts are not necessary.

Usage

The t.vis-Function receives its Data inside an Object and returns a Visualisation-Object.

Options-Object

The Options-Object will be saved inside the .opts-Property gespeichert and can be manipulated anytime.

Visualisation methods

.render, .append, .replace, .draw, .color, .box, .pie, .map

Additional Methods can be written inside the prototype "t.vis._".

Beispiel

Alas no Canvas available...   Alas no Canvas available...

 

Code

var test=t.vis({type:'pie', width:200, height:200, canvas:document.getElementById('chart'),
    data:[10, 25, 185, 49, 100, 27.5, 47.2],
    colors:{0:[64,0,0,1], 10:[255,0,0,1], 50:[192,192,0,1], 85:[0,127,255,1], 100:[0,0,255,1]},
    helplines:{color:'rgba(192,192,192,0.5)', interval:10},
    stroke:{width:0.5, color:'rgba(255,255,255,0.5)'}});