D3.js Transitions

前端 未结 2 900
醉梦人生
醉梦人生 2020-12-31 01:31

I am trying to create an animated bar graph using d3.js. I want the bars to appear one by one like this example http://nvd3.com/ghpages/multiBar.html . I was able to create

2条回答
  •  春和景丽
    2020-12-31 02:09

    Remember the x-scale is backwards to what you would expect (bars have to be built upwards from the bottom (where bottom = svg height). Use Transition to animate bars on enter.

    An example of what I think you are trying to achieve can be found here: http://bl.ocks.org/jamesleesaunders/f32a8817f7724b17b7f1

    All the best,

    Jim

提交回复
热议问题