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
9e32cca3
Commit
9e32cca3
authored
Jan 20, 2016
by
LE GAC Renaud
Browse files
Improve the layout of the dashboard.
parent
afedf45b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
controllers/graphs.py
controllers/graphs.py
+6
-2
No files found.
controllers/graphs.py
View file @
9e32cca3
...
...
@@ -28,6 +28,8 @@ def dashboard():
the current year.
"""
current_year
=
datetime
.
now
().
year
cfg
=
Storage
()
cfg
.
Graph_selectorCumulative
=
'True'
cfg
.
Graph_selectorId
=
''
...
...
@@ -46,12 +48,13 @@ def dashboard():
# figure layout
fig
,
(
ax1
,
ax2
)
=
plt
.
subplots
(
nrows
=
1
,
ncols
=
2
,
sharey
=
True
)
fig
.
subplots_adjust
(
wspace
=
0.
)
fig
.
subplots_adjust
(
wspace
=
0.
01
)
# histogram of the number of publications per year
selector
.
cumulative
=
False
selector
.
time
=
T
(
'year'
)
selector
.
year_start
=
''
selector
.
year_end
=
current_year
-
1
do_linechart
(
db
.
publications
,
selector
,
target
=
ax1
)
do_labels
(
ax1
,
""
,
T
(
TITLE_Y
))
...
...
@@ -59,7 +62,8 @@ def dashboard():
# the cumulative sum of publications for the current year
selector
.
cumulative
=
True
selector
.
time
=
T
(
'month'
)
selector
.
year_start
=
datetime
.
now
().
year
selector
.
year_start
=
current_year
selector
.
year_end
=
''
do_linechart
(
db
.
publications
,
selector
,
target
=
ax2
)
...
...
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