Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legend duplicated when data changes #49

Open
ethul opened this issue Jul 29, 2014 · 7 comments
Open

Legend duplicated when data changes #49

ethul opened this issue Jul 29, 2014 · 7 comments

Comments

@ethul
Copy link

ethul commented Jul 29, 2014

I tried out the new legend functionality, which looks great; however, when the data changes, the legend is repeatedly being inserted into the DOM.

See https://github.com/lgsilver/angles/blob/0859278e0c09fc28c08f02d72d79341004f9afe3/angles.js#L64-65

@yangpu
Copy link

yangpu commented Sep 10, 2014

yes, it does

@adambutler
Copy link

👍

@fleurystephane
Copy link

Is there a correction for this problem?
Tkx

@martypitt
Copy link

👍

@aldidas
Copy link

aldidas commented Feb 2, 2015

I can solve this problem using this little hack in line 64 :

if($scope.legend) {
   angular.element($elem[0]).parent().parent().children('ul').remove();
   angular.element($elem[0]).parent().after( chartCreated.generateLegend() );
}

Hope this helps.

@jmelosegui
Copy link

👍

@detinho
Copy link

detinho commented May 12, 2016

Can I make a pull request for this? I've used the correction proposed above and it worked well.

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

No branches or pull requests

8 participants