Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenSeriesDataLabels

    Displays the series values as text labels.

    Inheritance
    object
    ComponentBase
    RadzenChartComponentBase
    RadzenSeriesDataLabels
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IChartSeriesOverlay
    IDisposable
    Inherited Members
    RadzenChartComponentBase.Initialize()
    RadzenChartComponentBase.SetParametersAsync(ParameterView)
    RadzenChartComponentBase.ValidateParameters()
    RadzenChartComponentBase.DidParameterChange<T>(ParameterView, string, T)
    RadzenChartComponentBase.Chart
    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 RadzenSeriesDataLabels : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeriesOverlay, IDisposable
    Examples
    <RadzenChart>
        <RadzenLineSeries Data=@revenue CategoryProperty="Quarter" ValueProperty="Revenue">
           <RadzenSeriesDataLabels />
        </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

    RadzenSeriesDataLabels()

    Displays the series values as text labels.

    Declaration
    public RadzenSeriesDataLabels()
    Examples
    <RadzenChart>
        <RadzenLineSeries Data=@revenue CategoryProperty="Quarter" ValueProperty="Revenue">
           <RadzenSeriesDataLabels />
        </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

    Fill

    Defines the fill color of the component.

    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

    Displays the series values as text labels.

    Declaration
    [CascadingParameter]
    protected IChartSeries Series { get; set; }
    Property Value
    Type Description
    IChartSeries
    Examples
    <RadzenChart>
        <RadzenLineSeries Data=@revenue CategoryProperty="Quarter" ValueProperty="Revenue">
           <RadzenSeriesDataLabels />
        </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 }
        };
    }

    Visible

    Determines the visibility of the data labels. Set to true by default.

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

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Displays the series values as text labels.

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    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 the series values as text labels.

    Declaration
    public void Dispose()

    GetSeriesDataLabelClass()

    Gets the CSS class for the data labels.

    Declaration
    public string GetSeriesDataLabelClass()
    Returns
    Type Description
    string

    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