Table of Contents

Class RadzenSeriesAnnotation<TItem>

Namespace
Radzen.Blazor
Assembly
Radzen.Blazor.dll

Displays a text label for the specified data item from the series.

public class RadzenSeriesAnnotation<TItem> : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeriesOverlay

Type Parameters

TItem
Inheritance
RadzenSeriesAnnotation<TItem>
Implements
Inherited Members

Examples

<RadzenChart>
    <RadzenLineSeries Data=@revenue CategoryProperty="Quarter" ValueProperty="Revenue">
       <RadzenSeriesAnnotation Data="@revenue[1] Text="Q2 Revenue" />
    </RadzenLineSeries>
</RadzenChart>
@code {
    class DataItem
    {
        public string Quarter { get; set; }
        public double Revenue { get; set; }
    }
    DataItem[] revenue = new DataItem[]
    {
        new DataItem { Quarter = "Q1", Revenue = 234000 },
        new DataItem { Quarter = "Q2", Revenue = 284000 },
        new DataItem { Quarter = "Q3", Revenue = 274000 },
        new DataItem { Quarter = "Q4", Revenue = 294000 }
    };
}

Constructors

RadzenSeriesAnnotation()

public RadzenSeriesAnnotation()

Properties

Data

The data item from the series this annotation applies to.

[Parameter]
public TItem Data { get; set; }

Property Value

TItem

OffsetX

Horizontal offset from the default position.

[Parameter]
public double OffsetX { get; set; }

Property Value

double

OffsetY

Vertical offset from the default position.

[Parameter]
public double OffsetY { get; set; }

Property Value

double

Series

The series this annotation applies to. Set to true by default.

[CascadingParameter]
protected CartesianSeries<TItem> Series { get; set; }

Property Value

CartesianSeries<TItem>

Text

The text to display in the annotation.

[Parameter]
public string Text { get; set; }

Property Value

string

Visible

Determines whether the annotation is visible. Set to true by default.

[Parameter]
public bool Visible { get; set; }

Property Value

bool

Methods

Contains(double, double, int)

public bool Contains(double mouseX, double mouseY, int tolerance)

Parameters

mouseX double
mouseY double
tolerance int

Returns

bool

Render(ScaleBase, ScaleBase)

public RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)

Parameters

categoryScale ScaleBase
valueScale ScaleBase

Returns

RenderFragment

RenderTooltip(double, double, double, double)

public RenderFragment RenderTooltip(double mouseX, double mouseY, double marginLeft, double marginTop)

Parameters

mouseX double
mouseY double
marginLeft double
marginTop double

Returns

RenderFragment

ShouldRefreshChart(ParameterView)

protected override bool ShouldRefreshChart(ParameterView parameters)

Parameters

parameters ParameterView

Returns

bool