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: string | number) => Promise<string>
Parameters
Name | Type | Description |
---|---|---|
chartId | string | 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>
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
Name | Type | Description |
---|---|---|
layoutId | string | The chart layout ID |
chartId | string | number | The chart ID |
requestType | LineToolsAndGroupsLoadRequestType | Type of load request |
requestContext | LineToolsAndGroupsLoadRequestContext | Additional 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
Name | Type | Description |
---|---|---|
id | string | number | 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 | number>
Parameters
Name | Type | Description |
---|---|---|
chartData | ChartData | Chart 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
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>
saveLineToolsAndGroups
Save drawings and drawing groups associated with a chart layout.
Signature
saveLineToolsAndGroups(layoutId: string, chartId: string | number, state: LineToolsAndGroupsState) => Promise<void>
Parameters
Name | Type | Description |
---|---|---|
layoutId | string | The chart layout ID |
chartId | string | number | The chart ID |
state | LineToolsAndGroupsState | The drawings and drawing groups state |
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>