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

updateChart logic appears to be not allowing re-render #73

Open
mrwadepro opened this issue Dec 15, 2018 · 0 comments
Open

updateChart logic appears to be not allowing re-render #73

mrwadepro opened this issue Dec 15, 2018 · 0 comments

Comments

@mrwadepro
Copy link

mrwadepro commented Dec 15, 2018

I think I found a bug here in index.js

if (this.chartist) {
      this.chartist.update(data, options, responsiveOptions);
    } else {
      this.chartist = new Chartist[type](this.chart, data, options, responsiveOptions);
...

This bit of code doesn't allow the chart type to change if the prop actually changes. I spent awhile trying to figure out why if I change the type the chart doesn't re-render. I removed the this.chartist.update(data, options, responsiveOptions); part along with the logic and it fixed it.

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

1 participant