How to remove NVD3 chart resize/update delay

后端 未结 3 1553
夕颜
夕颜 2021-01-14 23:57

I\'ve created an NVD3 multiBarChart and placed it in a jQuery resizable container. When resizing the chart, each render incurs the same delay as when the chart is first draw

相关标签:
3条回答
  • 2021-01-15 00:27

    I used transitionDuration: -1 that worked for a stackedAreaChart.

    Edit

    This helped remove the transition when appending chart data, not the re-size issue, please check the comments below.

    0 讨论(0)
  • 2021-01-15 00:29

    In the latest version (from github), you can set .transitionDuration():

    chart.transitionDuration(0);
    

    Edit: Even with this, some of the transitions/durations are hardcoded in the NVD3 source. The only way to get rid of those is to modify the source.

    0 讨论(0)
  • 2021-01-15 00:50

    As of NVD3 1.7.1 you can use the duration option:

    chart.duration(0);
    
    0 讨论(0)
提交回复
热议问题