workouttype pie chart v1
This commit is contained in:
@@ -373,23 +373,10 @@ def interactive_workouttype_piechart(workouts):
|
||||
}
|
||||
|
||||
|
||||
div, script = get_chart("/workouttypepie", chart_data, debug=True)
|
||||
script, div = get_chart("/workouttypepie", chart_data, debug=True)
|
||||
|
||||
return script, div
|
||||
|
||||
p = figure(height=350, title="Types", toolbar_location=None,
|
||||
tools="hover,save", tooltips="@type: @totaltime", x_range=(-0.5, 1.0))
|
||||
|
||||
p.wedge(x=0, y=1, radius=0.4,
|
||||
start_angle=cumsum('angle', include_zero=True), end_angle=cumsum('angle'),
|
||||
line_color="white", fill_color='color', source=data, legend_group='type', )
|
||||
|
||||
p.axis.axis_label = None
|
||||
p.axis.visible = False
|
||||
p.grid.grid_line_color = None
|
||||
p.outline_line_color = None
|
||||
p.toolbar_location = 'right'
|
||||
|
||||
return components(p)
|
||||
|
||||
|
||||
def interactive_boxchart(datadf, fieldname, extratitle='',
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
<div id="id_script">
|
||||
</div>
|
||||
|
||||
<div id="t_script">
|
||||
{{ tscript|safe}}
|
||||
</div>
|
||||
|
||||
<div id="activities_script">
|
||||
</div>
|
||||
@@ -91,6 +88,10 @@
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
{{ tdiv|safe }}
|
||||
<div id="t_script">
|
||||
{{ tscript|safe}}
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<div id="id_chart">
|
||||
|
||||
Reference in New Issue
Block a user