Angular-nvd3-directive piechart nodata not updating
I am using angular-nvd3 piechart directives. I am setting up a piechart with a list of values with siteId (as x-axis) and usersCount (as y-axis). Typically an application starts with one set of objects (siteId, usersCount). The app allows users to modify the list of site sets - (siteId, usersCount) List, and when a new list is loaded and there is no data in it, piechart prints the text nodata, but piechart stays behind the text with the previous data.
I used nv.graphs [0] .update () to update it, but that seems to be unacceptable. I also set the objectequality attribute to true (for deep data observation).
The list of data looks like this in debug: {object [1]} - when there is data, and {object [0]} - when there is no data.
Thank you very much in advance.
source to share