LiveChartViewModel class¶
Attributes: [SupportedOSPlatform("windows")] [SupportedOSPlatform("windows")] [SupportedOSPlatform("windows")] [SupportedOSPlatform("windows")]
Defined in
Namespace: CrissCross.WPF.Plot
Assembly: CrissCross.WPF.Plot.dll
Full name: CrissCross.WPF.Plot.LiveChartViewModel
Modifiers: public
Summary¶
Represents the view model for a live chart, providing data binding and interaction logic for chart visualization
components.
Applies to
net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481
Class hierarchy
classDiagram
class LiveChartViewModel
class RxObject
RxObject <|-- LiveChartViewModel
Inherits from: RxObject
Remarks¶
This class is intended for use with Windows 10 version 19041 or later. It exposes methods and properties to support interactive chart features, such as detecting axis lines under the mouse cursor and managing crosshair collections. Thread safety and platform compatibility should be considered when integrating with UI components.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [LiveChartViewModel](# class and sets up the chart view within the specified grid. container. |
Properties¶
| Name | Summary |
|---|---|
| Axes | Gets or sets the collection of Y-axis objects used for plotting data on the chart. |
| PlotLinesCollectionUI | Gets the collection of axes used for plotting data in the chart. |
| ControlMenu | Gets the collection of plot line UI elements displayed in the chart. |
| AxisLinesUI | Gets the collection of chart objects that represent the controls available in the menu interface. |
| CrosshairCollection | Gets the collection of axis line UI elements associated with the control. |
| LabelCollection | Gets the collection of crosshair UI elements currently managed by the control. |
| WpfPlot1vm | Gets or sets the collection of marker and text label pairs displayed on the plot. |
| MouseCoordinatesObservable | Gets or sets the observable stream for mouse coordinate updates. |
| GraphLocked | Gets the command that is executed when the graph is locked, preventing further modifications. |
| EnableMarkerBtn | Gets the command that enables the marker button in the user interface. |
| AddCrosshairBtn | Gets the command that adds a crosshair to the current context when executed. |
| RemoveLabelsBtn | Gets the command that removes all labels from the current selection. |
| ExpandMenuBtn | Gets the command that expands the menu when executed. |
| LeftPanelVisibility | Gets or sets the visibility state of the left panel. |
| LinePropCommand | Gets the command that executes the line property action. |
| YAxisList | Gets or sets the collection of Y-axis objects used for plotting data. |
| XAxis1 | Gets or sets the collection of Y-axis definitions used for plotting data on the chart. |
| ChartObjectsCollection | Gets the collection of chart objects representing line settings. This collection is automatically populated when plot lines are created. |
| SelectedSetting | |
| RightPropertyVisibility | |
| CrossHairEnabled | |
| IsMenuExpanded | |
| Title | |
| LegendPosition | |
| IsXAxisDateTime | |
| NumberPointsPlotted | |
| UseFixedNumberOfPoints |
Methods¶
| Name | Summary |
|---|---|
| static AutoScaleX | Creates an action that automatically adjusts the horizontal axis scaling of a plot using the specified X-axis configuration. |
| static AutoScaleY | Creates an action that automatically adjusts the Y-axis range of a plot to fit its data within the specified RenderPack. |
| static AutoScaleAll | Creates an action that automatically adjusts all axes in a plot to fit the current data. |
| HideAllYAxis | Hides all Y-axis elements by setting their visibility to false. |
| CreateAxisWithTimeStamp | Configures the plot to use a bottom axis displaying date and time ticks, and sets the axis range to cover all possible date values. |
| AxisStyle | Configures the plot axes and grid to hide tick labels, remove tick marks, and display the plot without a frame. |
| CreateAxisWithPoints | Removes the existing bottom axis from the plot and creates a new bottom axis with updated settings. |
| SetXAxisColour | Sets the colors for the X-axis labels, ticks, and frame to predefined values for improved visual clarity. |
| ClearLabels | Removes all label markers and associated text from the plot and clears the label collection. |
| ClearAxisCrosshairs | Removes all axis-related crosshair lines and markers from the plot and clears the crosshair collection. |
| ClearAxisLines | Removes all axis lines from the plot and disposes of their associated resources. |
| ClearContent | Removes all plot data, controls, and labels from the current view, releasing associated resources. |
| YAxesSetup | Configures the Y-axes of the plot using the specified axis names and colors. Existing Y-axes are removed and replaced with new right-side axes corresponding to the provided data. |
| ManualScaleY | Sets the Y-axis limits of all axes in the plot to the range 0 to 100. |
| InitializeGenericPlotLines | Initializes and configures up to 16 plot lines in the chart using the provided data and UI creation logic, assigning each plot line to the appropriate Y-axis and setting up the X-axis as... |
| InitializeScatterPlotLines | Initializes scatter plot lines using the provided collection of observable data series. |
| InitializeLinesForScatterObservablesPoints | Initializes plot lines for scatter plots using a collection of observable point sequences. |
| InitializeSignalPlotLines | Initializes plot lines for signal data using the provided collection of observables. |
| InitializeDataLoggerPlotLinesWithPoints | Initializes plot lines with data points for the data logger using the provided observables. |
| InitializeLinesForSignalPoints | Initializes plot lines for a single set of signal points using the specified data tuple. |
| InitializeLinesForSignalObservablesPoints | Initializes plot lines for a collection of signal observables, configuring each line to display its corresponding data points on the plot. |
| InitializeLinesForScatterPoints | Initializes and adds a new scatter plot line to the chart using the specified data points and axis. |
| InitializeControlMenu | Initializes the control menu with the specified chart object settings, replacing any existing items. |
| InitializeAxisLines | Initializes and configures axis line elements for the plot, adding them to the plottable collection if available. |
| UpdateChartObjectsCollection | Updates the ChartObjectsCollection from current plot lines. Called automatically after plot initialization. |
| GetLineUnderMouse | Gets the axis line located under the specified mouse coordinates, if any. |
Inherited members
CrissCross.RxObject.#ctorCrissCross.RxObject.DisposeCrissCross.RxObject.WhenNavigatedFrom(CrissCross.IViewModelNavigationEventArgs)CrissCross.RxObject.WhenNavigatedTo(CrissCross.IViewModelNavigationEventArgs,System.Reactive.Disposables.CompositeDisposable)CrissCross.RxObject.WhenNavigating(CrissCross.IViewModelNavigatingEventArgs)CrissCross.RxObject.Dispose(System.Boolean)CrissCross.RxObject.NameCrissCross.RxObject.DisplayNameCrissCross.RxObject.IsDisposedCrissCross.RxObject.DisposablesSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)System.Object.ToString