Line Chart

Pre-requisites

<script src="/SCG/mootools.js" type="text/javascript"></script>
<script src="/SCG/mootools-more.js" type="text/javascript"></script>
<script src="/SCG/raphael.js" type="text/javascript"></script>
<script src="/SCG/src/format.js" type="text/javascript"></script>
<script src="/SCG/src/chart.js" type="text/javascript"></script>
<script src="/SCG/src/linechart.js" type="text/javascript"></script>

Line charts are a simple form of Chart for SCG and are based around two arrays, a data array and a labels array.

The data array defines the numerical values for the chart, the labels array defines the corresponding
labels for those values.

For example:

window.addEvent( 'domready', function(){
	new SCGLinechart( 'test', {
		yaxis: 'thingies',
		data: [ 
			112312312330, 
			-212312310, 
			12312312330, 
			-1342424344, 
			13245253329, 
			432423447, 
			1123123339,
			2123335433, 
			-1213123473 
		],
		labels: [ 
			'label1', 
			'label2', 
			'label3', 
			'label4', 
			'label5', 
			'label6', 
			'label7', 
			'label8', 
			'label9' 
		]
	});
});