Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenLineSeries<TItem>

    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
    IDisposable
    Inherited Members
    CartesianSeries<TItem>.ComposeCategory(ScaleBase)
    CartesianSeries<TItem>.ComposeValue(ScaleBase)
    CartesianSeries<TItem>.IsDate(string)
    CartesianSeries<TItem>.IsNumeric(string)
    CartesianSeries<TItem>.GetCategories()
    CartesianSeries<TItem>.TransformCategoryScale(ScaleBase)
    CartesianSeries<TItem>.TransformValueScale(ScaleBase)
    CartesianSeries<TItem>.RenderOverlays(ScaleBase, ScaleBase)
    CartesianSeries<TItem>.SetParametersAsync(ParameterView)
    CartesianSeries<TItem>.Initialize()
    CartesianSeries<TItem>.MeasureLegend()
    CartesianSeries<TItem>.InsidePolygon(Point, Point[])
    CartesianSeries<TItem>.RenderTooltip(object)
    CartesianSeries<TItem>.RenderSharedTooltipItem(object)
    CartesianSeries<TItem>.GetTooltipPosition(object)
    CartesianSeries<TItem>.TooltipClass(TItem)
    CartesianSeries<TItem>.RenderLegendItem()
    CartesianSeries<TItem>.RenderLegendItem(bool)
    CartesianSeries<TItem>.GetMedian()
    CartesianSeries<TItem>.GetMean()
    CartesianSeries<TItem>.GetMode()
    CartesianSeries<TItem>.GetTrend()
    CartesianSeries<TItem>.GetTitle()
    CartesianSeries<TItem>.TooltipLabel(TItem)
    CartesianSeries<TItem>.TooltipTitle(TItem)
    CartesianSeries<TItem>.TooltipValue(TItem)
    CartesianSeries<TItem>.DataAt(double, double)
    CartesianSeries<TItem>.PickColor(int, IEnumerable<string>, string, IList<SeriesColorRange>, double)
    CartesianSeries<TItem>.Dispose()
    CartesianSeries<TItem>.InvokeClick(EventCallback<SeriesClickEventArgs>, object)
    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(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 RadzenLineSeries<TItem> : CartesianSeries<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IChartSeries, IDisposable
    Type Parameters
    Name Description
    TItem

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

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

    Properties

    Color

    Gets the color.

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

    The color.

    Overrides
    CartesianSeries<TItem>.Color

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

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

    The interpolation method. Default is Line.

    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.

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

    The line style. Default is solid.

    Smooth

    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
    [Parameter]
    public bool Smooth { get; set; }
    Property Value
    Type Description
    bool

    true for smooth curved lines; false for straight lines. Default is false.

    Stroke

    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
    [Parameter]
    public string Stroke { get; set; }
    Property Value
    Type Description
    string

    The line color as a CSS color value.

    StrokeWidth

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

    Declaration
    [Parameter]
    public double StrokeWidth { get; set; }
    Property Value
    Type Description
    double

    The line width in pixels. Default is 2.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    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
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Contains(double, double, double)

    Determines if the series contains the specified coordinates with a given tolerance.

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

    The x.

    double y

    The y.

    double tolerance

    The tolerance.

    Returns
    Type Description
    bool

    true if the series contains the coordinates; otherwise, false.

    Overrides
    CartesianSeries<TItem>.Contains(double, double, double)

    GetDataLabels(double, double)

    Returns data chart position

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

    Render(ScaleBase, ScaleBase)

    Renders the series with the specified category and value scales.

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

    The category scale.

    ScaleBase valueScale

    The value scale.

    Returns
    Type Description
    RenderFragment

    RenderFragment.

    Overrides
    CartesianSeries<TItem>.Render(ScaleBase, ScaleBase)

    TooltipStyle(TItem)

    Gets the tooltip inline style.

    Declaration
    protected override string TooltipStyle(TItem item)
    Parameters
    Type Name Description
    TItem item

    The item.

    Returns
    Type Description
    string
    Overrides
    CartesianSeries<TItem>.TooltipStyle(TItem)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IChartSeries
    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