Skip to main content

Interface: IExternalSaveLoadAdapter

Charting Library.IExternalSaveLoadAdapter

Methods

getAllChartTemplates

getAllChartTemplates(): Promise<string[]>

Get names of all saved chart templates.

Returns

Promise<string[]>

An array of names.


getAllCharts

getAllCharts(): Promise<ChartMetaInfo[]>

Get all saved charts.

Returns

Promise<ChartMetaInfo[]>

Array of chart meta information


getAllStudyTemplates

getAllStudyTemplates(): Promise<StudyTemplateMetaInfo[]>

Get all saved study templates

Returns

Promise<StudyTemplateMetaInfo[]>

Array of study template meta information


getChartContent

getChartContent(chartId): Promise<string>

Load the chart from the server

Parameters

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

Returns

Promise<string>

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


getChartTemplateContent

getChartTemplateContent(templateName): Promise<ChartTemplate>

Load a chart template from the server

Parameters

NameTypeDescription
templateNamestringThe name of the template.

Returns

Promise<ChartTemplate>

The chart template content.


getDrawingTemplates

getDrawingTemplates(toolName): Promise<string[]>

Get names of all saved drawing templates

Parameters

NameTypeDescription
toolNamestringname of the drawing tool

Returns

Promise<string[]>

names of saved drawing templates


getStudyTemplateContent

getStudyTemplateContent(studyTemplateInfo): Promise<string>

load a study template from the server

Parameters

NameType
studyTemplateInfoStudyTemplateMetaInfo

Returns

Promise<string>

Study template content


loadDrawingTemplate

loadDrawingTemplate(toolName, templateName): Promise<string>

Load a drawing template from the server

Parameters

NameTypeDescription
toolNamestringname of the drawing tool
templateNamestringname of the template

Returns

Promise<string>

content of the drawing template


loadLineToolsAndGroups

loadLineToolsAndGroups(layoutId, chartId, requestType, requestContext): Promise<Partial<LineToolsAndGroupsState>>

Load drawings and drawing groups associated with a chart layout.

Parameters

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

Returns

Promise<Partial<LineToolsAndGroupsState>>

The drawings and drawing groups state


removeChart

removeChart(id): Promise<void>

Remove a chart.

Parameters

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

Returns

Promise<void>


removeChartTemplate

removeChartTemplate(templateName): Promise<void>

Remove a chart template.

Parameters

NameTypeDescription
templateNamestringThe name of the template.

Returns

Promise<void>


removeDrawingTemplate

removeDrawingTemplate(toolName, templateName): Promise<void>

Remove a drawing template

Parameters

NameTypeDescription
toolNamestringname of the drawing tool
templateNamestringname of the template

Returns

Promise<void>


removeStudyTemplate

removeStudyTemplate(studyTemplateInfo): Promise<void>

Remove a study template

Parameters

NameType
studyTemplateInfoStudyTemplateMetaInfo

Returns

Promise<void>


saveChart

saveChart(chartData): Promise<string | number>

Save the chart

Parameters

NameTypeDescription
chartDataChartDataChart description data

Returns

Promise<string | number>

unique ID of the chart


saveChartTemplate

saveChartTemplate(newName, theme): Promise<void>

Save a chart template.

Parameters

NameTypeDescription
newNamestringThe name of the template.
themeChartTemplateContentThe template content.

Returns

Promise<void>


saveDrawingTemplate

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

Save a drawing template

Parameters

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

Returns

Promise<void>


saveLineToolsAndGroups

saveLineToolsAndGroups(layoutId, chartId, state): Promise<void>

Save drawings and drawing groups associated with a chart layout.

Parameters

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

Returns

Promise<void>


saveStudyTemplate

saveStudyTemplate(studyTemplateData): Promise<void>

Save a study template

Parameters

NameTypeDescription
studyTemplateDataStudyTemplateDataStudy template data to save

Returns

Promise<void>