diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-01-15 00:13:24 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-01-15 00:13:24 +0100 |
| commit | 91cb0aafaf20c0923e44ce058e1740a2e2804876 (patch) | |
| tree | dc3390e7d79f29871737fa25361542ee3ef2e6ab /examples/dashboard/templates/index.html | |
| parent | c70a290673467379230c327a713a4776df5abb6f (diff) | |
| download | python-gamelocker-91cb0aafaf20c0923e44ce058e1740a2e2804876.tar.gz python-gamelocker-91cb0aafaf20c0923e44ce058e1740a2e2804876.zip | |
hack a quick&dirty flask example
Diffstat (limited to 'examples/dashboard/templates/index.html')
| -rw-r--r-- | examples/dashboard/templates/index.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/examples/dashboard/templates/index.html b/examples/dashboard/templates/index.html new file mode 100644 index 0000000..ead4fdd --- /dev/null +++ b/examples/dashboard/templates/index.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta charset="utf-8"> + <title>Vainglory API demo</title> + </head> + <body> + <div id="gameType" style="height: 100%; width: 400px;"></div> + <div id="players" style="height: 100%; width: 400px;"></div> + <div id="picks" style="height: 100%; width: 400px;"></div> + <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> + <script src="http://code.highcharts.com/highcharts.js"></script> + <script> + $(function () { + Highcharts.chart("gameType", { + chart: { + type: "pie" + }, + title: { + text: "Game modes over the last {{ number }} matches" + }, + series: [{ + data: {{ gameModes|tojson|safe }} + }] + }); + Highcharts.chart("players", { + chart: { + type: "bar" + }, + xAxis: { + categories: ["matches"] + }, + title: { + text: "Most active players" + }, + series: {{ players|tojson|safe }} + }); + Highcharts.chart("picks", { + chart: { + type: "column" + }, + title: { + text: "Popular picks" + }, + plotOptions: { + column: { + stacking: "normal" + } + }, + xAxis: { + categories: {{ heroes|tojson|safe }} + }, + series: {{ picks|tojson|safe }} + }); + }); + </script> + </body> +</html> |
