krispo / angular-nvd3

AngularJS directive for NVD3 reusable charting library (based on D3). Easily customize your charts via JSON API.
http://krispo.github.io/angular-nvd3
MIT License
1.29k stars 377 forks source link

Disable full area redraw on data update #724

Open lentyaishe opened 6 years ago

lentyaishe commented 6 years ago

Hi,

The library you provide is really cool!

I've witnessed a bit strange behavior while updating a line chart with colored area. When the data is added the additional vertex is added and the line only draws a new connection to the new vertex but the area is fully redrawn. Is it possible to somehow disable the full redraw of the area and have only the added section be filled with additional area color?

Please, look at the attached animated picture that demonstrates the problem. 2017-12-05-at-14-02-39

Thanks in advance

lentyaishe commented 6 years ago

Found the solution myself. There was an unneeded .duration() call on the chart level.

pertrai1 commented 6 years ago

@lentyaishe - if you have any changes to the code base that you think would be good for the community, please consider a PR to this repo that is being updated on npm: https://github.com/pertrai1/angular-nvd3-charts

lentyaishe commented 6 years ago

@pertrai1 - Nope, there was incorrect usage in my code. So everything is fine with the base repo code.