Skip to content

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

View source

        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

NameSummary
.ctorInitializes a new instance of the [LiveChartViewModel](# class and sets up the chart view within the specified grid. container.

Properties

NameSummary
AxesGets or sets the collection of Y-axis objects used for plotting data on the chart.
PlotLinesCollectionUIGets the collection of axes used for plotting data in the chart.
ControlMenuGets the collection of plot line UI elements displayed in the chart.
AxisLinesUIGets the collection of chart objects that represent the controls available in the menu interface.
CrosshairCollectionGets the collection of axis line UI elements associated with the control.
LabelCollectionGets the collection of crosshair UI elements currently managed by the control.
WpfPlot1vmGets or sets the collection of marker and text label pairs displayed on the plot.
MouseCoordinatesObservableGets or sets the observable stream for mouse coordinate updates.
GraphLockedGets the command that is executed when the graph is locked, preventing further modifications.
EnableMarkerBtnGets the command that enables the marker button in the user interface.
AddCrosshairBtnGets the command that adds a crosshair to the current context when executed.
RemoveLabelsBtnGets the command that removes all labels from the current selection.
ExpandMenuBtnGets the command that expands the menu when executed.
LeftPanelVisibilityGets or sets the visibility state of the left panel.
LinePropCommandGets the command that executes the line property action.
YAxisListGets or sets the collection of Y-axis objects used for plotting data.
XAxis1Gets or sets the collection of Y-axis definitions used for plotting data on the chart.
ChartObjectsCollectionGets 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

NameSummary
static AutoScaleXCreates an action that automatically adjusts the horizontal axis scaling of a plot using the specified X-axis configuration.
static AutoScaleYCreates an action that automatically adjusts the Y-axis range of a plot to fit its data within the specified RenderPack.
static AutoScaleAllCreates an action that automatically adjusts all axes in a plot to fit the current data.
HideAllYAxisHides all Y-axis elements by setting their visibility to false.
CreateAxisWithTimeStampConfigures the plot to use a bottom axis displaying date and time ticks, and sets the axis range to cover all possible date values.
AxisStyleConfigures the plot axes and grid to hide tick labels, remove tick marks, and display the plot without a frame.
CreateAxisWithPointsRemoves the existing bottom axis from the plot and creates a new bottom axis with updated settings.
SetXAxisColourSets the colors for the X-axis labels, ticks, and frame to predefined values for improved visual clarity.
ClearLabelsRemoves all label markers and associated text from the plot and clears the label collection.
ClearAxisCrosshairsRemoves all axis-related crosshair lines and markers from the plot and clears the crosshair collection.
ClearAxisLinesRemoves all axis lines from the plot and disposes of their associated resources.
ClearContentRemoves all plot data, controls, and labels from the current view, releasing associated resources.
YAxesSetupConfigures 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.
ManualScaleYSets the Y-axis limits of all axes in the plot to the range 0 to 100.
InitializeGenericPlotLinesInitializes 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...
InitializeScatterPlotLinesInitializes scatter plot lines using the provided collection of observable data series.
InitializeLinesForScatterObservablesPointsInitializes plot lines for scatter plots using a collection of observable point sequences.
InitializeSignalPlotLinesInitializes plot lines for signal data using the provided collection of observables.
InitializeDataLoggerPlotLinesWithPointsInitializes plot lines with data points for the data logger using the provided observables.
InitializeLinesForSignalPointsInitializes plot lines for a single set of signal points using the specified data tuple.
InitializeLinesForSignalObservablesPointsInitializes plot lines for a collection of signal observables, configuring each line to display its corresponding data points on the plot.
InitializeLinesForScatterPointsInitializes and adds a new scatter plot line to the chart using the specified data points and axis.
InitializeControlMenuInitializes the control menu with the specified chart object settings, replacing any existing items.
InitializeAxisLinesInitializes and configures axis line elements for the plot, adding them to the plottable collection if available.
UpdateChartObjectsCollectionUpdates the ChartObjectsCollection from current plot lines. Called automatically after plot initialization.
GetLineUnderMouseGets the axis line located under the specified mouse coordinates, if any.
Inherited members