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

Add an updateConfig method #189

Closed
Bethibande opened this issue Jul 12, 2024 · 1 comment
Closed

Add an updateConfig method #189

Bethibande opened this issue Jul 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Bethibande
Copy link
Contributor

Bethibande commented Jul 12, 2024

Is your feature request related to a problem? Please describe.
There are methods like ApexCharts.setTitle, for example. However, the changes made using these methods are not applied to the cart.
It seems the config is never updated after creating the chart.

Describe the solution you'd like
I wish to propose a updateConfig method like this:

public void updateConfig() {
    getElement().callJsFunction("updateConfigAndApply");
}
updateConfigAndApply() {
    this.updateConfig();
    this.chartComponent.updateOptions(this.config);
}

Describe alternatives you've considered
Adding the following to the end of the updateConfig typescript function in apexcharts-wrapper.ts doesn't work:

this.chartComponent.updateOptions(this.config)

Calling chart.render() also doesn't work.

Additional context
You can test/reproduce this using the following class:
https://gist.github.com/Bethibande/4b8e82640bda7548ebbc2cd5a123fb26

After looking at other issues, which I should've done from the start. I discovered that this is pretty much what was already proposed for #147

@Bethibande Bethibande added the enhancement New feature or request label Jul 12, 2024
@Bethibande Bethibande changed the title Add a updateConfig method Add an updateConfig method Jul 12, 2024
Bethibande added a commit to Bethibande/apexcharts-flow that referenced this issue Jul 12, 2024
Bethibande added a commit to Bethibande/apexcharts-flow that referenced this issue Jul 12, 2024
Loahrs pushed a commit that referenced this issue Jul 22, 2024
* Add an updateConfig method #189

* Add an updateConfig method (fixed UpdateExample.java) #189
@Loahrs
Copy link
Collaborator

Loahrs commented Jul 22, 2024

Supported through #190

@Loahrs Loahrs closed this as completed Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants