2.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-17T15:54:31.440283+00:00 | zai-org/GLM-5-FP8 | 1 | 00811c8a21090fcd |
Documentation: DTS.Viewer.Graph Views
1. Purpose
This module provides WPF view components for graph and chart visualization within the DTS Viewer application. It contains three partial classes—GraphView, TestDataView, and TestDataSeriesView—that serve as code-behind files for their respective XAML views. These views implement interfaces from DTS.Common.Interface and provide chart rendering, user interaction handling, and export functionality (PDF and CSV) for test data series visualization.
2. Public Interface
GraphView
Signature: public partial class GraphView : IGraphView
GraphView()- Constructor. CallsInitializeComponent()to load the XAML-defined UI.
TestDataView
Signature: public partial class TestDataView : ITestDataView
TestDataView()- Constructor. CallsInitializeComponent()to load the XAML-defined UI.
TestDataSeriesView
Signature: public partial class TestDataSeriesView : ITestDataSeriesView
-
TestDataSeriesView()- Constructor. CallsInitializeComponent()to load the XAML-defined UI. -
bool SaveReportToPDF(string directory)- Generates a PDF report containing the chart image and a gRMS data table. Returnstrueon success,falseon failure. Creates the directory if it does not exist. Logs success/failure viaAPILogger. -
bool SaveReportToCSV(string directory)- Exports chart data to a CSV file with frequency and PSD values. Returnstrueon success,falseon failure. Creates the directory if it does not exist. Logs success/failure viaAPILogger.
AxisExtension (Static Class)
Signature: public static class AxisExtension
-
double GetDispMin(this Axis axis)- Extension method that calculates the displayed minimum value based onActualMin,ActualMax,Value, andScaleproperties. -
double GetDispMax(this Axis axis)- Extension method that calculates the displayed maximum value based onActualMin,ActualMax,Value, andScaleproperties.
3. Invariants
SaveReportToPDF: Thedirectoryparameter must not be null, empty, or whitespace; otherwise, aDirectoryNotFoundExceptionis thrown.SaveReportToPDF:MainChart.DataContextmust be castable toTestDataSeriesViewModel; a direct cast is performed without null checking.SaveReportToPDF:GraphDataSeriesmust contain at least one element (accessesdataSeries[0]for test setup name and test ID).SaveReportToCSV: All data series inGraphDataSeriesmust haveXvalueandYvaluearrays of equal or greater length than