fit the graph?

This commit is contained in:
martin 2017-01-09 22:50:32 +00:00
parent 59fb466313
commit 0be371a8d7

View File

@ -42,8 +42,8 @@ let Graph = Backbone.View.extend({
var scale = 124 / ceilingLimit;
// Var xstep = (280 - 46) / 100;
var xstep = 2.34;
var startX = 46 + (100 - _data.length) * xstep;
var xstep = _data.length <= 99 ? 2.34 : ~~(234 / _data.length) ;
var startX = _data.length <= 99 ? 46 + (100 - _data.length) * xstep : 46;
for (var x = 0;x < _data.length;x++) {