add mini static graph, no data, and not working with file anymore. Otherwise good
This commit is contained in:
parent
d3cd83acc1
commit
345a5ff8bc
BIN
fan_control/data/chartist.min.css.gz
Normal file
BIN
fan_control/data/chartist.min.css.gz
Normal file
Binary file not shown.
34
fan_control/data/index.html
Normal file
34
fan_control/data/index.html
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>My first Chartist Tests</title>
|
||||||
|
<link rel="stylesheet" href="chartist.min.css.gz">
|
||||||
|
<style>
|
||||||
|
.ct-chart{
|
||||||
|
width: 90%;
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1> Weekly </h1>
|
||||||
|
<div class="ct-chart chart1"></div>
|
||||||
|
<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]
|
||||||
|
]
|
||||||
|
};
|
||||||
|
weekly = new Chartist.Line('.chart1', data);
|
||||||
|
monthly = new Chartist.Line('.chart2', data);
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script onload="draw_chart();" src="./chartist.min.js.gz"> </script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -25,7 +25,7 @@ String getContentType(String filename){
|
|||||||
|
|
||||||
bool handleFileRead(String path ){
|
bool handleFileRead(String path ){
|
||||||
DBG_OUTPUT_PORT.println("handleFileRead: " + path);
|
DBG_OUTPUT_PORT.println("handleFileRead: " + path);
|
||||||
if(path.endsWith("/")) path += "index.htm";
|
if(path.endsWith("/")) path += "index.html";
|
||||||
String contentType = getContentType(path);
|
String contentType = getContentType(path);
|
||||||
String pathWithGz = path + ".gz";
|
String pathWithGz = path + ".gz";
|
||||||
if(LittleFS.exists(pathWithGz) || LittleFS.exists(path)){
|
if(LittleFS.exists(pathWithGz) || LittleFS.exists(path)){
|
||||||
|
Loading…
Reference in New Issue
Block a user