How it works
-
01
One token per diagram
The owner enables embedding and gets a dedicated token: a read-only capability on that diagram, revocable at any time.
-
02
An isolated JavaScript lib
ChartsHubEmbed.mount() renders the diagram in a Shadow DOM: no style conflicts with the host page, no iframe.
-
03
Polling updates
The lib queries the public API at a regular interval (20 s by default, 5 s minimum) and redraws only if the diagram changed.
Technical specifications
Example
<div id="mon-diagramme"></div>
<script src="https://votre-instance/embed.js"></script>
<script>
ChartsHubEmbed.mount(document.getElementById('mon-diagramme'), {
token: '<token du diagramme>',
pollIntervalMs: 20000,
});
</script>
Use cases
Show an architecture diagram in internal documentation
Embed a monitoring status in a portal
Publish a process diagram on an intranet
Frequently asked questions
Can visitors edit the diagram?+
No, it is read-only. A discreet link lets authorized people open the diagram in Chart’s HUB to edit it.
What if the token leaks?+
Regenerate or revoke the token: the old one stops working immediately.
Related features
Live metrics via API key
A monitoring application pushes a value and a status; the linked block or link changes color. No Chart’s HUB account needed for the sender.
EditingSub-diagrams
Instead of one giant diagram, split it up: every complex block opens its own page, and the breadcrumb takes you back up.
SecuritySealed Mode (end-to-end encryption)
In Sealed Mode the document is encrypted before sending: the server only stores unreadable data and holds no key.