Created
November 23, 2015 10:10
-
-
Save shobhitchittora/27e4b9254161aeebc96a to your computer and use it in GitHub Desktop.
Chart template golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<script src="Chart.min.js" type="text/javascript"> | |
if(typeof Chart == 'undefined'){ | |
console.log("ALERT"); | |
alert("ALLLLL"); | |
} | |
</script> | |
<center> | |
<table border="1px solid black"> | |
{{range .}} | |
<tr> | |
<td> | |
{{.ID}} | |
</td> | |
<td> | |
{{.TeamID}} | |
</td> | |
{{range .Gold}} | |
<td> | |
{{.}} | |
</td> | |
{{end}} | |
</tr> | |
{{end}} | |
</table> | |
</center> | |
<script> | |
var data = { | |
labels: ["January", "February", "March", "April", "May", "June", "July"], | |
datasets: [ | |
{ | |
label: "My First dataset", | |
fillColor: "rgba(220,220,220,0.2)", | |
strokeColor: "rgba(220,220,220,1)", | |
pointColor: "rgba(220,220,220,1)", | |
pointStrokeColor: "#fff", | |
pointHighlightFill: "#fff", | |
pointHighlightStroke: "rgba(220,220,220,1)", | |
data: [65, 59, 80, 81, 56, 55, 40] | |
}, | |
{ | |
label: "My Second dataset", | |
fillColor: "rgba(151,187,205,0.2)", | |
strokeColor: "rgba(151,187,205,1)", | |
pointColor: "rgba(151,187,205,1)", | |
pointStrokeColor: "#fff", | |
pointHighlightFill: "#fff", | |
pointHighlightStroke: "rgba(151,187,205,1)", | |
data: [28, 48, 40, 19, 86, 27, 90] | |
} | |
] | |
}; | |
var ctx = document.getElementById("myChart").getContext("2d"); | |
new Chart(ctx).PolarArea(data); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment