Zero Data Retention lets you render charts without persisting your data on Tako servers. You send the visualization payload at render time, and data exists only in the request and the user’s browser.Documentation Index
Fetch the complete documentation index at: https://docs.tako.com/llms.txt
Use this file to discover all available pages before exploring further.
How it works
- Generate a card via Tako’s Visualize API and receive a
card_idandvisualization_dataobject. - Render the card using one of two embed modes:
- Form POST — sends data via a hidden form submission to an iframe. Simple, works everywhere.
- postMessage — sends data via
window.postMessage(). Supports updating the chart without reloading the iframe.
- Data is not stored by Tako; it exists only in your request and the user’s browser.
Form POST
The form POST approach submitsvisualization_data as a hidden form field targeting an iframe. The iframe loads, renders the chart, and the data is never persisted.
Using the widget
Without the widget
Use a hidden form that targets an iframe:postMessage
The postMessage approach loads an empty iframe shell, then sends data viawindow.postMessage(). This is more efficient for dynamic use cases because you can update the chart data without reloading the iframe.
postMessage mode requires the card to be created with
postmessage_embed: true in the ThinViz create request.Message protocol
The iframe and parent page communicate via structured messages:| Direction | Message type | Description |
|---|---|---|
| Iframe → Parent | tako::ready | Iframe shell is loaded and ready to receive data |
| Parent → Iframe | tako::vizdata | Parent sends visualization data to render |
| Iframe → Parent | tako::vizdata::received | Chart rendered successfully |
| Iframe → Parent | tako::vizdata::error | Error processing the visualization data |
Flow
Using the widget
SetembedMode: 'postmessage' to use postMessage mode. The widget handles the entire handshake automatically.
Without the widget
Implement the handshake yourself:tako::vizdata message — no need to reload the iframe.
Which mode to use
| Form POST | postMessage | |
|---|---|---|
| Setup | Simpler — no handshake needed | Requires message listener |
| Updates | Reloads iframe each time | Updates in-place, no reload |
| Card requirement | Any ZDR card | Requires postmessage_embed: true |
| Best for | Static embeds, one-time renders | Dashboards, real-time data, interactive apps |
End-to-end flow
- Call
POST /v1/beta/visualizewith your data and query. - Extract
card_idandvisualization_datafrom the response. - Render with either the form POST or postMessage approach shown above.