|
|
|
@ -1729,8 +1729,8 @@ nv.models.discreteBar = function() {
|
|
|
|
|
barsEnter.append('text')
|
|
|
|
|
.attr('text-anchor', 'middle')
|
|
|
|
|
bars.selectAll('text')
|
|
|
|
|
.attr('dx', x.rangeBand() / 2)
|
|
|
|
|
.attr('dy', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
|
|
|
|
|
.attr('x', x.rangeBand() / 2)
|
|
|
|
|
.attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
|
|
|
|
|
.text(function(d,i) { return valueFormat(getY(d,i)) })
|
|
|
|
|
} else {
|
|
|
|
|
bars.selectAll('text').remove();
|
|
|
|
@ -4476,12 +4476,12 @@ nv.models.multiBarHorizontal = function() {
|
|
|
|
|
.attr('text-anchor', function(d,i) { return getY(d,i) < 0 ? 'end' : 'start' })
|
|
|
|
|
bars.selectAll('text')
|
|
|
|
|
.attr('y', x.rangeBand() / 2)
|
|
|
|
|
.attr('dy', '-.5em')
|
|
|
|
|
.attr('dy', '-.32em')
|
|
|
|
|
.text(function(d,i) { return valueFormat(getY(d,i)) })
|
|
|
|
|
d3.transition(bars)
|
|
|
|
|
//.delay(function(d,i) { return i * delay / data[0].values.length })
|
|
|
|
|
.selectAll('text')
|
|
|
|
|
.attr('dx', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
|
|
|
|
|
.attr('x', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
|
|
|
|
|
} else {
|
|
|
|
|
bars.selectAll('text').remove();
|
|
|
|
|
}
|
|
|
|
|