started working on a website dashboard
This commit is contained in:
parent
c134135d4e
commit
d4764515af
@ -14,7 +14,7 @@ import persistence.rw
|
|||||||
class ClockFace(object):
|
class ClockFace(object):
|
||||||
"""Actual functions one might need for a clock"""
|
"""Actual functions one might need for a clock"""
|
||||||
|
|
||||||
def __init__(self, text_speed=15):
|
def __init__(self, text_speed=18):
|
||||||
self.IO = led.OutputHandler(32,16)
|
self.IO = led.OutputHandler(32,16)
|
||||||
self.tspeed = text_speed
|
self.tspeed = text_speed
|
||||||
|
|
||||||
|
1
dashboard/__init__.py
Normal file
1
dashboard/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Placeholder
|
0
dashboard/main.py
Normal file
0
dashboard/main.py
Normal file
42
dashboard_wrapper.py
Normal file
42
dashboard_wrapper.py
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import dash
|
||||||
|
from flask import Flask
|
||||||
|
import dash_core_components as dcc
|
||||||
|
import dash_html_components as html
|
||||||
|
import plotly.graph_objs as go
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
|
||||||
|
|
||||||
|
server = Flask(__name__)
|
||||||
|
app = dash.Dash(__name__, server=server, external_stylesheets = external_stylesheets)
|
||||||
|
|
||||||
|
np.random.seed(101)
|
||||||
|
random_x = np.linspace(1,5,20)
|
||||||
|
random_y = np.exp(random_x)
|
||||||
|
|
||||||
|
|
||||||
|
app.layout = html.Div(children = [
|
||||||
|
html.H1("Hello wolrd!"),
|
||||||
|
dcc.Graph(
|
||||||
|
id="scatter",
|
||||||
|
figure = {
|
||||||
|
"data" : [
|
||||||
|
go.Scatter(
|
||||||
|
x = random_x,
|
||||||
|
y = random_y,
|
||||||
|
mode="markers"
|
||||||
|
)
|
||||||
|
],
|
||||||
|
"layout" : go.Layout(
|
||||||
|
title="This is a test",
|
||||||
|
xaxis={"title" : "x"},
|
||||||
|
yaxis={"title" : "y"}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run_server(host="0.0.0.0")
|
Loading…
x
Reference in New Issue
Block a user