Skip to content

Commit

Permalink
use dc.transition to disable transitions at 0
Browse files Browse the repository at this point in the history
and revert flushing of transitions, no longer necessary here
for #1181
  • Loading branch information
gordonwoodhull committed Jul 28, 2016
1 parent ce4e6bf commit 5c3d993
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions spec/line-chart-spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global appendChartID, flushAllD3Transitions, loadDateFixture, makeDate */
/* global appendChartID, loadDateFixture, makeDate */
describe('dc.lineChart', function () {
var id, chart, data;
var dimension, group;
Expand Down Expand Up @@ -224,7 +224,6 @@ describe('dc.lineChart', function () {
describe('for vertical ref lines', function () {
var x;
beforeEach(function () {
flushAllD3Transitions();
var dot = chart.select('circle.dot');
dot.on('mousemove').call(dot[0][0]);
x = dot.attr('cx');
Expand All @@ -241,7 +240,6 @@ describe('dc.lineChart', function () {
describe('for a left y-axis chart', function () {
var x;
beforeEach(function () {
flushAllD3Transitions();
var dot = chart.select('circle.dot');
dot.on('mousemove').call(dot[0][0]);
x = dot.attr('cx');
Expand All @@ -258,7 +256,6 @@ describe('dc.lineChart', function () {
var x;
beforeEach(function () {
chart.useRightYAxis(true).render();
flushAllD3Transitions();
var dot = chart.select('circle.dot');
dot.on('mousemove').call(dot[0][0]);
x = dot.attr('cx');
Expand Down
6 changes: 3 additions & 3 deletions src/line-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ dc.lineChart = function (parent, chartGroup) {
hideRefLines(g);
});

dots.call(renderTitle, d)
.transition()
.duration(_chart.transitionDuration())
dots.call(renderTitle, d);

dc.transition(dots, _chart.transitionDuration())
.attr('cx', function (d) {
return dc.utils.safeNumber(_chart.x()(d.x));
})
Expand Down

0 comments on commit 5c3d993

Please sign in to comment.