Commit 800a87e8 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Improve the dashboard.

parent 85eeb72a
......@@ -157,6 +157,22 @@ def do_linechart(publications, selector, target=None):
prev_year = year
# always show the twelve months for a single year
# fill the hole with zero
if is_month:
year = selector.year_start
if year and not selector.year_end or \
year == selector.year_end and len(data) < 12:
for i in xrange(1, 13):
x, found = "%s-%02i" % (year, i), False
for tpl in data:
if x == tpl[0]:
found = True
break
if not found:
data.append([x, 0.])
# instantiate the dataframe
# the index is the time
df = DataFrame(data, columns=['time', 'count'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment