Skip to content

Commit

Permalink
Add an updateConfig method #189 (#190)
Browse files Browse the repository at this point in the history
* Add an updateConfig method #189

* Add an updateConfig method (fixed UpdateExample.java) #189
  • Loading branch information
Bethibande authored Jul 22, 2024
1 parent 3145a3c commit 60321db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ public void setYaxis(YAxis[] yaxis) {
setPropertyObject("yaxis", yaxis);
}

public void updateConfig() {
getElement().callJsFunction("updateConfigAndApply");
}

/**
* This method will be called automatically and does not require to be called manually
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ export class ApexChartsWrapper extends LitElement {
}
}

updateConfigAndApply() {
this.updateConfig();
this.chartComponent.updateOptions(this.config);
}

/**
* This is due to the way the eval function works eval("function (){return \"test\"}") will throw an
* Uncaught SyntaxError: Function statements require a function name.
Expand Down

0 comments on commit 60321db

Please sign in to comment.