Live is a plugin extension for Draw.IO / Diagram.net allowing to update separately each node of a graph using REST API. Configuration is made using a custom panel "Live" in application's Format Panel.
- Start Draw-IO at https://app.diagrams.net/
- Load plugins section using menu "Extras", sub-menu "Plugins"
- Select "Add..." to add plugin
- Then select "Custom..." to add non distributed plugins
- Enter URL :
- Self hosting URL to live.js
- Or Zenetys hosted URL at https://draw.zenetys.com/plugins/live.js
- Reload (Ctrl+R) IHM and have fun ! (two new button should appear in action bar).
- Add a rounded rectangle to you graph
- Using page "Live" tab, you can register your API or use sample one :
- select "Diagram/API" text zone
- enter your API (ex: https://ping.zenetys.com/api), validate
- select "Diagram/Refresh" text zone
- enter 5 (for 5 seconds), validate
- Select object (Rounded Rectangle)
- Using object "Live" tab, you can change attributs for this object :
- select "Object" attribut
- enter your API request (ex:
/obj1
), validate - select "Text" attribut
- enter a javascript function that return text, for javascrpt code, begin the text with equal character (
=
), returned object name isself
(ex:={return self.color.name;}
) - in "Add Live Property", change advanced properties of objects
- in Property Name, enter
fillColor
- in Property Value, enter
={return self.color.name;}
- in Property Name, enter
- Don't forget to save your diagram
- Start play with Update button (🔄) or with Play button (⏺︎).