|
|
@ -170,8 +170,7 @@ nv.models.historicalBar = function() {
|
|
|
|
.attr('width', (availableWidth / data[0].values.length) * .9 )
|
|
|
|
.attr('width', (availableWidth / data[0].values.length) * .9 )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
d3.transition(bars)
|
|
|
|
bars.transition().
|
|
|
|
//.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
|
|
|
|
|
|
|
|
.attr('y', function(d,i) {
|
|
|
|
.attr('y', function(d,i) {
|
|
|
|
return getY(d,i) < 0 ?
|
|
|
|
return getY(d,i) < 0 ?
|
|
|
|
y(0) :
|
|
|
|
y(0) :
|
|
|
@ -180,7 +179,6 @@ nv.models.historicalBar = function() {
|
|
|
|
y(getY(d,i))
|
|
|
|
y(getY(d,i))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.attr('height', function(d,i) { return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) });
|
|
|
|
.attr('height', function(d,i) { return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) });
|
|
|
|
//.order(); // not sure if this makes any sense for this model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|