added agegrouprecorords - line 135 in urls.py
This commit is contained in:
@@ -1483,7 +1483,10 @@ def interactive_agegroupcpchart(age,normalized=False):
|
||||
x_axis_type = 'log'
|
||||
y_axis_type = 'linear'
|
||||
|
||||
plot = Figure(plot_width=900,x_axis_type=x_axis_type)
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,resize,crosshair'
|
||||
|
||||
plot = Figure(plot_width=900,x_axis_type=x_axis_type,
|
||||
tools=TOOLS)
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.line('duration','fitpowerfh',source=source,
|
||||
@@ -1665,6 +1668,7 @@ def interactive_agegroup_plot(df,distance=2000,duration=None,
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,resize,crosshair'
|
||||
|
||||
plot = Figure(tools=TOOLS,plot_width=900)
|
||||
plot.sizing_mode='scale_width'
|
||||
plot.circle('age','power',source=source,fill_color='red',size=15,
|
||||
legend='World Record')
|
||||
|
||||
|
||||
@@ -1,52 +1,44 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Rowsandall {% endblock %}
|
||||
{% block title %}Rowsandall Age Group Records{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block main %}
|
||||
|
||||
<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");
|
||||
</script>
|
||||
<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");
|
||||
</script>
|
||||
|
||||
{{ interactiveplot |safe }}
|
||||
|
||||
<script>
|
||||
// Set things up to resize the plot on a window resize. You can play with
|
||||
// the arguments of resize_width_height() to change the plot's behavior.
|
||||
var plot_resize_setup = function () {
|
||||
var plotid = Object.keys(Bokeh.index)[0]; // assume we have just one plot
|
||||
var plot = Bokeh.index[plotid];
|
||||
var plotresizer = function() {
|
||||
// arguments: use width, use height, maintain aspect ratio
|
||||
plot.resize_width_height(true, false, false);
|
||||
};
|
||||
window.addEventListener('resize', plotresizer);
|
||||
plotresizer();
|
||||
};
|
||||
window.addEventListener('load', plot_resize_setup);
|
||||
</script>
|
||||
<style>
|
||||
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
||||
html, body {height: 100%; margin:5px;}
|
||||
</style>
|
||||
{{ interactiveplot |safe }}
|
||||
|
||||
|
||||
<div id="workouts" class="grid_12 alpha">
|
||||
<h1>Interactive Plot</h1>
|
||||
|
||||
|
||||
<h1>Interactive Plot</h1>
|
||||
|
||||
<p>This chart shows the <a href="http://www.concept2.com/indoor-rowers/racing/records/world">Indoor Rower World Records</a> for your gender and
|
||||
weight class. The red dots are the official records, and hovering
|
||||
over them with your mouse shows you the name of the record holder.
|
||||
The blue line is a fit to the data, which is used by rowsandall.com
|
||||
to calculate your performance assessment.</a>
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
<p>This chart shows the
|
||||
<a href="http://www.concept2.com/indoor-rowers/racing/records/world">
|
||||
Indoor Rower World Records
|
||||
</a> for your gender and
|
||||
weight class. The red dots are the official records, and hovering
|
||||
over them with your mouse shows you the name of the record holder.
|
||||
The blue line is a fit to the data, which is used by rowsandall.com
|
||||
to calculate your performance assessment.
|
||||
</p>
|
||||
</li>
|
||||
<li class="grid_4">
|
||||
|
||||
{{ the_div|safe }}
|
||||
</li>
|
||||
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_analytics.html' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -12336,7 +12336,7 @@ def agegroupcpview(request,age,normalize=0):
|
||||
|
||||
response = render(request,'agegroupcp.html',
|
||||
{
|
||||
'active': 'nav-analysis';
|
||||
'active': 'nav-analysis',
|
||||
'interactiveplot':script,
|
||||
'the_div':div,
|
||||
}
|
||||
@@ -12375,8 +12375,9 @@ def agegrouprecordview(request,sex='male',weightcategory='hwt',
|
||||
|
||||
return render(request, 'agegroupchart.html',
|
||||
{
|
||||
'interactiveplot':script,
|
||||
'the_div':div,
|
||||
'interactiveplot':script,
|
||||
'active':'nav-analysis',
|
||||
'the_div':div,
|
||||
})
|
||||
|
||||
# Cloning sessions
|
||||
|
||||
Reference in New Issue
Block a user