var mathChart = {
	var insertchart = function(canvas,data)
	{
		var xmlns="https://www.w3.org/2000/svg"
		var svg = document.createElementNS(xmlns,"svg");
		svg.height = canvas.clientHeight;
		svg.width = canvas.clientWidth;
		var path = generatePath(svg,data);
		for(var i=0; i<path.length; ++i)
		{
			svg.appendChild(path[i]);
		}
		canvas.appendChild(svg);
	};
	
	var generatePath(svg, data)
	{
		
	}
}

@@ -1,12 +1,143 @@
+/*%0A%09mathChart.js %0A%09author: corehello(corehello@gmail.com)%0A%09data = %0A%09%7B%0A%09%09range : %5B%5B0,1%5D,%5B2,3%5D%5D;%0A%09%09data : %5B%5B1,2%5D,%5B2,3%5D,...%5D;%0A%09%7D%0A*/%0A%0A%0A
 var mathChar
@@ -227,16 +227,17 @@
 000/svg%22
+;
 %0A%09%09var s
@@ -505,24 +505,35 @@
 generatePath
+ = function
 (svg, data)%0A
@@ -537,14 +537,429 @@
 a)%0A%09%7B%0A%09%09
+var paths=%5B%5D%0A%09%09for(i=0; i%3Cdata.data.length; ++i)%0A%09%09%7B%0A%09%09%09var dd = %22%22%0A%09%09%09if(i == 0)%0A%09%09%09%7B%0A%09%09%09%09dd = dd + %22M %22+ data.data%5Bi%5D.join(%22 %22);%0A%09%09%09%7D%0A%09%09%09else%0A%09%09%09%7B%0A%09%09%09%09dd = dd + %22L %22+ data.data%5Bi%5D.join(%22 %22);%0A%09%09%09%7D%0A%09%09%09path = document.createElementNS(%22xmlns%22,%22path%22);%0A%09%09%09path.setAttribute(%22d%22, dd);%0A%09%09%09path.setAttribute(%22stroke%22, data.color);%0A%09%09%09path.setAttribute(%22stroke-width%22, data.width);%0A%09%09%09paths.push(path);%0A%09%09%7D%0A%09%09return paths;
 %0A%09%7D%0A%7D%0A

Write the function to generate every path according to the data