Skip to main content

Templates

Templates let the chart reuse styling and study setups.

The external adapter can persist both chart templates and study templates.

Chart Templates​

Chart templates are used for visual settings such as:

  • chart style
  • theme-related styling
  • scale and display preferences
  • other chart appearance settings captured in the template

The adapter can store them through methods such as:

  • saveChartTemplate(template)
  • getChartTemplates()
  • loadChartTemplate(templateId)
  • removeChartTemplate(templateId)

The library also keeps template data in local cache when the wrapper is enabled, so template lists can be restored quickly on the next load.

Study Templates​

Study templates are used for indicator setups and saved analysis configurations.

The adapter can store them through methods such as:

  • saveStudyTemplate(template)
  • getStudyTemplates()
  • removeStudyTemplate(templateId)
  • applyStudyTemplate(templateId)

Study templates are often used alongside saved layouts, so restoring a layout can also restore the matching study setup.

Why It Matters​

Templates help users keep a consistent chart setup without rebuilding it every time.

They are especially useful for:

  • repeat analysis workflows
  • team-shared chart settings
  • fast restoration after refresh or logout