angular-chart.js icon indicating copy to clipboard operation
angular-chart.js copied to clipboard

Some charts don't redraw when data changed

Open im1dermike opened this issue 9 years ago • 4 comments

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?

im1dermike avatar Apr 01 '16 13:04 im1dermike

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?

jtblin avatar Apr 04 '16 21:04 jtblin

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

joelhoro avatar Apr 09 '16 17:04 joelhoro

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?

kpodemski avatar Oct 12 '16 15:10 kpodemski

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.

im1dermike avatar Nov 30 '16 17:11 im1dermike