All interactive visualizations created with the Trendz Analytics Platform could be shared with other users and embed on ThingsBoard Dashboards or external sites. In this guide, you will learn how to do this.
You can share created visualizations or even provide a self-service interface for your users by adding Trendz widgets on ThingsBoard dashboards. Follow 2 simple steps to make it:
At the beginning you need to import Trendz widgets into your ThingsBoard installation:
This bundle contains 3 widgets:
Once widgets bundle imported and you already have saved Trendz Visualization - follow next steps to add them on the dashboard:
In this case you want to conect standard ThingsBoard widgets located on the dashboard with Trendz View. You can do this using ThingsBoard dashboard aliases and Trendz View - with filter alias from Trendz widget Bundle.
Example: we have 10 Machine devices in ThingsBoard. We want to create a dashboard that will show all Machine devices in a list and once device selected - other widget on the dashboard should show details about selected device. In total we will have 2 widgets on the dashboard:
On ThingsBoard side we setup a dashboard and add 2 widgets. Detailed instruction how to do this is not part of this tutorial, so here are brief steps:
On Trendz View side:
Return to ThingsBoard Dashboard:
Now, every time when selected_device alias updated, value if its Entity Name would be inserted into Trendz View filter.
If multiple filters configured in Trendz View - system will match required filter by name.
You can also embed Trendz visualization into your web site by adding iFrame that points to required visualization.
Add iFrame on your site with the following URL http://{TRENDZ_URL}/viewMode/{VIEW_ID}?jwt={JWT_TOKEN}. Where:
If HTTPS was not enabled for Trendz it is possible that visuals shared on 3rd party websites or on ThingsBoard Dashboard would be blank.
The problem is that most browser block mixed content requests: if ThingsBoard use HTTPS and Trendz does not - browser will block requests to Trendz. You can find detailed error in browser console.
For fixing this - you need to enable HTTPS for Trendz UI. Find details how to do this in Trendz installation guide.