Introduction
pi-embed-actions
is a lightweight JavaScript library designed to simplify interactions with the embedded pi dashboard. It provides an intuitive API to execute actions directly within the dashboard, minimising manual effort and making integrating pi into your application easier.
Installation
Currently, pi-embed-actions
is available only as a minified JavaScript file, which can be downloaded as an artifact from the GitHub Releases page.
To use the library:
- Go to the GitHub Releases.
- Download the latest minified version of
pi-embed-actions
library. - Add the downloaded file to your project and reference it in your code. E.g.,
<script src="path/to/pi-embed-actions-v1.0.0.min.js"></script>
Documentation
Please refer to our documentation for details on how to use this library.
Examples
Basic Usage Examples:
To embed a Report Editor:
const dashboard = PiEmbedActions.createDashboard('iframeId', 'https://pi-dev.uk:8224/pi?lang=en_GB&editorDisplayMode=CONTENT');
dashboard.reportEditor.open(2);
Further examples:
Check our api-embed-example project for examples.