angular-chart.js
angular-chart.js copied to clipboard
Some charts don't redraw when data changed
I have a page with a dozen or so line charts on it. There are filters at the top of the page which, when submitted, will retrieve new data for the charts. When I apply a filter which will result in the number of elements for the x-axis changing (months), about half of the charts do not redraw until you hover over them. This is strange behavior and I'm not sure why it's being caused. I tried to recreate a plunkr to display the issue, but without taking a lot of time to set it up exactly like my implementation, I wasn't able to make it reoccur. Any ideas?
Are some of the charts hidden at some point? Like using ng-show or something? DOes that behaviour change if you change responsive to false?
I had the same issue - it was a pain to create a repro. The issue arose when there is more than one chart and the labels change. Tried on codepen it worked so the only reason was the version of the libs. Try using these
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js
https://cdnjs.cloudflare.com/ajax/libs/angular-chart.js/0.9.0/angular-chart.min.js
Hey @jtblin
I am looking for a solution to my problem, i'm the one who has a problem with multiple charts on one page (some kind of tabs) and responsive: true, if responsive is eq to false everything is working properly but with true i can only see first and last tab, sometimes all of them but i need to resize windows few times, click in some places etc.
Any clues?
Sorry for the delayed response. @jtblin None of the charts were hidden and I was not explicitly setting responsive anywhere.
I tried the suggestion of @joelhoro and it appears to work. So it would appear the issue is with changing labels.