2

I want to make the transition/animation effect when selecting/unselecting items longer, I'm trying to set the duration parameter of nvd3 pie chart to be something long like 10 seconds (or 10000 ms) but it has no effect on the pie chart,

I tried changing the duration value and I also tried to add transitionDuration property,

$scope.options = {
            chart: {
                type: 'pieChart',
                height: 500,
                x: function(d){return d.key;},
                y: function(d){return d.y;},
                showLabels: true,
                duration: 10000,
                transitionDuration: 10000
            }
        };

You can see the following example: http://plnkr.co/edit/vtKWU0?p=preview

Dor Cohen
  • 16,769
  • 23
  • 93
  • 161

1 Answers1

1

It looks like a bug in nvd3.

https://github.com/novus/nvd3/issues/1474#issuecomment-178333163

angular-nvd3 is a wrapper around nvd3.

Eric Hartford
  • 16,464
  • 4
  • 33
  • 50
  • The only workaround is to fix it. It's open source, and not that complicated. You will need to add a passthrough to https://github.com/novus/nvd3/blob/master/src/models/pieChart.js after line 233 add a pie.duration(duration) and then in https://github.com/novus/nvd3/blob/master/src/models/pie.js you will need to add the logic of the duration parameter. – Eric Hartford Apr 28 '16 at 17:42
  • I have done a very dirty patch right now. But let me get this thing done in the right way. – Vaibhav Pachauri Apr 28 '16 at 19:03