I've made it, with contribution to all here.. (source: graph.js vs 1.3.2, 20-aug-2013).
See attached graph.js
Use as:
<div id="mygraph"></div>
<p id="range"></p>
<p id="info"></p>
with within <script type="text/javascript">..</script>
...
var graphdata = {};
...
graphdata['dataset'+i] = {
'label': 'graph '+i,
'data': []
};
...
var shapes = new Array("cross", "circle", "square", "triangle");
graphdata[ 'dataset'+i ].data.push({
'date' : new Date((val['datetime']+gmtoffset)*1000),
'value': new Number(val['value']),
'title': 'hint text here', /* if used text inside a box with line or given color else default date + value hint */
'text' : 'html as is text here', /* if used no preformat as title has and suppresses title */
'shape': shapes[ val['shapeindex'] ],
'shapesize': val['shapesize'],
'shapecolor': val['shapecolorindexorvalue'],
'color': '#FF0000' /* hint text color optional */
});
...
var options = {
'width': '100%',
'height': '350px'
};
// Instantiate our graph object.
var graph = new links.Graph(document.getElementById('mygraph'));
// Draw our graph with the created data and options
var gd = [];
for (i=0; i<nrofdatasets; i++) {
gd.push( graphdata[ 'dataset'+i ] );
}
graph.draw( gd, options);
Op donderdag 16 januari 2014 15:11:18 UTC+1 schreef C Knook: