RadzenLineSeries<TItem> Class

A chart series that displays data as a continuous line connecting data points in a RadzenChart. RadzenLineSeries is ideal for showing trends over time, continuous data, or comparing multiple data series. Connects data points with lines, making it easy to visualize trends and patterns. Supports multiple interpolation modes (straight lines, smooth curves, step functions), customizable appearance (color, width, line style), markers at data points, data labels, combination of multiple line series in one chart for comparison, and line styling with different patterns (solid, dashed, dotted). Use CategoryProperty for the X-axis values and ValueProperty for the Y-axis values. Enable Smooth for curved lines, or use Interpolation for more control over line rendering.

Inheritance

Object

ComponentBase

RadzenChartComponentBase

CartesianSeries<TItem>

RadzenLineSeries<TItem>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IChartSeries

Inherited Members

CartesianSeries<TItem>.RequireChart

CartesianSeries<TItem>.ComposeCategory

CartesianSeries<TItem>.ComposeValue

CartesianSeries<TItem>.IsValueNullable

CartesianSeries<TItem>.GetRawValueGetter

CartesianSeries<TItem>.IsDate

CartesianSeries<TItem>.IsNumeric

CartesianSeries<TItem>.GetCategories

CartesianSeries<TItem>.TransformCategoryScale

CartesianSeries<TItem>.TransformValueScale

CartesianSeries<TItem>.RenderOverlays

CartesianSeries<TItem>.SetParametersAsync

CartesianSeries<TItem>.Initialize

CartesianSeries<TItem>.MeasureLegend

CartesianSeries<TItem>.InsidePolygon

CartesianSeries<TItem>.RenderTooltip

CartesianSeries<TItem>.RenderSharedTooltipItem

CartesianSeries<TItem>.GetTooltipPosition

CartesianSeries<TItem>.TooltipClass

CartesianSeries<TItem>.RenderLegendItem

CartesianSeries<TItem>.GetMedian

CartesianSeries<TItem>.GetMean

CartesianSeries<TItem>.GetMode

CartesianSeries<TItem>.GetTrend

CartesianSeries<TItem>.GetTitle

CartesianSeries<TItem>.TooltipLabel

CartesianSeries<TItem>.TooltipTitle

CartesianSeries<TItem>.TooltipValue

CartesianSeries<TItem>.DataAt

CartesianSeries<TItem>.PickColor

CartesianSeries<TItem>.Dispose

CartesianSeries<TItem>.InvokeClick

CartesianSeries<TItem>.Title

CartesianSeries<TItem>.ChildContent

CartesianSeries<TItem>.TooltipTemplate

CartesianSeries<TItem>.Overlays

CartesianSeries<TItem>.CoordinateSystem

CartesianSeries<TItem>.CategoryProperty

CartesianSeries<TItem>.Visible

CartesianSeries<TItem>.Hidden

CartesianSeries<TItem>.ShowInLegend

CartesianSeries<TItem>.ValueProperty

CartesianSeries<TItem>.RenderingOrder

CartesianSeries<TItem>.Data

CartesianSeries<TItem>.Items

CartesianSeries<TItem>.Markers

CartesianSeries<TItem>.MarkerType

CartesianSeries<TItem>.MarkerSize

RadzenChartComponentBase.ShouldRefreshChart

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 RadzenLineSeries<TItem> : CartesianSeries<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IChartSeries

Type Parameters

Name Description
TItemThe type of data items in the series. Each item represents one point on the line.

Examples

Basic line series:

<RadzenChart>
    <RadzenLineSeries Data=@temperatures CategoryProperty="Date" ValueProperty="Temperature" Title="Temperature" />
</RadzenChart>

Smooth line with markers:

<RadzenChart>
    <RadzenLineSeries Data=@data CategoryProperty="X" ValueProperty="Y" Smooth="true" Stroke="#FF6384" StrokeWidth="3">
        <RadzenMarkers MarkerType="MarkerType.Circle" />
        <RadzenSeriesDataLabels Visible="true" />
    </RadzenLineSeries>
</RadzenChart>

Constructors

RadzenLineSeries<TItem>link

A chart series that displays data as a continuous line connecting data points in a RadzenChart. RadzenLineSeries is ideal for showing trends over time, continuous data, or comparing multiple data series. Connects data points with lines, making it easy to visualize trends and patterns. Supports multiple interpolation modes (straight lines, smooth curves, step functions), customizable appearance (color, width, line style), markers at data points, data labels, combination of multiple line series in one chart for comparison, and line styling with different patterns (solid, dashed, dotted). Use CategoryProperty for the X-axis values and ValueProperty for the Y-axis values. Enable Smooth for curved lines, or use Interpolation for more control over line rendering.

Declaration
public RadzenLineSeries<TItem>()

Properties

Colorlink

Declaration
public string Color { get; }
Property Value
Type Description
string

Interpolationlink

Gets or sets the interpolation method used to render lines between data points. Options include Line (straight lines), Spline (smooth curves), and Step (stair-step lines).

Declaration
public Interpolation Interpolation { get; set; }
Property Value
Type Description
InterpolationGets or sets the interpolation method used to render lines between data points. Options include Line (straight lines), Spline (smooth curves), and Step (stair-step lines).

LineTypelink

Gets or sets the line style pattern (solid, dashed, dotted). Use LineType.Dashed or LineType.Dotted to create non-solid lines for visual distinction or to represent projected/estimated data.

Declaration
public LineType LineType { get; set; }
Property Value
Type Description
LineTypeGets or sets the line style pattern (solid, dashed, dotted). Use LineType.Dashed or LineType.Dotted to create non-solid lines for visual distinction or to represent projected/estimated data.

Smoothlink

Gets or sets whether to render smooth curved lines between data points instead of straight lines. When true, uses spline interpolation to create smooth curves. This is a convenience property for setting Interpolation to Spline.

Declaration
public bool Smooth { get; set; }
Property Value
Type Description
boolGets or sets whether to render smooth curved lines between data points instead of straight lines. When true, uses spline interpolation to create smooth curves. This is a convenience property for setting Interpolation to Spline.

Strokelink

Gets or sets the color of the line. Supports any valid CSS color value (e.g., "#FF0000", "rgb(255,0,0)", "var(--my-color)"). If not set, uses the color from the chart's color scheme.

Declaration
public string Stroke { get; set; }
Property Value
Type Description
stringGets or sets the color of the line. Supports any valid CSS color value (e.g., "#FF0000", "rgb(255,0,0)", "var(--my-color)"). If not set, uses the color from the chart's color scheme.

StrokeWidthlink

Gets or sets the width of the line in pixels. Thicker lines are more visible but may obscure details in dense data.

Declaration
public double StrokeWidth { get; set; }
Property Value
Type Description
doubleGets or sets the width of the line in pixels. Thicker lines are more visible but may obscure details in dense data.

Methods

BuildRenderTreelink

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

Containslink

Declaration
public override bool Contains(double x, double y, double tolerance)
Parameters
Type Name Description
double x
double y
double tolerance
Returns
Type Description
bool

GetDataLabelslink

Declaration
public override IEnumerable<Rendering.ChartDataLabel> GetDataLabels(double offsetX, double offsetY)
Parameters
Type Name Description
double offsetX
double offsetY
Returns
Type Description
IEnumerable<Rendering.ChartDataLabel>

Renderlink

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

TooltipStylelink

Declaration
protected override string TooltipStyle(TItem item)
Parameters
Type Name Description
TItem item
Returns
Type Description
string
An error has occurred. This app may no longer respond until reloaded. Reload 🗙