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

When hiding and re-displaying, Peity is recreated and adds an additional chart. #3

Open
rlightner opened this issue Feb 5, 2017 · 1 comment

Comments

@rlightner
Copy link

rlightner commented Feb 5, 2017

I have Peity hosted inside another component that gets filtered based on data. if it is filtered and then unhidden, the chart will be duplicated since the dom is recreated.

Current fix is to empty the innerHtml of the container:

mounted() {
      
      this.$el.parentNode.innerHtml = "";
      
      this.chart = new Peity(this.$el, this.type, this.data, this.options)
      this.chart.draw()
},
@Jackliu007888
Copy link

@rlightner Have you solved the problem? I have the same problem.

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

2 participants