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 |
@ -16,19 +16,22 @@
|
||||
<h1> Monthly </h1>
|
||||
<div class="ct-chart chart2"></div>
|
||||
<script >
|
||||
function draw_chart(){
|
||||
var data = {
|
||||
// Our series array that contains series objects or in this case series data arrays
|
||||
series: [
|
||||
[5, 2, 4, 2, 0]
|
||||
]
|
||||
function load_charts(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
console.log(this.responseText);
|
||||
var series = [5, 2, 4, 2, 0] ; // JSON.parse(this.responseText);
|
||||
var data = { series: [ series ] };
|
||||
new Chartist.Line('.chart1', data);
|
||||
}
|
||||
}
|
||||
xhttp.open("GET", "/data", true);
|
||||
xhttp.send();
|
||||
};
|
||||
weekly = new Chartist.Line('.chart1', data);
|
||||
monthly = new Chartist.Line('.chart2', data);
|
||||
};
|
||||
|
||||
//monthly = new Chartist.Line('.chart2', data);
|
||||
</script>
|
||||
<script onload="draw_chart();" src="./chartist.min.js.gz"> </script>
|
||||
<script onload="load_charts();" src="/chartist.min.js.gz"> </script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user