Skip to content

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

@mrwadepro

Description

@mrwadepro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions