CartesianChart Class
Definition
A chart that uses the Cartesian coordinate system to plot data points.
public class CartesianChart
Constructors
| Name | Description |
|---|---|
| CartesianChart | Initializes a new instance of the Avalonia.Controls.Charts.CartesianChart class. |
CartesianChart Constructor
Initializes a new instance of the Avalonia.Controls.Charts.CartesianChart class.
public CartesianChart()
Methods
| Name | Description |
|---|---|
| AddHandler (2 overloads) | Adds a handler for the specified routed event. Inherited from Interactive. |
| ApplyStyling | Applies styling to the control if the control is initialized and styling is not already applied. Inherited from StyledElement. |
| ApplyTemplate | Creates the visual children of the control, if necessary Inherited from TemplatedControl. |
| Arrange | Arranges the control and its children. Inherited from Layoutable. |
| BeginInit | Inherited from StyledElement. |
| Bind (8 overloads) | Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject. |
| CalculateMarkerPadding | Calculates the maximum extra padding required so series markers, labels, and selection adornments are not clipped. |
| CheckAccess | Returns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject. |
| ClearValue (4 overloads) | Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject. |
| CoerceValue | Coerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject. |
| EndInit | Inherited from StyledElement. |
| Equals | Compares two objects using reference equality. Inherited from AvaloniaObject. |
| ExportAsync (3 overloads) | Inherited from ChartBase. |
| Focus | Focuses the control. Inherited from InputElement. |
| GetBaseValue | Inherited from AvaloniaObject. |
| GetFlowDirection | Gets the value of the attached Avalonia.Visual.FlowDirectionProperty on a control. Inherited from Visual. |
| GetHashCode | Gets the hash code for the object. Inherited from AvaloniaObject. |
| GetIsHoldingEnabled | Inherited from InputElement. |
| GetIsHoldWithMouseEnabled | Inherited from InputElement. |
| GetIsTemplateFocusTarget | Gets the value of the IsTemplateFocusTargetProperty attached property on a control. Inherited from TemplatedControl. |
| GetLegendItems | Gets the legend items for this chart based on its series. Inherited from ChartBase. |
| GetSeriesBrush | Gets the brush for a series at the specified index from the palette. Inherited from ChartBase. |
| GetValue (3 overloads) | Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| GoBackZoom | Restores the previous zoom state from the zoom history stack. |
| InvalidateArrange | Invalidates the arrangement of the control and queues a new layout pass. Inherited from Layoutable. |
| InvalidateMeasure | Invalidates the measurement of the control and queues a new layout pass. Inherited from Layoutable. |
| InvalidateVisual | Invalidates the visual and queues a repaint. Inherited from Visual. |
| IsAnimating | Checks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject. |
| IsSet | Checks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject. |
| Measure | Carries out a measure of the control. Inherited from Layoutable. |
| RaiseEvent | Raises a routed event. Inherited from Interactive. |
| RemoveHandler (2 overloads) | Removes a handler for the specified routed event. Inherited from Interactive. |
| Render | Clears stale hit regions then delegates to the Avalonia render pipeline. All derived chart overrides call base.Render(context), so this runs before every frame. |
| ReplayAnimation | Replays the entry animation. Inherited from ChartBase. |
| RequestUpdate | Requests a visual update. If updates are suspended, the redraw is deferred until Avalonia.Controls.Charts.CartesianChart.ResumeUpdates is called. |
| ResetZoom | Clears the current viewport overrides and returns the chart to its full data range. |
| ResumeUpdates | Resumes visual updates after a Avalonia.Controls.Charts.CartesianChart.SuspendUpdates call. If updates were pending, the chart will be redrawn. |
| SetCurrentValue (2 overloads) | Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject. |
| SetFlowDirection | Sets the value of the attached Avalonia.Visual.FlowDirectionProperty on a control. Inherited from Visual. |
| SetIsHoldingEnabled | Inherited from InputElement. |
| SetIsHoldWithMouseEnabled | Inherited from InputElement. |
| SetIsTemplateFocusTarget | Sets the value of the IsTemplateFocusTargetProperty attached property on a control. Inherited from TemplatedControl. |
| SetValue (3 overloads) | Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| SuspendUpdates | Suspends visual updates until Avalonia.Controls.Charts.CartesianChart.ResumeUpdates is called. Use for batch data changes to avoid redundant redraws. |
| TryGetResource | Inherited from StyledElement. |
| UpdateLayout | Executes a layout pass. Inherited from Layoutable. |
| ValueToNormalizedPosition | Converts a data value to a normalized position (0 to 1) based on the axis type. |
| VerifyAccess | Checks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject. |
| ZoomAt | Zooms the chart centered at the specified pivot point. |
| ZoomTo (2 overloads) | Sets the visible range for a single axis. |
CalculateMarkerPadding Method
Calculates the maximum extra padding required so series markers, labels, and selection adornments are not clipped.
public double CalculateMarkerPadding()
Returns
double
The padding, in device-independent pixels, that should be reserved around the plot area.
GoBackZoom Method
Restores the previous zoom state from the zoom history stack.
public bool GoBackZoom()
Returns
bool
True if a previous zoom state was restored; otherwise, false.
Render Method
Clears stale hit regions then delegates to the Avalonia render pipeline. All derived chart overrides call base.Render(context), so this runs before every frame.
public void Render(Avalonia.Media.DrawingContext context)
Parameters
context Avalonia.Media.DrawingContext
The drawing context.
RequestUpdate Method
Requests a visual update. If updates are suspended, the redraw is deferred until Avalonia.Controls.Charts.CartesianChart.ResumeUpdates is called.
public void RequestUpdate()
ResetZoom Method
Clears the current viewport overrides and returns the chart to its full data range.
public void ResetZoom()
ResumeUpdates Method
Resumes visual updates after a Avalonia.Controls.Charts.CartesianChart.SuspendUpdates call. If updates were pending, the chart will be redrawn.
public void ResumeUpdates()
SuspendUpdates Method
Suspends visual updates until Avalonia.Controls.Charts.CartesianChart.ResumeUpdates is called. Use for batch data changes to avoid redundant redraws.
public void SuspendUpdates()
ValueToNormalizedPosition Method
Converts a data value to a normalized position (0 to 1) based on the axis type.
public double ValueToNormalizedPosition(double value, double axisMin, double axisMax)
Parameters
value double
axisMin double
axisMax double
Returns
double
ZoomAt Method
Zooms the chart centered at the specified pivot point.
public void ZoomAt(double zoomFactor, double pivotX, double pivotY)
Parameters
zoomFactor double
The factor to multiply current range by (e.g., 0.9 for zoom in, 1.1 for zoom out).
pivotX double
The X coordinate of the pivot point (relative to the chart control).
pivotY double
The Y coordinate of the pivot point (relative to the chart control).
ZoomTo overloads
ZoomTo Method
Sets the visible range for a single axis.
public void ZoomTo(double newMin, double newMax, Avalonia.Controls.Charts.ChartAxis axis)
Parameters
newMin double
The new minimum value for the axis viewport.
newMax double
The new maximum value for the axis viewport.
axis Avalonia.Controls.Charts.ChartAxis
The axis whose viewport should be updated.
ZoomTo Method
Sets the visible viewport for both the horizontal and vertical axes.
public void ZoomTo(double minX, double maxX, double minY, double maxY, bool addToHistory)
Parameters
minX double
The horizontal-axis minimum value.
maxX double
The horizontal-axis maximum value.
minY double
The vertical-axis minimum value.
maxY double
The vertical-axis maximum value.
addToHistory bool
True to add the previous viewport to zoom history before applying the new range.
Properties
| Name | Description |
|---|---|
| ActualThemeVariant | Gets the UI theme that is currently used by the element, which might be different than the RequestedThemeVariantProperty. Inherited from StyledElement. |
| AnimationDuration | Gets or sets the duration of the entry animation. Inherited from ChartBase. |
| AnimationProgress | Gets or sets the overall animation progress for charts. Inherited from ChartBase. |
| Annotations | Gets the collection of annotations (reference lines, bands, text labels). |
| AxisBrush | Gets or sets the brush used for axis lines and ticks. Inherited from AxisGridChartBase. |
| BackdropEffect | Gets or sets the effect that is applied to what is drawn behind this visual. Inherited from Visual. |
| BackdropEffectBoundsSource | Gets or sets which bounds of this visual the backdrop effect is limited to. Inherited from Visual. |
| BackdropEffectCache | Gets or sets whether the backdrop effect keeps a snapshot of what is behind this visual, or reads it again on every draw. When null, the compositor chooses. Inherited from Visual. |
| Background | Gets or sets the brush used to draw the control's background. Inherited from TemplatedControl. |
| BackgroundSizing | Gets or sets how the control's background is drawn relative to the control's border. Inherited from TemplatedControl. |
| BorderBrush | Gets or sets the brush used to draw the control's border. Inherited from TemplatedControl. |
| BorderThickness | Gets or sets the thickness of the control's border. Inherited from TemplatedControl. |
| Bounds | Gets the bounds of the control relative to its parent. Inherited from Visual. |
| CacheMode | Gets or sets the cache mode of the visual. Inherited from Visual. |
| CanGoBackZoom | Gets whether there is zoom history to navigate back to. |
| Classes | Gets or sets the styled element's classes. Inherited from StyledElement. |
| Clip | Gets or sets the geometry clip for this visual. Inherited from Visual. |
| ClipToBounds | Gets or sets a value indicating whether the control should be clipped to its bounds. Inherited from Visual. |
| ContextFlyout | Gets or sets a context flyout to the control Inherited from Control. |
| ContextMenu | Gets or sets a context menu to the control. Inherited from Control. |
| CornerRadius | Gets or sets the radius of the border rounded corners. Inherited from TemplatedControl. |
| CrosshairDashStyle | Gets or sets the dash style for the crosshair lines. |
| CrosshairLabelBackground | Gets or sets the background brush for crosshair labels. |
| CrosshairLabelFontSize | Gets or sets the font size for crosshair labels. |
| CrosshairLabelForeground | Gets or sets the foreground brush for crosshair labels. |
| CrosshairMode | Gets or sets the crosshair mode (None, Vertical, Horizontal, or Both). |
| CrosshairStroke | Gets or sets the brush used to draw the crosshair lines. |
| CrosshairStrokeThickness | Gets or sets the thickness of the crosshair lines. |
| Cursor | Gets or sets associated mouse cursor. Inherited from InputElement. |
| DataContext | Gets or sets the control's data context. Inherited from StyledElement. |
| DataTemplates | Gets or sets the data templates for the control. Inherited from Control. |
| DesiredSize | Gets the size that this element computed during the measure pass of the layout process. Inherited from Layoutable. |
| Dispatcher | Returns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject. |
| Easing | Gets or sets the easing function for chart animations. This is applied through the shared chart animation progress pipeline used by animated chart and series renderers. Inherited from ChartBase. |
| Effect | Gets or sets the effect of the control. Inherited from Visual. |
| FlowDirection | Gets or sets the text flow direction. Inherited from Visual. |
| Focusable | Gets or sets a value indicating whether the control can receive focus. Inherited from InputElement. |
| FocusAdorner | Gets or sets the control's focus adorner. Inherited from Control. |
| FontFamily | Gets or sets the font family used to draw the control's text. Inherited from TemplatedControl. |
| FontFeatures | Gets or sets the font features turned on/off. Inherited from TemplatedControl. |
| FontSize | Gets or sets the size of the control's text in points. Inherited from TemplatedControl. |
| FontStretch | Gets or sets the font stretch used to draw the control's text. Inherited from TemplatedControl. |
| FontStyle | Gets or sets the font style used to draw the control's text. Inherited from TemplatedControl. |
| FontVariations | Gets or sets the variable-font axis values (e.g. wght=700) used to draw the control's text. null means the font's design defaults. Inherited from TemplatedControl. |
| FontWeight | Gets or sets the font weight used to draw the control's text. Inherited from TemplatedControl. |
| Foreground | Gets or sets the brush used to draw the control's text and other foreground elements. Inherited from TemplatedControl. |
| GestureRecognizers | Inherited from InputElement. |
| GridLineBrush | Gets or sets the default brush used for grid lines. Inherited from GridLineChartBase. |
| HasMirrorTransform | Gets or sets a value indicating whether to apply mirror transform on this control. Inherited from Visual. |
| Height | Gets or sets the height of the element. Inherited from Layoutable. |
| HorizontalAlignment | Gets or sets the element's preferred horizontal alignment in its parent. Inherited from Layoutable. |
| HorizontalAxis | Gets or sets the horizontal (X) axis. |
| IsAnimationEnabled | Gets or sets whether to enable entry animations. Inherited from ChartBase. |
| IsArrangeValid | Gets a value indicating whether the control's layouts arrange is valid. Inherited from Layoutable. |
| IsEffectivelyEnabled | Gets a value indicating whether this control and all its parents are enabled. Inherited from InputElement. |
| IsEffectivelyVisible | Gets a value indicating whether this control and all its parents are visible. Inherited from Visual. |
| IsEnabled | Gets or sets a value indicating whether the control is enabled for user interaction. Inherited from InputElement. |
| IsFocused | Gets a value indicating whether the control is focused. Inherited from InputElement. |
| IsHitTestVisible | Gets or sets a value indicating whether the control is considered for hit testing. Inherited from InputElement. |
| IsInitialized | Gets a value that indicates whether the element has finished initialization. Inherited from StyledElement. |
| IsKeyboardFocusWithin | Gets a value indicating whether keyboard focus is anywhere within the element or its visual tree child elements. Inherited from InputElement. |
| IsLoaded | Gets a value indicating whether the control is fully constructed in the visual tree and both layout and render are complete. Inherited from Control. |
| IsMeasureValid | Gets a value indicating whether the control's layout measure is valid. Inherited from Layoutable. |
| IsPanEnabled | Gets or sets whether pan (drag) is enabled. |
| IsPointerOver | Gets a value indicating whether the pointer is currently over the control. Inherited from InputElement. |
| IsRenderDiagnosticsEnabled | Gets or sets whether render diagnostics counters are captured for this chart. Disabled charts skip diagnostics allocation, count collection, stopwatch sampling, and overlay drawing. Inherited from ChartBase. |
| IsTabStop | Gets or sets a value that indicates whether the control is included in tab navigation. Inherited from InputElement. |
| IsTooltipEnabled | Gets or sets whether to show tooltips when hovering/tapping data points. Inherited from ChartBase. |
| IsUpdateSuspended | Gets whether visual updates are currently suspended. |
| IsVisible | Gets or sets a value indicating whether this control is visible. Inherited from Visual. |
| IsZoomed | Gets whether the chart is currently zoomed (viewport is constrained). |
| IsZoomEnabled | Gets or sets whether mouse wheel zoom is enabled. |
| Item | Inherited from AvaloniaObject. |
| KeyBindings | Inherited from InputElement. |
| LabelForeground | Gets or sets the brush used for axis and chart-level labels. Series or annotations with their own label brush properties can override this locally. Inherited from ChartBase. |
| LegendAlignment | Gets or sets the legend alignment. Inherited from ChartBase. |
| LegendOffset | Gets or sets the offset for the floating legend. Inherited from ChartBase. |
| LegendPosition | Gets or sets the position of the chart legend. Set this to Avalonia.Controls.Charts.LegendPosition.None to hide the legend entirely. Inherited from ChartBase. |
| LetterSpacing | Gets or sets the letter spacing for the control's text content. Inherited from TemplatedControl. |
| Margin | Gets or sets the margin around the element. Inherited from Layoutable. |
| MaxHeight | Gets or sets the maximum height of the element. Inherited from Layoutable. |
| MaxWidth | Gets or sets the maximum width of the element. Inherited from Layoutable. |
| MinHeight | Gets or sets the minimum height of the element. Inherited from Layoutable. |
| MinWidth | Gets or sets the minimum width of the element. Inherited from Layoutable. |
| Name | Gets or sets the name of the styled element. Inherited from StyledElement. |
| Opacity | Gets or sets the opacity of the control. Inherited from Visual. |
| OpacityMask | Gets or sets the opacity mask of the control. Inherited from Visual. |
| Padding | Gets or sets the padding placed between the border of the control and its content. Inherited from TemplatedControl. |
| Palette | Gets or sets the color palette used for series colors. Inherited from ChartBase. |
| Parent | Gets the styled element's logical parent. Inherited from StyledElement. |
| PlotAreaBackground | Gets or sets the background brush for the plot area only. Inherited from AxisGridPlotAreaChartBase. |
| PlotAreaContent | Gets or sets custom content to overlay on the plot area. The content is measured and arranged within the effective plot bounds for the chart type. Inherited from ChartBase. |
| RenderTransform | Gets or sets the render transform of the control. Inherited from Visual. |
| RenderTransformOrigin | Gets or sets the transform origin of the control. Inherited from Visual. |
| Resources | Gets or sets the styled element's resource dictionary. Inherited from StyledElement. |
| SecondaryVerticalAxis | Gets or sets the secondary vertical (Y) axis for dual-axis charts. |
| Series | Gets the collection of series in this chart. |
| SeriesSource | Gets or sets the series to show. Bind this (SeriesSource="{Binding ChartSeries}") instead of Avalonia.Controls.Charts.CartesianChart.Series, which can't be bound; the chart keeps Avalonia.Controls.Charts.CartesianChart.Series in sync. |
| ShowCrosshairLabels | Gets or sets a value indicating whether to show labels at the crosshair intersection with axes. |
| ShowLegend | Gets or sets whether to show the legend. The meaning of each legend entry depends on the chart type. Some legends describe hideable series, while others are explanatory scales. Inherited from ChartBase. |
| ShowRangeSelector | Gets or sets whether the range selector controls are visible. When false, zoom/pan can still be enabled via gestures and mouse interactions. Useful for mobile scenarios where pinch-to-zoom is preferred. |
| ShowRenderDiagnosticsOverlay | Gets or sets whether to show the render diagnostics overlay for this chart. This has no effect unless Avalonia.Controls.Charts.ChartBase.IsRenderDiagnosticsEnabled is also true. Inherited from ChartBase. |
| StyleKey | Gets the type by which the element is styled. Inherited from StyledElement. |
| Styles | Gets the styles for the styled element. Inherited from StyledElement. |
| TabIndex | Gets or sets a value that determines the order in which elements receive focus when the user navigates through controls by pressing the Tab key. Inherited from InputElement. |
| Tag | Gets or sets a user-defined object attached to the control. Inherited from Control. |
| TechnicalIndicators | Gets the collection of technical indicators in this chart. |
| Template | Gets or sets the template that defines the control's appearance. Inherited from TemplatedControl. |
| TemplatedParent | Gets the styled element whose lookless template this styled element is part of. Inherited from StyledElement. |
| Theme | Gets or sets the theme to be applied to the element. Inherited from StyledElement. |
| Title | Gets or sets the chart title displayed above the chart. Inherited from ChartBase. |
| ToggleSeriesVisibility | Gets or sets whether clicking legend items toggles series visibility. This only applies to charts whose legends represent hideable series or categories. Charts with explanatory scale legends coerce this value back to . Inherited from ChartBase. |
| TrackballDisplayMode | Gets or sets the trackball content display mode. |
| TrackballLineStroke | Gets or sets the brush used for the trackball line. |
| TrackballLineStrokeThickness | Gets or sets the thickness of the trackball line. |
| TrackballMode | Gets or sets the trackball display mode. |
| Transitions | Gets or sets the property transitions for the control. Inherited from Animatable. |
| UseLayoutRounding | Gets or sets a value that determines whether the element should be snapped to pixel boundaries at layout time. Inherited from Layoutable. |
| VerticalAlignment | Gets or sets the element's preferred vertical alignment in its parent. Inherited from Layoutable. |
| VerticalAxis | Gets or sets the vertical (Y) axis. |
| Width | Gets or sets the width of the element. Inherited from Layoutable. |
| YAxes | Gets the collection of vertical (Y) axes. The first slot is the primary axis and the second slot is the secondary axis. |
| ZIndex | Gets or sets the Z index of the control. Inherited from Visual. |
| ZoomFactorX | Gets the current horizontal zoom factor (1.0 = 100% = no zoom). |
| ZoomFactorY | Gets the current vertical zoom factor (1.0 = 100% = no zoom). |
| ZoomHistoryLimit | Gets or sets the maximum number of zoom states kept in history. |
| ZoomMode | Gets or sets the zoom mode (X, Y, or XY). |
| ZoomSensitivity | Gets or sets the per-wheel-delta zoom sensitivity. Values must be finite and non-negative; invalid values are coerced to 0. A value of 0 disables mouse-wheel zoom. A value of 0.1 means each positive wheel delta reduces the visible range by a factor of 1 / 1.1, and each negative wheel delta expands it by 1.1. |
Annotations Property
Gets the collection of annotations (reference lines, bands, text labels).
public Avalonia.Collections.AvaloniaList<Avalonia.Controls.Charts.ChartAnnotation> Annotations { get; set; }
CanGoBackZoom Property
Gets whether there is zoom history to navigate back to.
public bool CanGoBackZoom { get; set; }
CrosshairDashStyle Property
Gets or sets the dash style for the crosshair lines.
public Avalonia.Media.DashStyle CrosshairDashStyle { get; set; }
CrosshairLabelBackground Property
Gets or sets the background brush for crosshair labels.
public Avalonia.Media.IBrush CrosshairLabelBackground { get; set; }
CrosshairLabelFontSize Property
Gets or sets the font size for crosshair labels.
public double CrosshairLabelFontSize { get; set; }
CrosshairLabelForeground Property
Gets or sets the foreground brush for crosshair labels.
public Avalonia.Media.IBrush CrosshairLabelForeground { get; set; }
CrosshairMode Property
Gets or sets the crosshair mode (None, Vertical, Horizontal, or Both).
public Avalonia.Controls.Charts.CrosshairMode CrosshairMode { get; set; }
CrosshairStroke Property
Gets or sets the brush used to draw the crosshair lines.
public Avalonia.Media.IBrush CrosshairStroke { get; set; }
CrosshairStrokeThickness Property
Gets or sets the thickness of the crosshair lines.
public double CrosshairStrokeThickness { get; set; }
HorizontalAxis Property
Gets or sets the horizontal (X) axis.
public Avalonia.Controls.Charts.ChartAxis HorizontalAxis { get; set; }
IsPanEnabled Property
Gets or sets whether pan (drag) is enabled.
public bool IsPanEnabled { get; set; }
IsUpdateSuspended Property
Gets whether visual updates are currently suspended.
public bool IsUpdateSuspended { get; set; }
IsZoomed Property
Gets whether the chart is currently zoomed (viewport is constrained).
public bool IsZoomed { get; set; }
IsZoomEnabled Property
Gets or sets whether mouse wheel zoom is enabled.
public bool IsZoomEnabled { get; set; }
SecondaryVerticalAxis Property
Gets or sets the secondary vertical (Y) axis for dual-axis charts.
public Avalonia.Controls.Charts.ChartAxis SecondaryVerticalAxis { get; set; }
Remarks
This is a convenience property for YAxes[1]. Use Avalonia.Controls.Charts.CartesianChart.YAxes together with
keyed axes when a chart needs more than two vertical axes.
Series Property
Gets the collection of series in this chart.
public Avalonia.Collections.AvaloniaList<Avalonia.Controls.Charts.CartesianSeries> Series { get; set; }
SeriesSource Property
Gets or sets the series to show. Bind this (SeriesSource="{Binding ChartSeries}")
instead of Avalonia.Controls.Charts.CartesianChart.Series, which can't be bound; the chart keeps Avalonia.Controls.Charts.CartesianChart.Series in sync.
public System.Collections.Generic.IEnumerable<Avalonia.Controls.Charts.CartesianSeries> SeriesSource { get; set; }
Remarks
Null and repeated items are skipped. Change the source, not Avalonia.Controls.Charts.CartesianChart.Series: setting a source over inline series, or adding to Avalonia.Controls.Charts.CartesianChart.Series while one is set, throws InvalidOperationException. A series shows in one chart at a time: with several charts on one source, the one attached last shows it, and another takes over when it's detached. A detached chart lets go of the series, so a long-lived source doesn't keep it alive. Change the source on the UI thread.
ShowCrosshairLabels Property
Gets or sets a value indicating whether to show labels at the crosshair intersection with axes.
public bool ShowCrosshairLabels { get; set; }
ShowRangeSelector Property
Gets or sets whether the range selector controls are visible. When false, zoom/pan can still be enabled via gestures and mouse interactions. Useful for mobile scenarios where pinch-to-zoom is preferred.
public bool ShowRangeSelector { get; set; }
TechnicalIndicators Property
Gets the collection of technical indicators in this chart.
public Avalonia.Collections.AvaloniaList<Avalonia.Controls.Charts.ChartTechnicalIndicator> TechnicalIndicators { get; set; }
TrackballDisplayMode Property
Gets or sets the trackball content display mode.
public Avalonia.Controls.Charts.TrackballDisplayMode TrackballDisplayMode { get; set; }
TrackballLineStroke Property
Gets or sets the brush used for the trackball line.
public Avalonia.Media.IBrush TrackballLineStroke { get; set; }
TrackballLineStrokeThickness Property
Gets or sets the thickness of the trackball line.
public double TrackballLineStrokeThickness { get; set; }
TrackballMode Property
Gets or sets the trackball display mode.
public Avalonia.Controls.Charts.TrackballMode TrackballMode { get; set; }
VerticalAxis Property
Gets or sets the vertical (Y) axis.
public Avalonia.Controls.Charts.ChartAxis VerticalAxis { get; set; }
Remarks
This is a convenience property for YAxes[0]. Use Avalonia.Controls.Charts.CartesianChart.YAxes when a chart
needs multiple vertical axes.
YAxes Property
Gets the collection of vertical (Y) axes. The first slot is the primary axis and the second slot is the secondary axis.
public Avalonia.Collections.AvaloniaList<Avalonia.Controls.Charts.ChartAxis> YAxes { get; set; }
Remarks
Prefer this collection for charts that need more than one Y-axis. Use Avalonia.Controls.Charts.CartesianSeries.YAxisKey to bind a series to a specific axis.
ZoomFactorX Property
Gets the current horizontal zoom factor (1.0 = 100% = no zoom).
public double ZoomFactorX { get; set; }
ZoomFactorY Property
Gets the current vertical zoom factor (1.0 = 100% = no zoom).
public double ZoomFactorY { get; set; }
ZoomHistoryLimit Property
Gets or sets the maximum number of zoom states kept in history.
public int ZoomHistoryLimit { get; set; }
ZoomMode Property
Gets or sets the zoom mode (X, Y, or XY).
public Avalonia.Controls.Charts.ZoomMode ZoomMode { get; set; }
ZoomSensitivity Property
Gets or sets the per-wheel-delta zoom sensitivity. Values must be finite and non-negative; invalid values are coerced to 0. A value of 0 disables mouse-wheel zoom. A value of 0.1 means each positive wheel delta reduces the visible range by a factor of 1 / 1.1, and each negative wheel delta expands it by 1.1.
public double ZoomSensitivity { get; set; }