dc.js icon indicating copy to clipboard operation
dc.js copied to clipboard

Pie chart transition glitch in IE

Open thatotherone opened this issue 12 years ago • 1 comments

This is not a dupe of #751

When transition happens in pie chart, all slices jump to their final position first (t = 1) and then start normal animation (t ~= 0 and increasing).

Tested in IE9/10/11 on dc 1.6 and 1.7 (problem also seem to exist in master - though I didn't test). Here is video demonstrating issue in IE11 on Win10 TP

Problem is in

    function updateSlicePaths(pieData, arc) {
        var slicePaths = _g.selectAll('g.' + _sliceCssClass)
            .data(pieData)
            .select('path')
            .attr('d', function (d, i) {
                return safeArc(d, i, arc);
            });
        dc.transition(slicePaths, _chart.transitionDuration(),
            function (s) {
                s.attrTween('d', tweenPie);
            }).attr('fill', fill);
    }

This function is called with pieData set to the final data so .attr('d', ...) updates paths to their final states, then dc.transition immediately starts new attrTween. Only IE seem to pick up this keyframe and render it on the timeline, other browsers just ignore it for some reason. Still, I don't think it's the right thing to rely on this behavior, especially since I don't see any valid reason for that .attr() call to exist.

thatotherone avatar Nov 09 '14 23:11 thatotherone

Thanks for the report, and the analysis!

gordonwoodhull avatar Nov 10 '14 00:11 gordonwoodhull