Issue #10 fixed distributions from showing disabled points

This commit is contained in:
Bob Monteverde 2012-06-26 01:24:34 -04:00
parent 135be08bde
commit ea31b3ab1c
3 changed files with 19 additions and 9 deletions

View File

@ -323,7 +323,8 @@ nv.models.axis = function() {
if (showMaxMin) {
var axisMaxMin = wrap.selectAll('g.axisMaxMin')
.data(scale.domain());
axisMaxMin.enter().append('g').attr('class', 'axisMaxMin').append('text');
axisMaxMin.enter().append('g').attr('class', 'axisMaxMin').append('text')
.style('opacity', 0);
axisMaxMin.exit().remove();
axisMaxMin
.attr('transform', function(d,i) {
@ -339,7 +340,9 @@ nv.models.axis = function() {
d3.transition(axisMaxMin)
.attr('transform', function(d,i) {
return 'translate(0,' + scale.range()[i] + ')'
});
})
.select('text')
.style('opacity', 1);
}
break;
case 'left':
@ -351,7 +354,8 @@ nv.models.axis = function() {
if (showMaxMin) {
var axisMaxMin = wrap.selectAll('g.axisMaxMin')
.data(scale.domain());
axisMaxMin.enter().append('g').attr('class', 'axisMaxMin').append('text');
axisMaxMin.enter().append('g').attr('class', 'axisMaxMin').append('text')
.style('opacity', 0);
axisMaxMin.exit().remove();
axisMaxMin
.attr('transform', function(d,i) {
@ -367,7 +371,9 @@ nv.models.axis = function() {
d3.transition(axisMaxMin)
.attr('transform', function(d,i) {
return 'translate(0,' + scale.range()[i] + ')'
});
})
.select('text')
.style('opacity', 1);
}
break;
}

6
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -207,8 +207,12 @@ nv.models.scatterChart = function() {
scatterWrap.call(scatter);
g.select('.x.axis').call(xAxis);
g.select('.y.axis').call(yAxis);
g.select('.distributionX').call(distX);
g.select('.distributionY').call(distY);
g.select('.distributionX')
.datum(data.filter(function(d) { return !d.disabled }))
.call(distX);
g.select('.distributionY')
.datum(data.filter(function(d) { return !d.disabled }))
.call(distY);
}