Change plots to bar graphs
This commit is contained in:
parent
7140e800ee
commit
ad85f1f560
1 changed files with 12 additions and 9 deletions
|
@ -50,39 +50,42 @@
|
||||||
datasets : [{
|
datasets : [{
|
||||||
fillColor : "rgba(220,220,220,0.5)",
|
fillColor : "rgba(220,220,220,0.5)",
|
||||||
strokeColor : "rgba(220,220,220,1)",
|
strokeColor : "rgba(220,220,220,1)",
|
||||||
pointColor : "rgba(220,220,220,1)",
|
barStrokeWidth: 1,
|
||||||
pointStrokeColor : "#EEE",
|
barValueSpacing: 1,
|
||||||
|
barDatasetSpacing: 1,
|
||||||
data : #{@commits_per_time.values.to_json}
|
data : #{@commits_per_time.values.to_json}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = $("#hour-chart").get(0).getContext("2d");
|
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 = {
|
data = {
|
||||||
labels : #{@commits_per_week_days.keys.to_json},
|
labels : #{@commits_per_week_days.keys.to_json},
|
||||||
datasets : [{
|
datasets : [{
|
||||||
fillColor : "rgba(220,220,220,0.5)",
|
fillColor : "rgba(220,220,220,0.5)",
|
||||||
strokeColor : "rgba(220,220,220,1)",
|
strokeColor : "rgba(220,220,220,1)",
|
||||||
pointColor : "rgba(220,220,220,1)",
|
barStrokeWidth: 1,
|
||||||
pointStrokeColor : "#EEE",
|
barValueSpacing: 1,
|
||||||
|
barDatasetSpacing: 1,
|
||||||
data : #{@commits_per_week_days.values.to_json}
|
data : #{@commits_per_week_days.values.to_json}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = $("#weekday-chart").get(0).getContext("2d");
|
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 = {
|
data = {
|
||||||
labels : #{@commits_per_month.keys.to_json},
|
labels : #{@commits_per_month.keys.to_json},
|
||||||
datasets : [{
|
datasets : [{
|
||||||
fillColor : "rgba(220,220,220,0.5)",
|
fillColor : "rgba(220,220,220,0.5)",
|
||||||
strokeColor : "rgba(220,220,220,1)",
|
strokeColor : "rgba(220,220,220,1)",
|
||||||
pointColor : "rgba(220,220,220,1)",
|
barStrokeWidth: 1,
|
||||||
pointStrokeColor : "#EEE",
|
barValueSpacing: 1,
|
||||||
|
barDatasetSpacing: 1,
|
||||||
data : #{@commits_per_month.values.to_json}
|
data : #{@commits_per_month.values.to_json}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = $("#month-chart").get(0).getContext("2d");
|
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})
|
||||||
|
|
Loading…
Reference in a new issue