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
    System.Object
    RadzenChartComponentBase
    RadzenSeriesAnnotation<TItem>
    Implements
    IChartSeriesOverlay
    IDisposable
    Inherited Members
    RadzenChartComponentBase.Chart
    RadzenChartComponentBase.Initialize()
    RadzenChartComponentBase.SetParametersAsync(ParameterView)
    RadzenChartComponentBase.ValidateParameters()
    RadzenChartComponentBase.DidParameterChange<T>(ParameterView, String, T)
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenSeriesAnnotation<TItem> : RadzenChartComponentBase, 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 }
          };
      }

    Properties

    Data

    The data item from the series this annotation applies to.

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

    Fill

    The color of the annotation text.

    Declaration
    public string Fill { get; set; }
    Property Value
    Type Description
    System.String

    OffsetX

    Horizontal offset from the default position.

    Declaration
    public double OffsetX { get; set; }
    Property Value
    Type Description
    System.Double

    OffsetY

    Vertical offset from the default position.

    Declaration
    public double OffsetY { get; set; }
    Property Value
    Type Description
    System.Double

    Series

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

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

    Text

    The text to display in the annotation.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    Visible

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

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Contains(Double, Double, Int32)

    Hit test

    Declaration
    public bool Contains(double mouseX, double mouseY, int tolerance)
    Parameters
    Type Name Description
    System.Double mouseX
    System.Double mouseY
    System.Int32 tolerance
    Returns
    Type Description
    System.Boolean

    Dispose()

    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
    System.Double mouseX
    System.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
    System.Double mouseX
    System.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
    System.Boolean
    Overrides
    RadzenChartComponentBase.ShouldRefreshChart(ParameterView)

    Implements

    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