diff --git a/js.go b/js.go index 8762e17..4ca9693 100644 --- a/js.go +++ b/js.go @@ -1,3 +1,6 @@ +// +// Don't modify the file +// package main const Chartjs = `var Chart=function(s){function v(a,c,b){a=A((a-c.graphMin)/(c.steps*c.stepValue),1,0);return b*c.steps*a}function x(a,c,b,e){function h(){g+=f;var k=a.animation?A(d(g),null,0):1;e.clearRect(0,0,q,u);a.scaleOverlay?(b(k),c()):(c(),b(k));if(1>=g)D(h);else if("function"==typeof a.onAnimationComplete)a.onAnimationComplete()}var f=a.animation?1/A(a.animationSteps,Number.MAX_VALUE,1):1,d=B[a.animationEasing],g=a.animation?0:1;"function"!==typeof c&&(c=function(){});D(h)}function C(a,c,b,e,h,f){var d;a= diff --git a/server.go b/server.go index 36caca0..fb9e4e0 100644 --- a/server.go +++ b/server.go @@ -8,25 +8,24 @@ import ( const html = `{{define "T"}} - - Line Chart - - - - - + + +
{{.Canvas}} - + {{end}} ` @@ -62,10 +61,10 @@ func handler(w http.ResponseWriter, r *http.Request) { } else { chart = ChartHandlers[prop.Name] - canvas := chart.Canvas("test", prop.Height, prop.Width) + canvas := chart.Canvas("line", prop.Height, prop.Width) Args["Canvas"] = canvas - newChart := chart.NewChart("test") + newChart := chart.NewChart("line") Args["NewChart"] = newChart if json, err := chart.JsonCode(c); err != nil {