Skip to Content

JavaScript component disappears after Refresh

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.

capture.png (44.1 kB)
capture.png (7.1 kB)
capture.png (9.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 17 at 02:58 PM

    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

    Add comment
    10|10000 characters needed characters exceeded