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.
CartesianSeries<TItem>.RequireChart
CartesianSeries<TItem>.ComposeCategory
CartesianSeries<TItem>.ComposeValue
CartesianSeries<TItem>.IsValueNullable
CartesianSeries<TItem>.GetRawValueGetter
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>.PickColor
CartesianSeries<TItem>.Dispose
CartesianSeries<TItem>.InvokeClick
CartesianSeries<TItem>.ChildContent
CartesianSeries<TItem>.TooltipTemplate
CartesianSeries<TItem>.Overlays
CartesianSeries<TItem>.CoordinateSystem
CartesianSeries<TItem>.CategoryProperty
CartesianSeries<TItem>.Visible
CartesianSeries<TItem>.ShowInLegend
CartesianSeries<TItem>.ValueProperty
CartesianSeries<TItem>.RenderingOrder
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
public class RadzenLineSeries<TItem> : CartesianSeries<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IChartSeries| Name | Description |
|---|---|
| TItem | The type of data items in the series. Each item represents one point on the line. |
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>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.
public RadzenLineSeries<TItem>()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).
public Interpolation Interpolation { get; set; }
| Type | Description |
|---|---|
| Interpolation | 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). |
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.
public LineType LineType { get; set; }
| Type | Description |
|---|---|
| LineType | 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. |
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.
public bool Smooth { get; set; }
| Type | Description |
|---|---|
| bool | 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. |
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.
public string Stroke { get; set; }
| Type | Description |
|---|---|
| string | 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. |
Gets or sets the width of the line in pixels. Thicker lines are more visible but may obscure details in dense data.
public double StrokeWidth { get; set; }
| Type | Description |
|---|---|
| double | Gets or sets the width of the line in pixels. Thicker lines are more visible but may obscure details in dense data. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
public override bool Contains(double x, double y, double tolerance)
| Type | Name | Description |
|---|---|---|
| double | x | |
| double | y | |
| double | tolerance |
| Type | Description |
|---|---|
| bool |
public override IEnumerable<Rendering.ChartDataLabel> GetDataLabels(double offsetX, double offsetY)
| Type | Name | Description |
|---|---|---|
| double | offsetX | |
| double | offsetY |
| Type | Description |
|---|---|
| IEnumerable<Rendering.ChartDataLabel> |
public override RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
| Type | Description |
|---|---|
| RenderFragment |
protected override string TooltipStyle(TItem item)
| Type | Name | Description |
|---|---|---|
| TItem | item |
| Type | Description |
|---|---|
| string |