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

[v5] clear and re-render chart throw error: Mismatched interpolation arguments 0:undefined #4671

Closed
coader opened this issue Feb 20, 2023 · 5 comments
Assignees
Labels
Milestone

Comments

@coader
Copy link

coader commented Feb 20, 2023

image

and I tried it in example page, also has error but like this:
image

@coader
Copy link
Author

coader commented Feb 20, 2023

so I need new Chart() again?

@pearmini
Copy link
Member

You don't have to new Chart again theoretically. It looks like that chart.clear() doesn't work as expected. This will be fixed in this week.

Right now you use new Chart for temporary solutions.

@coader
Copy link
Author

coader commented Feb 20, 2023

now I use:

if (chart)
        chart.clear()
    chart = new Chart({
        container: container.value,
        autoFit: true,
    })

and it works

@pearmini
Copy link
Member

now I use:

if (chart)
        chart.clear()
    chart = new Chart({
        container: container.value,
        autoFit: true,
    })

and it works

That sounds good! But I think there are still some problems with chart.clear.

// Error!!!
chart.render(() => {
  chart.clear();
})

@pepper-nice
Copy link
Contributor

pepper-nice commented Mar 29, 2023

now I use:

if (chart)
        chart.clear()
    chart = new Chart({
        container: container.value,
        autoFit: true,
    })

and it works

That sounds good! But I think there are still some problems with chart.clear.

// Error!!!
chart.render(() => {
  chart.clear();
})

This bug has fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants