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