cancel
Showing results for 
Search instead for 
Did you mean: 

JavaScript component disappears after Refresh

0 Kudos

Hello, I'm using an external javascript library (Gauge.js) for some specific data visualization.

The component has been correctly integrated into the project, and it works perfectly when I run the application for the first time.

I placed the initializing function inside an AJAX Call :

Once i refresh the data for the component, it disappears from the view, although i can always reach it using :

This.getView().byId("gauge")

Please I need to know if the problem is the component or the data we are sending (Yellow colored data)

Otherwise, if there is an alternative UI5 component, please propose it

thank you in advance.

elvin_baghele
Participant
0 Kudos

are you getting any error on the console?

Accepted Solutions (0)

Answers (1)

Answers (1)

SergioG_TX
Active Contributor
0 Kudos

its seems like you are re-creating the gauge object every time your data refreshes. there may be a conflict with the id used (you may get a duplicate object w id error) have you tried creating the object and then only setting the data in the success callback? that may be a better/easier approach. give it a try and let us know how it works