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
Name | Type | Description |
---|---|---|
chartId | number | Unique 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
Name | Type | Description |
---|---|---|
templateName | string | The name of the template. |
Returns
Promise
<ChartTemplate
>
The chart template content.
getDrawingTemplates
▸ getDrawingTemplates(toolName
): Promise
<string
[]>
Get names of all saved drawing templates
Parameters
Name | Type | Description |
---|---|---|
toolName | string | name 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
Name | Type |
---|---|
studyTemplateInfo | StudyTemplateMetaInfo |
Returns
Promise
<string
>
Study template content
loadDrawingTemplate
▸ loadDrawingTemplate(toolName
, templateName
): Promise
<string
>
Load a drawing template from the server
Parameters
Name | Type | Description |
---|---|---|
toolName | string | name of the drawing tool |
templateName | string | name of the template |
Returns
Promise
<string
>
content of the drawing template
removeChart
▸ removeChart<T
>(id
): Promise
<void
>
Remove a chart.
Type parameters
Name | Type |
---|---|
T | extends string | number |
Parameters
Name | Type | Description |
---|---|---|
id | T | Unique ID of the chart (see getAllCharts) |
Returns
Promise
<void
>
removeChartTemplate
▸ removeChartTemplate(templateName
): Promise
<void
>
Remove a chart template.
Parameters
Name | Type | Description |
---|---|---|
templateName | string | The name of the template. |
Returns
Promise
<void
>
removeDrawingTemplate
▸ removeDrawingTemplate(toolName
, templateName
): Promise
<void
>
Remove a drawing template
Parameters
Name | Type | Description |
---|---|---|
toolName | string | name of the drawing tool |
templateName | string | name of the template |
Returns
Promise
<void
>
removeStudyTemplate
▸ removeStudyTemplate(studyTemplateInfo
): Promise
<void
>
Remove a study template
Parameters
Name | Type |
---|---|
studyTemplateInfo | StudyTemplateMetaInfo |
Returns
Promise
<void
>
saveChart
▸ saveChart(chartData
): Promise
<string
>
Save the chart
Parameters
Name | Type | Description |
---|---|---|
chartData | ChartData | Chart description data |
Returns
Promise
<string
>
unique ID of the chart
saveChartTemplate
▸ saveChartTemplate(newName
, theme
): Promise
<void
>
Save a chart template.
Parameters
Name | Type | Description |
---|---|---|
newName | string | The name of the template. |
theme | ChartTemplateContent | The template content. |
Returns
Promise
<void
>
saveDrawingTemplate
▸ saveDrawingTemplate(toolName
, templateName
, content
): Promise
<void
>
Save a drawing template
Parameters
Name | Type | Description |
---|---|---|
toolName | string | name of the drawing tool |
templateName | string | name of the template |
content | string | content of the drawing template |
Returns
Promise
<void
>
saveStudyTemplate
▸ saveStudyTemplate(studyTemplateData
): Promise
<void
>
Save a study template
Parameters
Name | Type | Description |
---|---|---|
studyTemplateData | StudyTemplateData | Study template data to save |
Returns
Promise
<void
>