RadzenSeriesDataLabels Class

Displays the series values as text labels.

Inheritance

Object

ComponentBase

RadzenChartComponentBase

RadzenSeriesDataLabels

Implements

IComponent

IHandleEvent

IHandleAfterRender

IChartSeriesOverlay

Inherited Members

RadzenChartComponentBase.Initialize

RadzenChartComponentBase.SetParametersAsync

RadzenChartComponentBase.ValidateParameters

RadzenChartComponentBase.DidParameterChange

RadzenChartComponentBase.Chart

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 RadzenSeriesDataLabels : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeriesOverlay

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

RadzenSeriesDataLabelslink

Displays the series values as text labels.

Declaration
public RadzenSeriesDataLabels()

Properties

Filllink

Defines the fill color of the component.

Declaration
public string Fill { get; set; }
Property Value
Type Description
stringDefines the fill color of the component.

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

Declaration
protected IChartSeries Series { get; set; }
Property Value
Type Description
IChartSeries

Visiblelink

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

Declaration
public bool Visible { get; set; }
Property Value
Type Description
boolDetermines the visibility of the data labels. Set to true by default.

Methods

BuildRenderTreelink

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

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()

GetSeriesDataLabelClasslink

Gets the CSS class for the data labels.

Declaration
public string GetSeriesDataLabelClass()
Returns
Type Description
string

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 🗙