A Widget is a web component that can be added to a website.
In our case, the Widget will either be a Chart, a Table or HTML depending on what you have chosen to create.
When creating a new Widget, you simply select the type of Widget you want to create – Chart, Table or HTML – and then add your API details to connect to the API (or you can use a JSON file if not using an API).
After this, you can then modify the look and feel of the Widget and once you are happy with it, simply click the Publish Widget button and you will be given 2 small snippets of code.
You then add these snippets to your website and you will have an auto updating Chart, Table or HTML shown directly on your website.
The Widget code snippet looks like this. The id parameter is the only thing you need to change and you will be given the correct id when you publish your Widget:
<api-widgets id="121"></api-widgets>
The Javascript snippet looks like this, and you only need to add this once to the page where you have your Widget(s). Multiple Widgets can be added to a single page.
<script type="module" src="https://apiwidgets.com/widget/output.js"></script>
Below is the screen you will see when publishing a Widget.