angular-morris
angular-morris copied to clipboard
ykeys and labels not work dynamically
Hi, when I try to change Data, ykeys and labels not are changend dynamically with new data. Why? Can you add feature about "goalLineColors"? Thanks.
Hi @Andrewhx
I use angular morris in tons of projects, dynamically and async with no problems =)
it could be more easiest if you try to reproduce your problem at tools like jsfiddle
the feature 'goalLineColors' already exists
Sorry but i am closing because this is not a problem with angular-morris module
Hi @Andrewhx
I have added this sample to docs. Maybe it can help you.
https://jsfiddle.net/stewones/9zjasq3r/
I don't understand why this issue is closed, in my honest opinion, it should be reopened.
Look at this: https://jsfiddle.net/zc34s9b4/1/ After 2 seconds, the graph should be updated with only one line.
Right now, in the code, the only watcher is set on "data", I think it should be added on other fields too. At least on colors, yKeys and labels, to be able to filter which data is shown without having to reconstruct the entire object.
Hi @Tronix117
Yes now I can sense this issue. Look how a jsFiddle makes all the difference.
but I'm no time to add this feature right now
(Hi @stewones, I'm not the original poster by the way :) )
I solved this by using an empty data structure, and just at the next digest putting back the datas in place.
It's not perfect and flicker sometimes, but it's working until something better is implemented.
Like so: https://jsfiddle.net/r7v88a5y/1/
@Tronix117 yay I realized later :grin:
Also think it would be a good feature and it is not so hard to do. I'll try to hack this weekend