start on real code, add fav to remove error, remove sourcemap
This commit is contained in:
parent
345a5ff8bc
commit
477802abac
Binary file not shown.
BIN
fan_control/data/favicon.ico
Normal file
BIN
fan_control/data/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 952 B |
@ -10,25 +10,28 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1> Weekly </h1>
|
<h1> Weekly </h1>
|
||||||
<div class="ct-chart chart1"></div>
|
<div class="ct-chart chart1"></div>
|
||||||
<h1> Monthly </h1>
|
<h1> Monthly </h1>
|
||||||
<div class="ct-chart chart2"></div>
|
<div class="ct-chart chart2"></div>
|
||||||
<script >
|
<script >
|
||||||
function draw_chart(){
|
function load_charts(){
|
||||||
var data = {
|
var xhttp = new XMLHttpRequest();
|
||||||
// Our series array that contains series objects or in this case series data arrays
|
xhttp.onreadystatechange = function() {
|
||||||
series: [
|
if (this.readyState == 4 && this.status == 200) {
|
||||||
[5, 2, 4, 2, 0]
|
console.log(this.responseText);
|
||||||
]
|
var series = [5, 2, 4, 2, 0] ; // JSON.parse(this.responseText);
|
||||||
};
|
var data = { series: [ series ] };
|
||||||
weekly = new Chartist.Line('.chart1', data);
|
new Chartist.Line('.chart1', data);
|
||||||
monthly = new Chartist.Line('.chart2', data);
|
}
|
||||||
};
|
}
|
||||||
|
xhttp.open("GET", "/data", true);
|
||||||
</script>
|
xhttp.send();
|
||||||
<script onload="draw_chart();" src="./chartist.min.js.gz"> </script>
|
};
|
||||||
|
//monthly = new Chartist.Line('.chart2', data);
|
||||||
|
</script>
|
||||||
|
<script onload="load_charts();" src="/chartist.min.js.gz"> </script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user