RadzenSeriesAnnotation<TItem> Class

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

Inheritance

Object

ComponentBase

RadzenChartComponentBase

RadzenSeriesAnnotation<TItem>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IChartSeriesOverlay

Inherited Members

RadzenChartComponentBase.Initialize

RadzenChartComponentBase.SetParametersAsync

RadzenChartComponentBase.ValidateParameters

RadzenChartComponentBase.DidParameterChange

RadzenChartComponentBase.Chart

ComponentBase.BuildRenderTree

ComponentBase.OnInitialized

ComponentBase.OnInitializedAsync

ComponentBase.OnParametersSet

ComponentBase.OnParametersSetAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.OnAfterRenderAsync

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

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

Type Parameters

Name Description
TItem

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<TItem>link

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

Declaration
public RadzenSeriesAnnotation<TItem>()

Properties

Datalink

The data item from the series this annotation applies to.

Declaration
public TItem Data { get; set; }
Property Value
Type Description
TItemThe data item from the series this annotation applies to.

Filllink

The color of the annotation text.

Declaration
public string Fill { get; set; }
Property Value
Type Description
stringThe color of the annotation text.

OffsetXlink

Horizontal offset from the default position.

Declaration
public double OffsetX { get; set; }
Property Value
Type Description
doubleHorizontal offset from the default position.

OffsetYlink

Vertical offset from the default position.

Declaration
public double OffsetY { get; set; }
Property Value
Type Description
doubleVertical offset from the default position.

Serieslink

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

Declaration
protected CartesianSeries<TItem> Series { get; set; }
Property Value
Type Description
CartesianSeries<TItem>The series this annotation applies to. Set to true by default.

Textlink

The text to display in the annotation.

Declaration
public string Text { get; set; }
Property Value
Type Description
stringThe text to display in the annotation.

Visiblelink

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

Declaration
public bool Visible { get; set; }
Property Value
Type Description
boolDetermines whether the annotation is visible. Set to true by default.

Methods

Containslink

Declaration
public bool Contains(double mouseX, double mouseY, int tolerance)
Parameters
Type Name Description
double mouseX
double mouseY
int tolerance
Returns
Type Description
bool

Disposelink

Declaration
public void Dispose()

GetTooltipPositionlink

Declaration
public Point GetTooltipPosition(double mouseX, double mouseY)
Parameters
Type Name Description
double mouseX
double mouseY
Returns
Type Description
Point

Renderlink

Declaration
public RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Type Name Description
ScaleBase categoryScale
ScaleBase valueScale
Returns
Type Description
RenderFragment

RenderTooltiplink

Declaration
public RenderFragment RenderTooltip(double mouseX, double mouseY)
Parameters
Type Name Description
double mouseX
double mouseY
Returns
Type Description
RenderFragment

ShouldRefreshChartlink

Declaration
protected override bool ShouldRefreshChart(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
bool
An error has occurred. This app may no longer respond until reloaded. Reload 🗙