forked from OrgGo/goplot
fix tab
This commit is contained in:
parent
e96da1f860
commit
531d19f530
3
js.go
3
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=
|
||||
|
|
|
@ -9,7 +9,6 @@ const html = `{{define "T"}}
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Line Chart</title>
|
||||
<script>
|
||||
{{.Chartjs}}
|
||||
</script>
|
||||
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue