Skip to main content

HeatmapLayer Class

Definition

Assembly:Avalonia.Controls.Charts
Package:Avalonia.Controls.Charts

A map layer that renders a heatmap visualization based on point data. Points with higher values show warmer colors and larger radii.

public class HeatmapLayer

Inheritance: object -> AvaloniaObject -> MapLayer -> HeatmapLayer

Constructors

NameDescription
HeatmapLayerNo summary available.

HeatmapLayer Constructor

public HeatmapLayer()

Methods

NameDescription
GetLayerBoundsGets the geographic bounds (in 0-200, 0-100 viewport units) of the content in this layer. Used for auto-scaling the map to fit content.
GetPointDataGets the data item at the specified screen point.
OnPointerExitedHandles pointer exited events. Override this method to handle interactions (e.g. clearing hover effects).
OnPointerMovedHandles pointer moved events. Override this method to handle interactions (e.g. hover effects).
RenderRenders this layer to the drawing context.
OnPointerPressedHandles pointer pressed events. Override this method to handle interactions (e.g. selection). Inherited from MapLayer.
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns 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.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
GetBaseValueInherited from AvaloniaObject.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.

GetLayerBounds Method

Gets the geographic bounds (in 0-200, 0-100 viewport units) of the content in this layer. Used for auto-scaling the map to fit content.

public Nullable<Avalonia.Rect> GetLayerBounds()

Returns

Nullable<Avalonia.Rect>

GetPointData Method

Gets the data item at the specified screen point.

public object GetPointData(Avalonia.Point point, Avalonia.Rect chartArea)

Parameters

point Avalonia.Point

The screen point to test.

chartArea Avalonia.Rect

The chart area rectangle.

Returns

object

The data item if hit; otherwise, null.

OnPointerExited Method

Handles pointer exited events. Override this method to handle interactions (e.g. clearing hover effects).

public void OnPointerExited()

OnPointerMoved Method

Handles pointer moved events. Override this method to handle interactions (e.g. hover effects).

public bool OnPointerMoved(Avalonia.Point point, Avalonia.Rect chartArea)

Parameters

point Avalonia.Point

chartArea Avalonia.Rect

Returns

bool

True if handled.

Render Method

Renders this layer to the drawing context.

public void Render(Avalonia.Media.DrawingContext context, Avalonia.Rect chartArea, double animationProgress)

Parameters

context Avalonia.Media.DrawingContext

The drawing context.

chartArea Avalonia.Rect

The chart area rectangle.

animationProgress double

Animation progress from 0 to 1.

Properties

NameDescription
HighBrushGets or sets the brush for high intensity values.
IntensityPathGets or sets the property path for intensity values.
ItemsSourceGets or sets the data source for heatmap points.
LatitudePathGets or sets the property path for latitude values.
LongitudePathGets or sets the property path for longitude values.
LowBrushGets or sets the brush for low intensity values.
MaxIntensityGets or sets the maximum intensity value for normalization.
MediumBrushGets or sets the brush for medium intensity values.
RadiusGets or sets the base radius for heatmap points (in pixels).
IsVisibleGets or sets whether this layer is visible. Inherited from MapLayer.
OpacityGets or sets the opacity of this layer. Inherited from MapLayer.
TooltipTemplateGets or sets the data template used for tooltips. Inherited from MapLayer.
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.
ItemInherited from AvaloniaObject.

HighBrush Property

Gets or sets the brush for high intensity values.

public Avalonia.Media.IBrush HighBrush { get; set; }

IntensityPath Property

Gets or sets the property path for intensity values.

public string IntensityPath { get; set; }

ItemsSource Property

Gets or sets the data source for heatmap points.

public System.Collections.IEnumerable ItemsSource { get; set; }

LatitudePath Property

Gets or sets the property path for latitude values.

public string LatitudePath { get; set; }

LongitudePath Property

Gets or sets the property path for longitude values.

public string LongitudePath { get; set; }

LowBrush Property

Gets or sets the brush for low intensity values.

public Avalonia.Media.IBrush LowBrush { get; set; }

MaxIntensity Property

Gets or sets the maximum intensity value for normalization.

public double MaxIntensity { get; set; }

MediumBrush Property

Gets or sets the brush for medium intensity values.

public Avalonia.Media.IBrush MediumBrush { get; set; }

Radius Property

Gets or sets the base radius for heatmap points (in pixels).

public double Radius { get; set; }

Fields

HighBrushProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.HighBrush Avalonia property.

public Avalonia.StyledProperty<Avalonia.Media.IBrush> HighBrushProperty

IntensityPathProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.IntensityPath Avalonia property.

public Avalonia.StyledProperty<string> IntensityPathProperty

ItemsSourceProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.ItemsSource Avalonia property.

public Avalonia.StyledProperty<System.Collections.IEnumerable> ItemsSourceProperty

LatitudePathProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.LatitudePath Avalonia property.

public Avalonia.StyledProperty<string> LatitudePathProperty

LongitudePathProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.LongitudePath Avalonia property.

public Avalonia.StyledProperty<string> LongitudePathProperty

LowBrushProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.LowBrush Avalonia property.

public Avalonia.StyledProperty<Avalonia.Media.IBrush> LowBrushProperty

MaxIntensityProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.MaxIntensity Avalonia property.

public Avalonia.StyledProperty<double> MaxIntensityProperty

MediumBrushProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.MediumBrush Avalonia property.

public Avalonia.StyledProperty<Avalonia.Media.IBrush> MediumBrushProperty

RadiusProperty Field

Identifies the Avalonia.Controls.Charts.HeatmapLayer.Radius Avalonia property.

public Avalonia.StyledProperty<double> RadiusProperty

Events

NameDescription
InvalidatedEvent raised when the layer needs to be redrawn. Inherited from MapLayer.
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.