Interface IOperationsChartViewModel
Last update: 16.07.2025Namespace: VM.Operations.Post.Interfaces
Assembly: VM.Operations.Post.dll
Represents the base interface for properties and methods that make up a chart view.
public interface IOperationsChartViewModel : IView, IOperationsBase
Implements
Examples
For an example that includes information about interfaces, see this example. To view the examples, refer to the location of the 'Install_Path\Motion\Document\Postprocessor API for Python.zip' file.
# IOperationsChartViewModel.py
import sys
current_dir = __file__.rsplit('\\', 1)[0]
external_modules_path = current_dir + '\\..\\..\\Modules'
sys.path.append(external_modules_path)
from OperationAPI import *
# Start the headless application interface
applicationHandler = ApplicationHandler()
# Import result file
result_file_path = get_result_file_path()
# Set array about result file
filepaths = List[str]()
filepaths.Add(result_file_path)
# Open about result files
applicationHandler.AddDocument(filepaths)
# Get Page
page = applicationHandler.GetActivePage()
# Create PlotView
chartView = page.CreateChart("Chart")
chartView.Legend.Background = Colors.Red
chartView.Legend.FontColor = Colors.Black
chartView.Legend.FontFace = FontFamily("Arial")
chartView.Legend.FontSize = 15
chartView.Legend.FontStyle = OperationAPIService.GetFontStyleFromString("Italic")
chartView.Legend.FontWeight = OperationAPIService.GetFontWeightFromString("Bold")
chartView.Legend.LegendPlacement = LegendPlacementType.Bottom
chartView.Legend.ItemsInFilter = "Visible Curves"
# Close the Pages
page.Close()
# Close Document
applicationHandler.CloseDocument(result_file_path)
Properties
Legend
Get or sets the legend for the chart.
IOperationsLegendModifier Legend { get; }
Property Value
Examples
For an example that includes this property, see the Interface IOperationsChartViewModel.
Remarks
The Legend property allows you to control the appearance and behavior of the chart's legend. Through this property, you can access various attributes of the legend and adjust them to fit your specific requirements.
Methods
ImportNumeric(string, List<INumericParameter>)
Imports curve data from an external file and adds the curves to the chart view.
void ImportNumeric(string filepath, List<INumericParameter> targets)
Parameters
filepath string
The path to the file containing the exported curves. Supported file formats include (*.txt, *.csv, *.out, *.rsp).
targets List<INumericParameter>
A list of
Examples
For an example that includes this property, see the Interface ApplicationHandler.
Remarks
This method reads curve data from the specified file and adds the corresponding curves to the chart view.
Each targets 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.