Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

ykeys and labels not work dynamically #38

Open
ghost opened this issue Feb 4, 2016 · 6 comments
Open

ykeys and labels not work dynamically #38

ghost opened this issue Feb 4, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Feb 4, 2016

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.

@stewones
Copy link
Owner

stewones commented Feb 4, 2016

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

@stewones stewones closed this as completed Feb 4, 2016
@stewones
Copy link
Owner

Hi @Andrewhx

I have added this sample to docs. Maybe it can help you.

https://jsfiddle.net/stewones/9zjasq3r/

@Tronix117
Copy link

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.

@stewones
Copy link
Owner

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

@Tronix117
Copy link

(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/

@stewones
Copy link
Owner

@Tronix117 yay I realized later 😁

Also think it would be a good feature and it is not so hard to do. I'll try to hack this weekend

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants