Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
800a87e8
Commit
800a87e8
authored
Mar 16, 2016
by
LE GAC Renaud
Browse files
Improve the dashboard.
parent
85eeb72a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
modules/graph_tools.py
modules/graph_tools.py
+16
-0
No files found.
modules/graph_tools.py
View file @
800a87e8
...
...
@@ -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'
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment