fixed latest charts history length

This commit is contained in:
cubedro 2015-04-28 04:50:21 +03:00
parent 1e9d860c3d
commit aa5e83cd42

View File

@ -190,7 +190,7 @@ History.prototype.getTransactionsCount = function(id)
{ {
var txCount = _(this._items) var txCount = _(this._items)
.sortByOrder('height', false) .sortByOrder('height', false)
.slice(0, MAX_BINS - 1) .slice(0, MAX_BINS)
.reverse() .reverse()
.map(function(item) .map(function(item)
{ {
@ -205,7 +205,7 @@ History.prototype.getGasSpending = function(id)
{ {
var gasSpending = _(this._items) var gasSpending = _(this._items)
.sortByOrder('height', false) .sortByOrder('height', false)
.slice(0, MAX_BINS - 1) .slice(0, MAX_BINS)
.reverse() .reverse()
.map(function(item) .map(function(item)
{ {
@ -220,7 +220,7 @@ History.prototype.getDifficulty = function(id)
{ {
var difficultyHistory = _(this._items) var difficultyHistory = _(this._items)
.sortByOrder('height', false) .sortByOrder('height', false)
.slice(0, MAX_BINS - 1) .slice(0, MAX_BINS)
.reverse() .reverse()
.map(function(item) .map(function(item)
{ {