removed player numbers from graph

This commit is contained in:
User 2019-03-13 20:31:09 +01:00
parent 725198e4c9
commit 078773852b
3 changed files with 10 additions and 23 deletions

View File

@ -45,8 +45,7 @@ def make_html(name,period):
with open('template.html', 'r') as fin: with open('template.html', 'r') as fin:
with open(name+'.html', 'w') as fout: with open(name+'.html', 'w') as fout:
fout.write(fin.read().format( fout.write(fin.read().format(
outer_width = display_scale*period+10, width = display_scale*period,
inner_width = display_scale*period,
start = start, start = start,
period = period, period = period,
day_start = scale*datetime.fromtimestamp(start/scale).replace(hour=0,minute=0,second=0,microsecond=0).timestamp(), day_start = scale*datetime.fromtimestamp(start/scale).replace(hour=0,minute=0,second=0,microsecond=0).timestamp(),

14
svg.css
View File

@ -1,13 +1,11 @@
.overflow {
overflow-x: auto;
max-width: 100%;
}
#graph { #graph {
background-color: #EEE; background-color: #EEE;
} transform: scaleY(-1);
#events {
transform: scaleY(-1) translateY(-100%);
}
text {
dominant-baseline: central;
} }
#days { #days {

View File

@ -11,21 +11,11 @@
<a href="month.html">last month</a> <a href="month.html">last month</a>
<a href="4months.html">last 4 months</a> <a href="4months.html">last 4 months</a>
</nav> </nav>
<svg id='graph' height='200' width='{outer_width}' viewBox='0 10 {outer_width} 200' version='1.1' xmlns='http://www.w3.org/2000/svg'> <div class="overflow">
<text y='200'>0</text> <svg id='graph' width='{width}' height='200' viewBox='{start} -0.5 {period} 10' preserveAspectRatio='none' version='1.1' xmlns='http://www.w3.org/2000/svg'>
<text y='180'>1</text>
<text y='160'>2</text>
<text y='140'>3</text>
<text y='120'>4</text>
<text y='100'>5</text>
<text y= '80'>6</text>
<text y= '60'>7</text>
<text y= '40'>8</text>
<text y= '20'>9</text>
<svg id='events' x='10' y='-10' width='{inner_width}' height='100%' preserveAspectRatio='none' viewBox='{start} -0.5 {period} 10'>
<line id='days' x1='{day_start}' x2='{day_stop}'></line> <line id='days' x1='{day_start}' x2='{day_stop}'></line>
{events} {events}
</svg> </svg>
</svg> </div>
</body> </body>
</html> </html>