Skip to content

Commit

Permalink
rockstor#998 - Small mod, added fake y axis to avoid right spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
MFlyer committed Sep 20, 2016
1 parent 5711ddc commit 5154387
Showing 1 changed file with 19 additions and 0 deletions.
Expand Up @@ -137,6 +137,8 @@ CpuUsageWidget = RockStorWidgetView.extend({
},
scales: {
yAxes: [{
id: 'cpu',
position: 'left',
gridLines: {
drawTicks: false
},
Expand All @@ -149,6 +151,22 @@ CpuUsageWidget = RockStorWidgetView.extend({
return value + '%';
}
}
}, {
id: 'empty',
position: 'right',
ticks: {
fontSize: 9,
beginAtZero: true,
min: 0,
max: 100,
stepSize: 50,
callback: function(value) {
return null;
}
},
gridLines: {
drawTicks: false
}
}],
xAxes: [{
scaleLabel: {
Expand All @@ -175,6 +193,7 @@ CpuUsageWidget = RockStorWidgetView.extend({
labels: [],
datasets: [{
label: '',
yAxisID: 'cpu',
fill: false,
lineTension: 0.2,
backgroundColor: 'rgba(75,192,192,0.4)',
Expand Down

0 comments on commit 5154387

Please sign in to comment.