Compare commits
2 Commits
5faa74daa9
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
f8b39f16f2 | |
|
|
a92a125154 |
2
.envrc
2
.envrc
|
|
@ -1,2 +1,2 @@
|
|||
export FLASK_APP=app
|
||||
export FLASK_APP="app:create_app()"
|
||||
export FLASK_DEBUG=1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
yarn
|
||||
yarn install
|
||||
yarn build
|
||||
source .envrc
|
||||
flask digest clean
|
||||
flask db upgrade
|
||||
flask run
|
||||
|
|
@ -58,9 +58,13 @@ def gen_graph_data(numbers):
|
|||
dots = [absolute_to_percentage_position(
|
||||
n, scale_base) for n in numbers]
|
||||
lines = list(zip(dots, dots[1:]))
|
||||
avg = sum(dots)/len(dots)
|
||||
print(dots)
|
||||
print(avg)
|
||||
|
||||
return {
|
||||
"dots": dots,
|
||||
"lines": lines,
|
||||
"scale": scale,
|
||||
"avg": avg,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ class SettingsForm(FlaskForm):
|
|||
'Start of day hour',
|
||||
widget=NumberInput(min=0, max=23),
|
||||
validators=[
|
||||
DataRequired(),
|
||||
NumberRange(min=0, max=23)
|
||||
]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
{% for n in scale %}
|
||||
<line x1="10%" y1="{{ 16.6 * loop.index }}%" x2="96%" y2="{{ 16.6 * loop.index }}%" stroke="#ddd" stroke-width="2px" />
|
||||
{% endfor %}
|
||||
<line x1="10%" y1="{{ avg }}%" x2="96%" y2="{{ avg }}%" stroke="#89f393" stroke-width="2px" />
|
||||
</g>
|
||||
<g class="legend" style="font-size: 0.9em; text-align:right;">
|
||||
{% for n in scale | reverse %}
|
||||
|
|
|
|||
Loading…
Reference in New Issue