1

I try to change duration property for multiChart but It does not work. It is example

{
  chart: {
    type: 'multiChart',
    duration: 500,
    ...
  }
}

http://plnkr.co/edit/ohZDWMq4zxear9V98ItO?p=preview

Eric Hartford
  • 16,464
  • 4
  • 33
  • 50
Roman
  • 371
  • 2
  • 3
  • 15

1 Answers1

1

angular-nvd3 is a wrapper for nvd3, it can only provide what nvd3 provides. Looking at the nvd3 documentation, it seems there is no duration option for multicharts.

http://nvd3-community.github.io/nvd3/examples/documentation.html#multiChart

Update: a multiChart is composed of six subcharts (lines1, lines2, bars1, bars2, stack1, and stack2). Each of those charts has its own duration options.

so for lines1, lines2, bars1, bars2, stack1, and stack2 you can set duration. You can get the behavior you want.

{
  chart: {
    type: 'multiChart',
    ...
    bars1: {
      duration: 2000
    },
    bars2: {
      duration: 2000
    },
    ...
  }
}

http://plnkr.co/edit/23FZtmOeX46PZDAW5XIi?p=preview

I think there are two bugs here.

  1. nvd3's multichart model should have a master duration option that sets all the subcharts durations
  2. until that's fixed, angular-nvd3's multichart example should set the duration option of the subcharts
Eric Hartford
  • 16,464
  • 4
  • 33
  • 50