7.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T12:25:32.635258+00:00 | zai-org/GLM-5-FP8 | 1 | a0d576d041a71e53 |
Documentation: Chart Options Interfaces
1. Purpose
This module defines the contract for chart configuration and visualization options within the DTS system. It provides three interfaces (IChartOptionsView, IChartOptionsViewModel, IChartOptionsModel) that follow an MVVM (Model-View-ViewModel) pattern to manage chart display settings including axis scaling, cursors, unit types, filtering, and export functionality. These interfaces enable decoupled communication between UI components and business logic for chart rendering.
2. Public Interface
IChartOptionsView
Namespace: DTS.Common.Interface
A marker interface extending IBaseView with no additional members.
public interface IChartOptionsView : IBaseView { }
IChartOptionsViewModel
Namespace: DTS.Common.Interface
Extends IBaseViewModel and coordinates between the view and model for chart options.
| Member | Type | Description |
|---|---|---|
View |
IBaseView |
Gets or sets the Search View. |
Parent |
IBaseViewModel |
Gets or sets the parent view model. |
Model |
IChartOptionsModel |
Gets or sets the associated chart options model. |
ContextSearchRegion |
object |
Gets or sets a context search region object. |
Methods:
| Method | Signature | Description |
|---|---|---|
PublishChanges |
void PublishChanges() |
Publishes pending changes. |
ResetZoomMethod |
void ResetZoomMethod() |
Resets the chart zoom. |
ResetTMethod |
void ResetTMethod() |
Resets the time axis. |
SaveToPDFMethod |
void SaveToPDFMethod() |
Saves the chart to PDF. |
ShowCusor |
void ShowCusor(bool value) |
Shows or hides the cursor. |
ShowMinMaxCursor |
void ShowMinMaxCursor(bool value) |
Shows or hides the min/max cursor. |
IChartOptionsModel
Namespace: DTS.Common.Interface
Extends IBaseModel and holds all chart configuration state and commands.
ADC/mV Display Properties:
| Property | Type | Description |
|---|---|---|
SupportsADC |
bool |
True if all channels support ADC. |
SupportsMV |
bool |
True if all channels support mV. |
DisplayingVolts |
bool |
Indicates if current mV option is for Volts or mV. |
MVOrV |
string |
Returns "mV" or "V" depending on DisplayingVolts value. |
Y-Axis Properties:
| Property | Type | Description |
|---|---|---|
FullScaleValues |
List<double> |
Available full scale values. |
SelectedFullScaleValue |
double |
Currently selected full scale value. |
MinFixedY |
double |
Minimum fixed Y value. |
MaxFixedY |
double |
Maximum fixed Y value. |
LockedY |
bool |
Indicates if Y-axis is locked. |
YRange |
YRangeScaleEnum |
Y-axis range scale setting. |
UnitType |
ChartUnitTypeEnum |
Chart unit type. |
UnitTypeDescription |
string |
Description of the unit type (getter only). |
Time Axis Properties:
| Property | Type | Description |
|---|---|---|
MinFixedT |
double |
Minimum fixed T value. |
MaxFixedT |
double |
Maximum fixed T value. |
LockedT |
bool |
Indicates if T-axis is locked. |
TimeUnitType |
TimeUnitTypeEnum |
Time unit type setting. |
Cursor Properties:
| Property | Type | Description |
|---|---|---|
ShowCursor |
bool |
Indicates if cursor is shown. |
CurrentCursorValues |
string |
Current cursor values as string. |
IsCursorsAvailable |
bool |
Indicates if cursors are available. |
Filter Properties:
| Property | Type | Description |
|---|---|---|
Filter |
FilterOptionEnum |
Filter option setting. |
SelectedFilter |
IFilterClass |
Selected filter class instance. |
Other Properties:
| Property | Type | Description |
|---|---|---|
Parent |
IChartOptionsViewModel |
Parent view model reference. |
CanPublishChanges |
bool |
Indicates if changes can be published. |
ReadData |
bool |
Indicates if data should be read. |
IsDigitalChannel |
bool |
Indicates if channel is digital. |
DecimateData |
bool |
Indicates if data should be decimated. |
WidthPoints |
long |
Width points value. |
Commands:
| Property | Type | Description |
|---|---|---|
ResetZoomCommand |
DelegateCommand |
Command to reset zoom. |
ResetTCommand |
DelegateCommand |
Command to reset time axis. |
SaveToPDFCommand |
DelegateCommand |
Command to save to PDF. |
3. Invariants
-
Namespace Mismatch: All three interfaces are declared in
DTS.Common.Interfacenamespace, despite the file path suggestingDTS.Viewer.ChartOptions. The// ReSharper disable CheckNamespacedirective indicates this is intentional. -
MVVM Hierarchy:
IChartOptionsViewmust implementIBaseViewIChartOptionsViewModelmust implementIBaseViewModelIChartOptionsModelmust implementIBaseModel
-
Parent-Child Relationships:
IChartOptionsModel.Parentmust reference theIChartOptionsViewModelthat owns itIChartOptionsViewModel.Modelmust reference theIChartOptionsModelit manages
-
Unit Display Logic:
MVOrVproperty return value is determined byDisplayingVoltsstate. -
Command Availability: The model exposes commands as
DelegateCommand(Prism), implying they follow theICommandpattern with execute/can-execute semantics.
4. Dependencies
This module depends on:
DTS.Common.Base- ProvidesIBaseView,IBaseViewModel,IBaseModelDTS.Common.Enums.Viewer- ProvidesYRangeScaleEnum,ChartUnitTypeEnum,TimeUnitTypeEnum,FilterOptionEnumDTS.Common.Interface.Sensors.SoftwareFilters- ProvidesIFilterClassMicrosoft.Practices.Prism.Commands- ProvidesDelegateCommandSystem.Collections.Generic- ProvidesList<T>System.Windows.Input- ProvidesICommand(indirectly viaDelegateCommand)
What depends on this module:
- Unclear from source alone - No consumers are shown in these files. Likely implementations exist in a viewer/charting module.
5. Gotchas
-
Typo in Method Name:
ShowCusor(bool value)is misspelled (should beShowCursor). This typo is part of the public API and must be used as-is. -
Namespace/Path Inconsistency: Files are located in
Common/DTS.CommonCore/Interface/DTS.Viewer/ChartOptions/but declare namespaceDTS.Common.Interface. The ReSharper suppression confirms this is deliberate but may cause confusion during navigation. -
Command vs Method Duplication:
IChartOptionsModelexposesResetZoomCommand,ResetTCommand,SaveToPDFCommandwhileIChartOptionsViewModelexposes corresponding methodsResetZoomMethod(),ResetTMethod(),SaveToPDFMethod(). The relationship between these is not documented in the source. -
Mixed Naming Conventions: Some methods use
Methodsuffix (e.g.,ResetZoomMethod) while properties useCommandsuffix (e.g.,ResetZoomCommand). The rationale is unclear from source alone.