Skip to main content

External Adapter

The external adapter is how the chart connects to your own storage or backend for layouts, templates, and drawings.

It is used when you want the chart to remember user work outside the browser session.

What It Covers

  • layout saving and loading
  • chart and study templates
  • drawings persistence

How It Connects

The chart can receive an externalSaveLoadAdapter in its configuration.

From there, the library uses the adapter to store and restore:

  • saved layouts
  • chart templates
  • study templates
  • drawings

The library can also wrap your adapter with a local cache layer through LocalStorageExternalSaveLoadAdapter. That gives the chart a fallback copy of recent layouts, templates, and drawings when the external store is slow or unavailable.

How It Is Managed

  • layout state is saved through the external adapter
  • chart and study templates are saved through the same persistence path
  • drawings are synchronized separately so they stay attached to the current symbol
  • local cache metadata tracks the most recently active layout
  • startup options such as load_last_chart and save_to_local_storage control restore behavior

Pages In This Section