Update as you drag on cumulativeLineChart... turned off animation so update would be fluid
This commit is contained in:
parent
c09602e3c2
commit
d47ced5ee0
@ -65,7 +65,7 @@ nv.addGraph(function() {
|
||||
|
||||
d3.select('#chart1 svg')
|
||||
.datum(cumulativeTestData())
|
||||
.transition().duration(500)
|
||||
//.transition().duration(500)
|
||||
.call(chart);
|
||||
|
||||
//TODO: Figure out a good way to do this automatically
|
||||
|
10
nv.d3.js
10
nv.d3.js
@ -1623,6 +1623,7 @@ nv.models.cumulativeLineChart = function() {
|
||||
d.i = Math.round(dx.invert(d.x));
|
||||
|
||||
d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
|
||||
chart.update();
|
||||
}
|
||||
|
||||
function dragEnd(d,i) {
|
||||
@ -1788,7 +1789,8 @@ nv.models.cumulativeLineChart = function() {
|
||||
var linesWrap = g.select('.nv-linesWrap')
|
||||
.datum(data.filter(function(d) { return !d.disabled }))
|
||||
|
||||
d3.transition(linesWrap).call(lines);
|
||||
//d3.transition(linesWrap).call(lines);
|
||||
linesWrap.call(lines);
|
||||
|
||||
|
||||
var indexLine = linesWrap.selectAll('.nv-indexLine')
|
||||
@ -1840,7 +1842,8 @@ nv.models.cumulativeLineChart = function() {
|
||||
d.disabled = !d.disabled;
|
||||
rescaleY = !d.disabled;
|
||||
|
||||
selection.transition().call(chart);
|
||||
//selection.transition().call(chart);
|
||||
selection.call(chart);
|
||||
});
|
||||
|
||||
|
||||
@ -1855,7 +1858,8 @@ nv.models.cumulativeLineChart = function() {
|
||||
});
|
||||
}
|
||||
|
||||
selection.transition().call(chart);
|
||||
//selection.transition().call(chart);
|
||||
selection.call(chart);
|
||||
});
|
||||
|
||||
/*
|
||||
|
10
nv.d3.min.js
vendored
10
nv.d3.min.js
vendored
File diff suppressed because one or more lines are too long
@ -73,6 +73,7 @@ nv.models.cumulativeLineChart = function() {
|
||||
d.i = Math.round(dx.invert(d.x));
|
||||
|
||||
d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
|
||||
chart.update();
|
||||
}
|
||||
|
||||
function dragEnd(d,i) {
|
||||
@ -238,7 +239,8 @@ nv.models.cumulativeLineChart = function() {
|
||||
var linesWrap = g.select('.nv-linesWrap')
|
||||
.datum(data.filter(function(d) { return !d.disabled }))
|
||||
|
||||
d3.transition(linesWrap).call(lines);
|
||||
//d3.transition(linesWrap).call(lines);
|
||||
linesWrap.call(lines);
|
||||
|
||||
|
||||
var indexLine = linesWrap.selectAll('.nv-indexLine')
|
||||
@ -290,7 +292,8 @@ nv.models.cumulativeLineChart = function() {
|
||||
d.disabled = !d.disabled;
|
||||
rescaleY = !d.disabled;
|
||||
|
||||
selection.transition().call(chart);
|
||||
//selection.transition().call(chart);
|
||||
selection.call(chart);
|
||||
});
|
||||
|
||||
|
||||
@ -305,7 +308,8 @@ nv.models.cumulativeLineChart = function() {
|
||||
});
|
||||
}
|
||||
|
||||
selection.transition().call(chart);
|
||||
//selection.transition().call(chart);
|
||||
selection.call(chart);
|
||||
});
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user