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 | string | 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
loadLineToolsAndGroups
▸ loadLineToolsAndGroups(layoutId, chartId, requestType, requestContext): Promise<Partial<LineToolsAndGroupsState>>
Load drawings and drawing groups associated with a chart layout.
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
Promise<Partial<LineToolsAndGroupsState>>
The drawings and drawing groups state
removeChart
▸ removeChart(id): Promise<void>
Remove a chart.
Parameters
| Name | Type | Description |
|---|---|---|
id | string | number | 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 | number>
Save the chart
Parameters
| Name | Type | Description |
|---|---|---|
chartData | ChartData | Chart description data |
Returns
Promise<string | number>
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>
saveLineToolsAndGroups
▸ saveLineToolsAndGroups(layoutId, chartId, state): Promise<void>
Save drawings and drawing groups associated with a chart layout.
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
▸ saveStudyTemplate(studyTemplateData): Promise<void>
Save a study template
Parameters
| Name | Type | Description |
|---|---|---|
studyTemplateData | StudyTemplateData | Study template data to save |
Returns
Promise<void>