Private
Public Access
1
0

smaller filter and chart on list workouts

This commit is contained in:
Sander Roosendaal
2018-10-19 13:51:48 +02:00
parent 90264a562c
commit 35b936b6fe
3 changed files with 38 additions and 33 deletions

View File

@@ -313,7 +313,8 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
p.legend.location = "top_left"
p.legend.background_fill_alpha = 0.7
p.sizing_mode = 'scale_width'
# p.sizing_mode = 'scale_width'
p.sizing_mode = 'stretch_both'
p.yaxis.axis_label = 'Minutes'
@@ -3104,7 +3105,7 @@ def interactive_flex_chart2(id=0,promember=0,
plot.title.text = row.name
plot.title.text_font_size=value("1.0em")
plot.sizing_mode = 'scale_width'
plot.xaxis.axis_label = xaxlabel
plot.yaxis.axis_label = yaxlabel
@@ -3338,17 +3339,21 @@ def interactive_flex_chart2(id=0,promember=0,
title="Max Distance",callback=callback)
callback.args["maxdist"] = slider_dist_max
layout = layoutrow([layoutcolumn([annotation,
thesliders = layoutcolumn([annotation,
slider_spm_min,
slider_spm_max,
slider_dist_min,
slider_dist_max,
slider_work_min,
slider_work_max,
],
),
])
thesliders.sizing_mode = 'scale_width'
layout = layoutrow([thesliders,
plot])
# layout.sizing_mode = 'scale_width'
layout.sizing_mode = 'scale_width'
script, div = components(layout)
@@ -3795,7 +3800,7 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
# add watermark
plot.extra_y_ranges = {"watermark": watermarkrange}
plot.extra_x_ranges = {"watermark": watermarkrange}
plot.sizing_mode = 'scale_width'
plot.sizing_mode = 'stretch_both'
plot.image_url([watermarkurl],0.05,0.9,
watermarkw,watermarkh,

View File

@@ -24,7 +24,7 @@
<ul class="main-content">
<li class="grid_4">
<div id="theplot" class="flexplot">
<div id="theplot" class="flexplot" style="min-width:300px;">
{{ the_div|safe }}
</div>
</li>

View File

@@ -48,32 +48,41 @@ xo
}
</style>
{% if team %}
<h1>{{ team.name }} Team Workouts</h1>
{% else %}
<h1>
Workouts of {{ rower.user.first_name }} {{ rower.user.last_name }}
</h1>
{% endif %}
<ul class="main-content">
<li class="grid_2">
<li>
<p>
<form enctype="multipart/form-data" method="post">
<table>
{{ dateform.as_table }}
</table>
{% csrf_token %}
<input name='daterange' type="submit" value="Submit">
</form>
<form enctype="multipart/form-data" method="post">
<table>
{{ dateform.as_table }}
</table>
{% csrf_token %}
<input name='daterange' type="submit" value="Submit">
</form>
</p>
{% if team %}
<p>
<form id="searchform" action="/rowers/list-workouts/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
method="get" accept-charset="utf-8">
{% else %}
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
<form id="searchform" action="/rowers/list-workouts/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
method="get" accept-charset="utf-8">
{% endif %}
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
<input type="submit">
{% else %}
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
method="get" accept-charset="utf-8">
{% endif %}
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
<input type="submit">
</input>
</form>
</form>
</p>
</li>
<li class="grid_2">
<li style="min-height:200px;">
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
<script async="true" type="text/javascript">
Bokeh.set_log_level("info");
@@ -83,15 +92,6 @@ xo
{{ the_div |safe }}
</li>
<li>
{% if team %}
<h3>{{ team.name }} Team Workouts</h3>
{% else %}
<h3>
Workouts of {{ rower.user.first_name }} {{ rower.user.last_name }}
</h3>
{% endif %}
</li>
<li>
<p>
<span>