Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenSeriesAnnotation<TItem>

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

    Inheritance
    object
    ComponentBase
    RadzenChartComponentBase
    RadzenSeriesAnnotation<TItem>
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IChartSeriesOverlay
    IDisposable
    Inherited Members
    RadzenChartComponentBase.Initialize()
    RadzenChartComponentBase.SetParametersAsync(ParameterView)
    RadzenChartComponentBase.ValidateParameters()
    RadzenChartComponentBase.DidParameterChange<T>(ParameterView, string, T)
    RadzenChartComponentBase.Chart
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.OnInitialized()
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenSeriesAnnotation<TItem> : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeriesOverlay, IDisposable
    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()

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

    Declaration
    public RadzenSeriesAnnotation()
    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 }
        };
    }

    Properties

    Data

    The data item from the series this annotation applies to.

    Declaration
    [Parameter]
    public TItem Data { get; set; }
    Property Value
    Type Description
    TItem

    Fill

    The color of the annotation text.

    Declaration
    [Parameter]
    public string Fill { get; set; }
    Property Value
    Type Description
    string

    OffsetX

    Horizontal offset from the default position.

    Declaration
    [Parameter]
    public double OffsetX { get; set; }
    Property Value
    Type Description
    double

    OffsetY

    Vertical offset from the default position.

    Declaration
    [Parameter]
    public double OffsetY { get; set; }
    Property Value
    Type Description
    double

    Series

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

    Declaration
    [CascadingParameter]
    protected CartesianSeries<TItem> Series { get; set; }
    Property Value
    Type Description
    CartesianSeries<TItem>

    Text

    The text to display in the annotation.

    Declaration
    [Parameter]
    public string Text { get; set; }
    Property Value
    Type Description
    string

    Visible

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

    Declaration
    [Parameter]
    public bool Visible { get; set; }
    Property Value
    Type Description
    bool

    Methods

    Contains(double, double, int)

    Hit test

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

    Dispose()

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

    Declaration
    public void Dispose()

    GetTooltipPosition(double, double)

    Get position of the overlay tooltip.

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

    Position.

    Render(ScaleBase, ScaleBase)

    Render overlay

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

    RenderFragment

    RenderTooltip(double, double)

    Renders tooltip

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

    ShouldRefreshChart(ParameterView)

    Determines if RadzenChart should render.

    Declaration
    protected override bool ShouldRefreshChart(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    bool
    Overrides
    RadzenChartComponentBase.ShouldRefreshChart(ParameterView)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IChartSeriesOverlay
    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT