BaseXamlAxis<T>

A Axis instance for XAML.

Class · Namespace LiveChartsCore.SkiaSharpView.Maui · Assembly LiveChartsCore.SkiaSharpView.Maui · View source

Type parameters

T The type of the axis.

Members

Properties

DataBounds Bounds
Gets the data bounds, the min and max values in the axis.
VisibleDataBounds Bounds
Gets the data visible bounds, the min and max visible values in the axis that are currently in the UI.
Orientation AxisOrientation
Gets the orientation.
NameTextSize Double
Gets or sets the size of the name label.
NamePadding Padding
Gets or sets the padding of the name label.
LabelsAlignment Nullable<Align>
Gets or sets the labels alignment, default is null and means that the library will set it based on the ICartesianAxis.Orientation and ICartesianAxis.Position properties.
Padding Padding
Gets or sets the padding around the tick labels along the axis.
LabelsDensity Single
Gets or sets the labels density, it is a factor that determines the distance between labels when calculated by the library, 0 is the most dense any value greater than 0 will make the labels to be more separated, values less than 0 will make the labels to overlap (labels rotation could prevent overlapping). Default value is 0.85.
Labeler Func<Double, String>
Gets or sets the labeler, a function that receives a number and return the label content as string.
MinStep Double
Gets or sets the minimum step, the step defines the interval between every separator in the axis, LiveCharts will calculate it automatically based on the chart data and the chart size size, if the calculated step is less than the IPlane.MinStep then IPlane.MinStep will be used as the axis step, default is 0.
ForceStepToMin Boolean
Gets or sets whether the axis should use the IPlane.MinStep as the actual step of the axis, if true, the library will not calculate the step of the axis automatically, instead it will use the value in the IPlane.MinStep property. Be careful when setting this property to true, it might cause performance issues if the step is too small for the current data in the chart. Default value is false.
MinSeparators Int32
Gets or sets the minimum number of separators (gridlines/labels) the axis should display when the step is calculated automatically. The library snaps the auto-step up to a nice number (1, 2, 5, 10 × magnitude), and on small charts that snap can leave too few separators visible; this property forces the auto-step to subdivide further until at least this many separators fit in the visible range. Set to 0 to disable. Ignored when IPlane.ForceStepToMin is true. Default is 3.
MinLimit Nullable<Double>
Gets or sets the minimum value visible in the axis, any point less than this value will be hidden, set it to null (or double.NaN) to use a value based on the smaller value in the chart.
MaxLimit Nullable<Double>
Gets or sets the maximum value visible in the axis, any point greater than this value will be hidden, set it null (or double.NaN) to use a value based on the greater value in the chart.
UnitWidth Double
Gets or sets the unit with, it means the width of every point (if the series requires it) in the chart values scale, this value should normally be 1, unless you are plotting in a custom scale, default is 1.
Position AxisPosition
Gets or sets the axis position.
LabelsRotation Double
Gets or sets the labels rotation in degrees.
TextSize Double
Gets or sets the size of the labels.
Labels IList<String>
Gets or sets the labels, if labels are not null, then the axis label will be pulled from the labels collection, the label is mapped to the chart based on the position of the label and the position of the point, both integers, if the axis requires a label outside the bounds of the labels collection, then the index will be returned as the label. Default value is null.
ShowSeparatorLines Boolean
Gets or sets a value indicating whether the separator lines are visible.
CustomSeparators IEnumerable<Double>
Gets or sets the custom separators collection, when this property is set (not null) the axis will use the values in this collection instead of calculating the separators automatically. Defalut is null.
IsInverted Boolean
Gets or sets a value indicating whether the axis is inverted based on the Cartesian coordinate system.
SeparatorsAtCenter Boolean
Gets or sets a value indicating whether the separators are centered to the IPlane.UnitWidth, default is true.
TicksAtCenter Boolean
Gets or sets a value indicating whether the ticks are centered to the IPlane.UnitWidth, default is true.
NamePaint Paint
Gets or sets the name paint.
LabelsPaint Paint
Gets or sets the text paint.
SeparatorsPaint Paint
Gets or sets the separators paint.
SubseparatorsPaint Paint
Gets or sets the sub-separators paint.
SubseparatorsCount Int32
Gets or sets the number of subseparators to draw.
DrawTicksPath Boolean
Gets or sets whether the ticks path should be drawn.
TicksPaint Paint
Gets or sets the separators paint.
SubticksPaint Paint
Gets or sets the separators paint.
ZeroPaint Paint
Gets or sets the zero paint.
CrosshairPaint Paint
Gets or sets the crosshair paint.
CrosshairLabelsPaint Paint
Gets or sets the crosshair labels paint.
CrosshairLabelsBackground Nullable<LvcColor>
Gets or sets the crosshair background.
CrosshairPadding Padding
Gets or sets the crosshair labels padding.
CrosshairSnapEnabled Boolean
Gets or sets whether the crosshair snaps to nearest series.
AnimationsSpeed Nullable<TimeSpan>
Gets or sets the animations speed; when null the axis inherits the chart-level animation (see Chart.Animation). Set it to TimeSpan.Zero to disable animations for this axis only.
EasingFunction Func<Single, Single>
Gets or sets the easing function used to animate the axis; when null the axis inherits the chart-level easing (see Chart.Animation).
MinZoomDelta Nullable<Double>
Gets or sets the min zoom delta, the minimum difference between the max and min visible limits of the axis. default is null and null means that the library will calculate this value based on the current data.
BouncingDistance Double
Gets or sets the distance that the axis can be panned beyond its limits, the unit is percentage of the chart width or height depending on the axis orientation, default is 0.25 which means that the axis can be panned 25% of the chart width or height beyond its limits.
InLineNamePlacement Boolean
Places the title in the same direction as the axis, default is false.
SharedWith IEnumerable<ICartesianAxis>
Gets or sets the shared axes collection, useful to share the zooming an panning between several charts.
Renderer IAxisRenderer
Gets or sets a renderer that fully owns this axis' measure and draw. When null (the default) the built-in rendering is used; when set it replaces the axis' appearance — enabling custom looks (multi-tier labels, dividers, custom gutter content) without a UI-framework-specific axis type.
ScalerProvider IScalerProvider
Gets or sets a provider that builds this axis' coordinate Scaler. When null (the default) the built-in linear scaler is used; when set it supplies a custom (for example non-linear) mapping used consistently by series, gridlines, hit-testing and zoom.
Tag Object
Gets or sets the object that contains data about the control.
IsVisible Boolean
Gets or sets a value indicating whether the element is visible.
Content Object
Gets the content.
PresentedContent IView
Gets the presented content.

Methods

Invalidate 1 parameter

Invalidates the IChartElement in the user interface.

Chart chart The chart.

InvalidateCrosshair 2 parameters

Invalidates the crosshair visual.

Chart chart The chart.

LvcPoint pointerPosition The pointer position

ClearCrosshair 1 parameter

Clears the crosshair visual.

Chart chart The chart.

GetNameLabelSize 1 parameter

Gets the size of the axis name label.

Chart chart the chart.

GetPossibleSize 1 parameter

Gets the size of the possible.

Chart chart The chart.

GetLimits No parameters

Gets the axis limits considering its own and the ICartesianAxis.SharedWith axes.

SetLimits 5 parameters

Sets the current view limits (own and shared). This is the engine/runtime path used by zoom and pan; it does not record a user pin. To pin a range that zoom-out and post-zoom fit must respect as the outer rail, set IPlane.MinLimit / IPlane.MaxLimit instead.

Double min The min limit.

Double max The max limit.

Double step The separator step.

Boolean propagateShared if set to true notify the changes.

Boolean notify if set to true propagate the changes to the shared axes.

GetScaler 4 parameters

Builds a Scaler that maps between this axis' data values and pixels. Override in a derived axis to provide a custom (for example, non-linear) coordinate mapping; every scaler the engine builds for this axis — target, animated, zoom/pan and section scalers — flows through here.

Chart chart The chart the scaler is built for; an axis can be shared by several charts.

LvcPoint drawMarginLocation The draw margin location.

LvcSize drawMarginSize The draw margin size.

Bounds bounds Optional bounds to scale against; when null the axis' own limits are used.

RemoveFromUI 1 parameter

Removes the element from the UI.

Chart chart The chart.

RemoveOldPaints 1 parameter

Deletes the Paint instances that changed from the user interface.

IChartView chart The chart.

CrossPlatformArrange 1 parameter

Gets the size.

Rect bounds

CrossPlatformMeasure 2 parameters

Measures the specified width constraint.

Double widthConstraint

Double heightConstraint

Events

MeasureStarted Action<Chart, ICartesianAxis>
Occurs when the axis measure starts.