Skip to main content

IExternalSaveLoadAdapter

Interface

Methods

getAllChartTemplates

Get names of all saved chart templates.

Signature

getAllChartTemplates() => Promise<string[]>

Returns

An array of names.

Promise<string[]>


getAllCharts

Get all saved charts.

Signature

getAllCharts() => Promise<ChartMetaInfo[]>

Returns

Array of chart meta information

Promise<ChartMetaInfo[]>


getAllStudyTemplates

Get all saved study templates

Signature

getAllStudyTemplates() => Promise<StudyTemplateMetaInfo[]>

Returns

Array of study template meta information

Promise<StudyTemplateMetaInfo[]>


getChartContent

Load the chart from the server

Signature

getChartContent(chartId: string | number) => Promise<string>

Parameters

NameTypeDescription
chartIdstring | numberUnique ID of the chart to load (see getAllCharts)

Returns

chart content contained in the content field when saving the chart ( ChartData )

Promise<string>


getChartTemplateContent

Load a chart template from the server

Signature

getChartTemplateContent(templateName: string) => Promise<ChartTemplate>

Parameters

NameTypeDescription
templateNamestringThe name of the template.

Returns

The chart template content.

Promise<ChartTemplate>


getDrawingTemplates

Get names of all saved drawing templates

Signature

getDrawingTemplates(toolName: string) => Promise<string[]>

Parameters

NameTypeDescription
toolNamestringname of the drawing tool

Returns

names of saved drawing templates

Promise<string[]>


getStudyTemplateContent

load a study template from the server

Signature

getStudyTemplateContent(studyTemplateInfo: StudyTemplateMetaInfo) => Promise<string>

Parameters

NameType
studyTemplateInfoStudyTemplateMetaInfo

Returns

Study template content

Promise<string>


loadDrawingTemplate

Load a drawing template from the server

Signature

loadDrawingTemplate(toolName: string, templateName: string) => Promise<string>

Parameters

NameTypeDescription
toolNamestringname of the drawing tool
templateNamestringname of the template

Returns

content of the drawing template

Promise<string>


loadLineToolsAndGroups

Load drawings and drawing groups associated with a chart layout.

Signature

loadLineToolsAndGroups(layoutId: string, chartId: string | number, requestType: LineToolsAndGroupsLoadRequestType, requestContext: LineToolsAndGroupsLoadRequestContext) => Promise<Partial<LineToolsAndGroupsState>>

Parameters

NameTypeDescription
layoutIdstringThe chart layout ID
chartIdstring | numberThe chart ID
requestTypeLineToolsAndGroupsLoadRequestTypeType of load request
requestContextLineToolsAndGroupsLoadRequestContextAdditional information for the request

Returns

The drawings and drawing groups state

Promise<Partial<LineToolsAndGroupsState>>


removeChart

Remove a chart.

Signature

removeChart(id: string | number) => Promise<void>

Parameters

NameTypeDescription
idstring | numberUnique ID of the chart (see getAllCharts)

Returns

Promise<void>


removeChartTemplate

Remove a chart template.

Signature

removeChartTemplate(templateName: string) => Promise<void>

Parameters

NameTypeDescription
templateNamestringThe name of the template.

Returns

Promise<void>


removeDrawingTemplate

Remove a drawing template

Signature

removeDrawingTemplate(toolName: string, templateName: string) => Promise<void>

Parameters

NameTypeDescription
toolNamestringname of the drawing tool
templateNamestringname of the template

Returns

Promise<void>


removeStudyTemplate

Remove a study template

Signature

removeStudyTemplate(studyTemplateInfo: StudyTemplateMetaInfo) => Promise<void>

Parameters

NameType
studyTemplateInfoStudyTemplateMetaInfo

Returns

Promise<void>


saveChart

Save the chart

Signature

saveChart(chartData: ChartData) => Promise<string | number>

Parameters

NameTypeDescription
chartDataChartDataChart description data

Returns

unique ID of the chart

Promise<string | number>


saveChartTemplate

Save a chart template.

Signature

saveChartTemplate(newName: string, theme: ChartTemplateContent) => Promise<void>

Parameters

NameTypeDescription
newNamestringThe name of the template.
themeChartTemplateContentThe template content.

Returns

Promise<void>


saveDrawingTemplate

Save a drawing template

Signature

saveDrawingTemplate(toolName: string, templateName: string, content: string) => Promise<void>

Parameters

NameTypeDescription
toolNamestringname of the drawing tool
templateNamestringname of the template
contentstringcontent of the drawing template

Returns

Promise<void>


saveLineToolsAndGroups

Save drawings and drawing groups associated with a chart layout.

Signature

saveLineToolsAndGroups(layoutId: string, chartId: string | number, state: LineToolsAndGroupsState) => Promise<void>

Parameters

NameTypeDescription
layoutIdstringThe chart layout ID
chartIdstring | numberThe chart ID
stateLineToolsAndGroupsStateThe drawings and drawing groups state

Returns

Promise<void>


saveStudyTemplate

Save a study template

Signature

saveStudyTemplate(studyTemplateData: StudyTemplateData) => Promise<void>

Parameters

NameTypeDescription
studyTemplateDataStudyTemplateDataStudy template data to save

Returns

Promise<void>