diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-26 10:25:59 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-26 10:25:59 +0000 |
commit | bc03dfe774a5e6e5d95c01637c2968f54fec807f (patch) | |
tree | ed42af3a883fdf55584285ff26bb2ae51b9fe4aa /app/views | |
parent | de9f348dfa43ebb1a1c10e8c25ebbbbdb8121be5 (diff) | |
parent | fa65db9aa876289bcb5974edfdd15f181c9a1ac5 (diff) | |
download | gitlab-ce-bc03dfe774a5e6e5d95c01637c2968f54fec807f.tar.gz |
Merge branch 'bar-graphs' into 'master'
Change plots to bar graphs
Since line plot does not make sense for this kind of plots, change them to bar graphs. Bar graphs are easier to read and they look cool too.
I would like to change commits per author plots to bar graphs too, but code looks too messy to modify.
See merge request !645
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/graphs/commits.html.haml | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/app/views/projects/graphs/commits.html.haml b/app/views/projects/graphs/commits.html.haml index 141acbdcf72..a357736bf52 100644 --- a/app/views/projects/graphs/commits.html.haml +++ b/app/views/projects/graphs/commits.html.haml @@ -50,39 +50,42 @@ datasets : [{ fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", - pointColor : "rgba(220,220,220,1)", - pointStrokeColor : "#EEE", + barStrokeWidth: 1, + barValueSpacing: 1, + barDatasetSpacing: 1, data : #{@commits_per_time.values.to_json} }] } ctx = $("#hour-chart").get(0).getContext("2d"); - new Chart(ctx).Line(data,{"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2}) + new Chart(ctx).Bar(data,{"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2}) data = { labels : #{@commits_per_week_days.keys.to_json}, datasets : [{ fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", - pointColor : "rgba(220,220,220,1)", - pointStrokeColor : "#EEE", + barStrokeWidth: 1, + barValueSpacing: 1, + barDatasetSpacing: 1, data : #{@commits_per_week_days.values.to_json} }] } ctx = $("#weekday-chart").get(0).getContext("2d"); - new Chart(ctx).Line(data,{"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2}) + new Chart(ctx).Bar(data,{"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2}) data = { labels : #{@commits_per_month.keys.to_json}, datasets : [{ fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", - pointColor : "rgba(220,220,220,1)", - pointStrokeColor : "#EEE", + barStrokeWidth: 1, + barValueSpacing: 1, + barDatasetSpacing: 1, data : #{@commits_per_month.values.to_json} }] } ctx = $("#month-chart").get(0).getContext("2d"); - new Chart(ctx).Line(data, {"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2}) + new Chart(ctx).Bar(data, {"scaleOverlay": true, responsive: true, pointHitDetectionRadius: 2}) |