Articles in this section
Category / Section

How to get the particular widget information in javascript embedded dashboard?

Published:

In JavaScript embedded dashboards, you can obtain data from a widget and process it for the further use cases. This can be achieved using the getWidgetData() method.

Example

Initialize the external method, which should be invoked once the dashboard is rendered completely.

    var instance = BoldBI.getInstance("dashboard"); //Here dashboard implies the embed container id.
    instance.getWidgetData("Patient Feedback Details", "callback", dashboardId);

function callback(args) {
   // Extract the required value for further use cases.
}

image.png

In this example, the getWidgetData() method takes three parameters:

  1. The widget name (e.g., “Patient Feedback Details”)
  2. The callback function (e.g., “callback”) which needs to be implemented on your side. This function will receive the entire widget details in the argument args.
  3. The dashboard ID in which the widget is present.

By implementing this method, you can access the data from the specified widget and use it as needed in your JavaScript embedded dashboard.

Additional References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SM
Written by Soundarya Mani Meharan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied