Updated examples
This commit is contained in:
parent
25d797ea3b
commit
ea6ea52fb4
@ -10,15 +10,12 @@
|
|||||||
</head>
|
</head>
|
||||||
<body onload="">
|
<body onload="">
|
||||||
<div id="holder"></div>
|
<div id="holder"></div>
|
||||||
<script type="text/javascript" src="https://raw.githubusercontent.com/Phyks/timeline.js/master/timeline.js"></script>
|
<script type="text/javascript" src="../timeline.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
SVG.init({'id': 'holder', 'height': '100%', 'width': '100%', 'grid': 'both', 'x_axis': true, 'rounded': false, 'x_callback': false});
|
SVG.init({'id': 'holder', 'height': '100%', 'width': '100%', 'grid': 'both', 'x_axis': true, 'line': 'line', 'rounded': false, 'fill': true, 'x_callback': false});
|
||||||
|
|
||||||
SVG.addGraph('test', 'red');
|
SVG.addGraph('test', 'red');
|
||||||
SVG.addPoints('test', [{'x':200, 'y':50, 'label':'%x : %y test'},{'x':75, 'y':100, 'label':'%x : %y test2'},{'x':150,'y':25, 'label':'%x : %y test3'},{'x':175, 'y':-200, 'label':'%x : %y test4'},{'x':125, 'y':75, 'label':'%x : %y µg/m<sup>3</sup>'},{'x':225, 'y':-220, 'label':'%x : %y test4'}]);
|
SVG.addPoints('test', [{'x':200, 'y':50, 'label':'%x : %y test. Click me !', 'click': function() { alert('Hello World…'); }},{'x':75, 'y':100, 'label':'%x : %y test2'},{'x':150,'y':25, 'label':'%x : %y test3'},{'x':175, 'y':-200, 'label':'%x : %y test4'},{'x':125, 'y':75, 'label':'%x : %y µg/m<sup>3</sup>'},{'x':225, 'y':-220, 'label':'%x : %y test4'}]);
|
||||||
|
|
||||||
SVG.addGraph('test2', 'blue');
|
|
||||||
SVG.addPoints('test2', [{'x':180, 'y':50, 'label':'%x : %y test'},{'x':120, 'y':100, 'label':'%x : %y test2'},{'x':160,'y':25, 'label':'%x : %y test3'},{'x':150, 'y':-200, 'label':'%x : %y test4'},{'x':100, 'y':75, 'label':'%x : %y µg/m<sup>3</sup>'},{'x':200, 'y':-220, 'label':'%x : %y test4'}]);
|
|
||||||
|
|
||||||
SVG.draw();
|
SVG.draw();
|
||||||
</script>
|
</script>
|
||||||
|
@ -10,12 +10,15 @@
|
|||||||
</head>
|
</head>
|
||||||
<body onload="">
|
<body onload="">
|
||||||
<div id="holder"></div>
|
<div id="holder"></div>
|
||||||
<script type="text/javascript" src="https://raw.githubusercontent.com/Phyks/timeline.js/master/timeline.js"></script>
|
<script type="text/javascript" src="../timeline.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
SVG.init({'id': 'holder', 'height': '100%', 'width': '100%', 'grid': 'both', 'x_axis': true, 'rounded': false, 'x_callback': false});
|
SVG.init({'id': 'holder', 'height': '100%', 'width': '100%', 'grid': 'both', 'x_axis': true, 'line': 'line', 'rounded': false, 'fill': true, 'x_callback': false});
|
||||||
|
|
||||||
SVG.addGraph('test', 'red');
|
SVG.addGraph('test', 'red');
|
||||||
SVG.addPoints('test', [{'x':200, 'y':50, 'label':'%x : %y test. Click me !', 'click': function() { alert('Hello World…'); }},{'x':75, 'y':100, 'label':'%x : %y test2'},{'x':150,'y':25, 'label':'%x : %y test3'},{'x':175, 'y':-200, 'label':'%x : %y test4'},{'x':125, 'y':75, 'label':'%x : %y µg/m<sup>3</sup>'},{'x':225, 'y':-220, 'label':'%x : %y test4'}]);
|
SVG.addPoints('test', [{'x':200, 'y':50, 'label':'%x : %y test'},{'x':75, 'y':100, 'label':'%x : %y test2'},{'x':150,'y':25, 'label':'%x : %y test3'},{'x':175, 'y':-200, 'label':'%x : %y test4'},{'x':125, 'y':75, 'label':'%x : %y µg/m<sup>3</sup>'},{'x':225, 'y':-220, 'label':'%x : %y test4'}]);
|
||||||
|
|
||||||
|
SVG.addGraph('test2', 'blue');
|
||||||
|
SVG.addPoints('test2', [{'x':180, 'y':50, 'label':'%x : %y test'},{'x':120, 'y':100, 'label':'%x : %y test2'},{'x':160,'y':25, 'label':'%x : %y test3'},{'x':150, 'y':-200, 'label':'%x : %y test4'},{'x':100, 'y':75, 'label':'%x : %y µg/m<sup>3</sup>'},{'x':200, 'y':-220, 'label':'%x : %y test4'}]);
|
||||||
|
|
||||||
SVG.draw();
|
SVG.draw();
|
||||||
</script>
|
</script>
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
</head>
|
</head>
|
||||||
<body onload="">
|
<body onload="">
|
||||||
<div id="holder"></div>
|
<div id="holder"></div>
|
||||||
<script type="text/javascript" src="https://raw.githubusercontent.com/Phyks/timeline.js/master/timeline.js"></script>
|
<script type="text/javascript" src="../timeline.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
SVG.init({'id': 'holder', 'height': '100%', 'width': '100%', 'grid': 'both', 'x_axis': true, 'rounded': true, 'x_callback': false});
|
SVG.init({'id': 'holder', 'height': '100%', 'width': '100%', 'grid': 'both', 'x_axis': true, 'line': 'line', 'rounded': true, 'fill': true, 'x_callback': false});
|
||||||
|
|
||||||
SVG.addGraph('test', 'red');
|
SVG.addGraph('test', 'red');
|
||||||
SVG.addPoints('test', [{'x':200, 'y':50, 'label':'%x : %y test. Click me !', 'click': function() { alert('Hello World…'); }},{'x':75, 'y':100, 'label':'%x : %y test2'},{'x':150,'y':25, 'label':'%x : %y test3'},{'x':175, 'y':-200, 'label':'%x : %y test4'},{'x':125, 'y':75, 'label':'%x : %y µg/m<sup>3</sup>'},{'x':225, 'y':-220, 'label':'%x : %y test4'}]);
|
SVG.addPoints('test', [{'x':200, 'y':50, 'label':'%x : %y test'},{'x':75, 'y':100, 'label':'%x : %y test2'},{'x':150,'y':25, 'label':'%x : %y test3'},{'x':175, 'y':-200, 'label':'%x : %y test4'},{'x':125, 'y':75, 'label':'%x : %y µg/m<sup>3</sup>'},{'x':225, 'y':-220, 'label':'%x : %y test4'}]);
|
||||||
|
|
||||||
SVG.draw();
|
SVG.draw();
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user