
requirejs.config({
	paths: {
		'jquery': './lib/components/jquery/dist/jquery.min'
	}
});

require( [ 'src/graph' ] , function( Graph ) {

	var functions = [

function( domGraph, domSource ) {

	var g1 = new Graph( domGraph );
	
	var serie = g1.newSerie("serieTest")
					.setLabel( "My serie" )
					.autoAxis()
					.setData( [ [1, 2], [2, 5], [3, 10] ] )
					.showMarkers( true )
					.setMarkerType( 1 );

	var serie = g1.newSerie("serieTest")
					.setLabel( "My serie 2" )
					.autoAxis()
					.setData( [ [2, 4], [3, 1], [5, 20] ] )
					.setLineColor('red');


	var legend = g1.makeLegend({
		frame: true,
		frameWidth: 1,
		frameColor: "green",
		backgroundColor: "blue"
	});

	g1.redraw( );
	g1.drawSeries();	
}

	]



	for( var i = 0, l = functions.length ; i < l ; i ++ ) {

		functions[ i ]("example-1-graph");
		$("#example-1-source").html( functions[ i ].toString() );



	}




} );
@@ -175,19 +175,8 @@
 raph
-, domSource
  ) %7B
@@ -183,17 +183,20 @@
 %0A%0A%09var g
-1
+raph
  = new G
@@ -216,30 +216,21 @@
 h );%0A%09%0A%09
-var serie = g1
+graph
 .newSeri
@@ -236,35 +236,32 @@
 ie(%22serieTest%22)%0A
-%09%09%09
 %09%09.setLabel( %22My
@@ -266,27 +266,24 @@
 My serie%22 )%0A
-%09%09%09
 %09%09.autoAxis(
@@ -276,35 +276,32 @@
 )%0A%09%09.autoAxis()%0A
-%09%09%09
 %09%09.setData( %5B %5B1
@@ -322,27 +322,24 @@
 %5B3, 10%5D %5D )%0A
-%09%09%09
 %09%09.showMarke
@@ -349,19 +349,16 @@
  true )%0A
-%09%09%09
 %09%09.setMa
@@ -378,22 +378,13 @@
 ;%0A%0A%09
-var serie = g1
+graph
 .new
@@ -402,19 +402,16 @@
 eTest%22)%0A
-%09%09%09
 %09%09.setLa
@@ -430,19 +430,16 @@
 ie 2%22 )%0A
-%09%09%09
 %09%09.autoA
@@ -444,19 +444,16 @@
 oAxis()%0A
-%09%09%09
 %09%09.setDa
@@ -486,19 +486,16 @@
 20%5D %5D )%0A
-%09%09%09
 %09%09.setLi
@@ -517,23 +517,13 @@
 %0A%0A%0A%09
-var legend = g1
+graph
 .mak
@@ -621,17 +621,20 @@
 %09%7D);%0A%0A%09g
-1
+raph
 .redraw(
@@ -639,17 +639,20 @@
 w( );%0A%09g
-1
+raph
 .drawSer
@@ -662,16 +662,18 @@
 ();%09%0A%7D%0A%0A
+%0A%0A
 %09%5D%0A%0A%0A%0A%09f

Update script for the beauty of it