Merge branch 'hotfix/v3.38'
This commit is contained in:
@@ -1165,6 +1165,7 @@ def interactive_chart(id=0,promember=0):
|
|||||||
|
|
||||||
def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
||||||
ploterrorbars=False):
|
ploterrorbars=False):
|
||||||
|
|
||||||
if datadf.empty:
|
if datadf.empty:
|
||||||
return ['','<p>No non-zero data in selection</p>']
|
return ['','<p>No non-zero data in selection</p>']
|
||||||
|
|
||||||
|
|||||||
@@ -3499,13 +3499,14 @@ def multiflex_view(request,userid=0,
|
|||||||
bins = np.arange(datadf[groupby].min()-binsize,
|
bins = np.arange(datadf[groupby].min()-binsize,
|
||||||
datadf[groupby].max()+binsize,
|
datadf[groupby].max()+binsize,
|
||||||
binsize)
|
binsize)
|
||||||
groups = datadf.groupby(pd.cut(datadf[groupby],bins))
|
groups = datadf.groupby(pd.cut(datadf[groupby],bins,labels=False))
|
||||||
else:
|
else:
|
||||||
bins = np.arange(datadf['days ago'].min()-binsize,
|
bins = np.arange(datadf['days ago'].min()-binsize,
|
||||||
datadf['days ago'].max()+binsize,
|
datadf['days ago'].max()+binsize,
|
||||||
binsize,
|
binsize,
|
||||||
)
|
)
|
||||||
groups = datadf.groupby(pd.cut(datadf['days ago'], bins))
|
groups = datadf.groupby(pd.cut(datadf['days ago'], bins,
|
||||||
|
labels=False))
|
||||||
|
|
||||||
|
|
||||||
xvalues = groups.mean()[xparam]
|
xvalues = groups.mean()[xparam]
|
||||||
@@ -3628,13 +3629,15 @@ def multiflex_view(request,userid=0,
|
|||||||
bins = np.arange(datadf[groupby].min()-binsize,
|
bins = np.arange(datadf[groupby].min()-binsize,
|
||||||
datadf[groupby].max()+binsize,
|
datadf[groupby].max()+binsize,
|
||||||
binsize)
|
binsize)
|
||||||
groups = datadf.groupby(pd.cut(datadf[groupby],bins))
|
groups = datadf.groupby(pd.cut(datadf[groupby],bins,
|
||||||
|
labels=False))
|
||||||
else:
|
else:
|
||||||
bins = np.arange(datadf['days ago'].min()-binsize,
|
bins = np.arange(datadf['days ago'].min()-binsize,
|
||||||
datadf['days ago'].max()+binsize,
|
datadf['days ago'].max()+binsize,
|
||||||
binsize,
|
binsize,
|
||||||
)
|
)
|
||||||
groups = datadf.groupby(pd.cut(datadf['days ago'], bins))
|
groups = datadf.groupby(pd.cut(datadf['days ago'], bins,
|
||||||
|
labels=False))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user