Assembly: VM.Operations.Post.dll Represents the base interface for properties and methods that make up a 2D chart view.
Implements
IView, IOperationsBaseProperties
Background
Gets or sets the background color of the chart view.Property Value
ColorExamples
The following example demonstrates how to use theBackground property:
Remarks
This property allows you to set the background color of the chart view. In the UI, this property is represented under the “Color” category with the property name “Back Ground”.BorderColor
Gets or sets the border color of the chart view.Property Value
ColorExamples
The following example demonstrates how to use theBorderColor property:
Remarks
This property allows you to set the border color of the chart view. In the UI, this property is represented under the “Color” category with the property name “Border Color”.ChartAxisType
Gets or sets the axis type of the chart, indicating whether to display the chart’s axis as single or multiple.Property Value
ChartAxisTypeExamples
The following example demonstrates how to use theChartAxisType property:
Remarks
This property allows you to set the axis type of the chart. It indicates whether the chart’s axis is displayed as single or multiple. In the UI, this property is represented under the “Axis” category with the property name “Axis Type”. The available options are:- Single
- Multiple
ChartTitle
Gets or sets the title of the chart view.Property Value
stringExamples
The following example demonstrates how to use theChartTitle property:
Remarks
This property allows you to set the title of the chart view. In the UI, this property is represented under the “Chart” category with the property name “Title”.FontColor
Gets or sets the font color of the chart view’s title.Property Value
ColorExamples
The following example demonstrates how to use theFontColor property:
Remarks
This property allows you to set the font color of the chart view’s title. In the UI, this property is represented under the “Chart” category with the property name “Font Color”.FontFace
Gets or sets the font face of the chart title.Property Value
FontFamilyExamples
The following example demonstrates how to use theFontFace property:
Remarks
This property allows you to set the font face of the chart title. In the UI, this property is represented under the “Font” category with the property name “Face”.FontSize
Gets or sets the font size of the chart title.Property Value
doubleExamples
The following example demonstrates how to use theFontSize property:
Remarks
This property allows you to set the font size of the chart title. In the UI, this property is represented under the “Font” category with the property name “Size”.FontStyle
Gets or sets the font style of the chart title.Property Value
FontStyleExamples
The following example demonstrates how to use theFontStyle property:
Remarks
This property allows you to set the font style of the chart title. In the UI, this property is represented under the “Font” category with the property name “Style”. The supported types are:- Italic
- Normal
- Oblique
FontWeight
Gets or sets the font weight of the chart title.Property Value
FontWeightExamples
The following example demonstrates how to use theFontWeight property:
Remarks
This property allows you to set the font weight of the chart title. In the UI, this property is represented under the “Font” category with the property name “Weight”. The available options are:- Bold
- Normal
Methods
AddCurves(string, PlotParameters)
Adds curves to the chart by reading data from the specified file path and using the given plot parameters.Parameters
filepath string
The path to the file containing the curve data.
parameters PlotParameters
The parameters used for plotting the curves, including target entity, data paths, coordinate system, and plot data type.
- Target - The target entity for plotting the curves.
- PlotDataType - Default or Plot Data.
- Paths - An Paths representing the paths to the data to be read. This is a combination of characteristic and component.
- CSYS - The coordinate system to be used.
Returns
IOperationsLineDataSeriesViewModelBase[] An array of IOperationsLineDataSeriesViewModelBase representing the added curves.Examples
The following example demonstrates how to use theAddCurves method:
Remarks
This method reads data from the specified file path and adds curves to the chart using the provided plot parameters.ExportAllCurves(string)
Exports all curves contained in the chart to the specified file path without displaying a file save dialog.Parameters
filepath string
The file path where the curves will be saved.
Examples
The following example demonstrates how to use theExportAllCurves method:
Remarks
This method exports all data series contained in the chart without displaying a file save dialog. It accepts a file path as a parameter and saves the curves directly to that location. This method is recommended for use with the OperationAPI, especially for repetitive tasks or scenarios requiring automation.ExportAllDataSeries()
Exports all data series included in the chart.Examples
The following example demonstrates how to use theExportAllDataSeries method:
Remarks
This method exports all curves contained in the chart. When used via the OperationAPI, a file dialog appears on the screen to specify the file save location. Therefore, it is not recommended for repetitive tasks or scenarios requiring automation. Instead, it is recommended to use the ExportAllCurves() method, which does not display a file save dialog.GetAxis(string)
Retrieves an axis by its name.Parameters
name string
The name of the axis to be retrieved.
Returns
IOperationsAxisViewModelBase An instance of IOperationsAxisViewModelBase representing the axis with the specified name, ornull if no such axis exists.
Examples
The following example demonstrates how to use theGetAxis method:
Remarks
This method searches for an axis with the given name and returns the corresponding instance. If no axis with the specified name is found, the method returnsnull.
GetCurve(string)
Gets a curve from the chart by its name.Parameters
name string
The name of the curve to retrieve.
Returns
IOperationsLineDataSeriesViewModelBase An instance of IOperationsLineDataSeriesViewModelBase representing the curve with the specified name, ornull if no such curve exists.
Examples
The following example demonstrates how to use theGetCurve method:
Remarks
This method searches for and returns the curve with the given name from the chart. If no curve with the specified name is found, it returnsnull.
GetCurveByID(string)
Gets a curve from the chart by its ID.Parameters
id string
The ID of the curve to retrieve.
Returns
IOperationsLineDataSeriesViewModelBase An instance of IOperationsLineDataSeriesViewModelBase representing the curve with the specified ID, ornull if no such curve exists.
Examples
The following example demonstrates how to use theGetCurveByID method:
Remarks
This method searches for and returns the curve with the given ID from the chart. If no curve with the specified ID is found, it returnsnull.
GetCurveNameList()
Gets a list of names of all curves in the chart view.Returns
IEnumerable<string> An IEnumerable`1 containing the names of all curves currently in the chart view.Examples
The following example demonstrates how to use theGetCurveNameList method:
Remarks
This method retrieves the names of all the curves that are currently displayed in the chart view.GetCurves()
Gets all the curves currently included in the chart view.Returns
IEnumerable<IOperationsLineDataSeriesViewModelBase> An IEnumerable`1 containing all the curves currently in the chart view.Examples
The following example demonstrates how to use theGetCurves method:
Remarks
This method retrieves all the curves that are currently displayed in the chart view.GetCurves(string)
Gets all curves from the chart view that contain the specified substring in their names.Parameters
name string
A substring to search for within the curve names.
Returns
IEnumerable<IOperationsLineDataSeriesViewModelBase> An IEnumerable`1 containing all curves that include the specified substring in their names.Examples
The following example demonstrates how to use theGetCurves method:
Remarks
This method searches for and returns all curves whose names contain the specified substring. If no such curves are found, an empty collection is returned.GetLastCurve()
Gets the most recently added curve from the chart view.Returns
IOperationsLineDataSeriesViewModelBase An instance of IOperationsLineDataSeriesViewModelBase representing the last added curve, ornull if no curves are present.
Examples
The following example demonstrates how to use theGetLastCurve method:
Remarks
This method retrieves the curve that was added last to the chart view. If no curves have been added, it returnsnull.
ImportNumeric(string, List<INumericParameter>)
Imports curve data from an external file and adds the curves to the chart view.Parameters
filepath string
The path to the file containing the exported curves.
targets List<INumericParameter>
A list of INumericParameter objects that specify the parameters for the curves to be created.
Examples
The following example demonstrates how to use theImportNumeric method:
Remarks
This method reads curve data from the specified file and adds the corresponding curves to the chart view. Each INumericParameter in thetargets list contains the following properties:
- NameThe name of the curve to be created.
- TargetXThe path to the data for the X-axis.
- TargetYThe path to the data for the Y-axis.
Remove(string)
Removes a curve from the chart by its name.Parameters
id string
The id of the curve to be removed.
Examples
The following example demonstrates how to use theRemove method:
Remarks
This method deletes the curve with the specified name from the chart. If no curve with the given name exists, no action is taken.Remove(IOperationsLineDataSeriesViewModelBase)
Removes a curve from the chart by its instance.Parameters
curve IOperationsLineDataSeriesViewModelBase
The instance of the curve to be removed.
Examples
The following example demonstrates how to use theRemove method: