Compare commits
No commits in common. "eb70dc325afbf8034650e9879b6b7379ba912edb" and "b18dfd81a5f8570af95536f9276ff1e4d6214215" have entirely different histories.
eb70dc325a
...
b18dfd81a5
|
|
@ -58,13 +58,9 @@ def gen_graph_data(numbers):
|
||||||
dots = [absolute_to_percentage_position(
|
dots = [absolute_to_percentage_position(
|
||||||
n, scale_base) for n in numbers]
|
n, scale_base) for n in numbers]
|
||||||
lines = list(zip(dots, dots[1:]))
|
lines = list(zip(dots, dots[1:]))
|
||||||
avg = sum(dots)/len(dots)
|
|
||||||
print(dots)
|
|
||||||
print(avg)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"dots": dots,
|
"dots": dots,
|
||||||
"lines": lines,
|
"lines": lines,
|
||||||
"scale": scale,
|
"scale": scale,
|
||||||
"avg": avg,
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
{% for n in scale %}
|
{% for n in scale %}
|
||||||
<line x1="10%" y1="{{ 16.6 * loop.index }}%" x2="96%" y2="{{ 16.6 * loop.index }}%" stroke="#ddd" stroke-width="2px" />
|
<line x1="10%" y1="{{ 16.6 * loop.index }}%" x2="96%" y2="{{ 16.6 * loop.index }}%" stroke="#ddd" stroke-width="2px" />
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<line x1="10%" y1="{{ avg }}%" x2="96%" y2="{{ avg }}%" stroke="#c5f0c6" stroke-width="2px" />
|
|
||||||
</g>
|
</g>
|
||||||
<g class="legend" style="font-size: 0.9em; text-align:right;">
|
<g class="legend" style="font-size: 0.9em; text-align:right;">
|
||||||
{% for n in scale | reverse %}
|
{% for n in scale | reverse %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue