minimum viable version of improved stats
This commit is contained in:
@@ -4,7 +4,7 @@ from rowingdata import main as rmain
|
||||
from rowingdata import cumcpdata,histodata
|
||||
|
||||
from rowingdata import rowingdata as rrdata
|
||||
|
||||
from math import pi
|
||||
from django.utils import timezone
|
||||
|
||||
from bokeh.palettes import Dark2_8 as palette
|
||||
@@ -88,15 +88,27 @@ from rowers.dataprep import nicepaceformat,niceformat
|
||||
from rowers.dataprep import timedeltaconv
|
||||
|
||||
def interactive_boxchart(datadf,fieldname):
|
||||
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,resize'
|
||||
plot = BoxPlot(datadf, values=fieldname, label='date',
|
||||
legend=False,
|
||||
title=axlabels[fieldname],
|
||||
outliers=False)
|
||||
outliers=False,
|
||||
tools=TOOLS,
|
||||
x_mapper_type='datetime')
|
||||
|
||||
yrange1 = Range1d(start=yaxminima[fieldname],end=yaxmaxima[fieldname])
|
||||
plot.y_range = yrange1
|
||||
|
||||
plot.xaxis.axis_label = 'Date'
|
||||
plot.yaxis.axis_label = axlabels[fieldname]
|
||||
|
||||
|
||||
plot.xaxis.formatter = DatetimeTickFormatter(
|
||||
days=["%d %B %Y"],
|
||||
months=["%d %B %Y"],
|
||||
years=["%d %B %Y"],
|
||||
)
|
||||
plot.xaxis.major_label_orientation = pi/4
|
||||
|
||||
script, div = components(plot)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user