Back to Devexpress

DxPolarChartLineSeries<T, TArgument, TValue> Class

blazor-devexpress-dot-blazor-dot-dxpolarchartlineseries-3.md

latest7.4 KB
Original Source

DxPolarChartLineSeries<T, TArgument, TValue> Class

Defines a line series.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class DxPolarChartLineSeries<T, TArgument, TValue> :
    DxPolarChartBaseSeries<T, TArgument, TValue>

Type Parameters

NameDescription
T

The data type.

| | TArgument |

The series argument type.

| | TValue |

The series value type.

|

Remarks

The line series displays data as points joined by line segments.

Run Demo: Polar and Radar - Discrete Data

Declare a Line Series

  1. Use the Polar Chart’s Data property to specify a data source.
  2. Add a <DxPolarChartLineSeries> tag to the component’s markup.
  3. Assign data source fields that contain arguments and values for data points to ArgumentField and ValueField properties.
  4. Optional. Configure the series: customize appearance, add labels, choose selection and hover modes, etc.
razor
<DxPolarChart Data=@DataSource>
    <DxPolarChartLineSeries ArgumentField="@((DiscretePoint i) => i.Arg)"
                            ValueField="@((DiscretePoint i) => i.Day)">
    </DxPolarChartLineSeries>
    <DxChartLegend Visible="false" />
</DxPolarChart>
csharp
namespace BlazorDemo.Data {
    public class DiscretePoint {
        public string Arg { get; set; }
        public int Day { get; set; }
        public int Night { get; set; }

        public DiscretePoint(string arg, int day, int night) {
            Arg = arg;
            Day = day;
            Night = night;
        }
    }
}
csharp
using System.Collections.Generic;
using BlazorDemo.Data;

// ...
    public class ChartDiscreteDataProvider : IChartDiscreteDataProvider {
        public List<DiscretePoint> GenerateData() {
            return new List<DiscretePoint>() {
                new DiscretePoint("January", 6, 2),
                new DiscretePoint("February", 7, 2),
                new DiscretePoint("March", 10, 3),
                new DiscretePoint("April", 14, 5),
                new DiscretePoint("May", 18, 8),
                new DiscretePoint("June", 21, 11),
                new DiscretePoint("July", 22, 13),
                new DiscretePoint("August", 22, 13),
                new DiscretePoint("September", 19, 11),
                new DiscretePoint("October", 15, 8),
                new DiscretePoint("November", 10, 5),
                new DiscretePoint("December", 7, 3),
            };
        }
    }

Nested Component Structure

You can add the following child components to a line series:

DxChartSeriesLabelDefines a series label.DxChartSeriesLegendItemDefines an item that indicates a series in the legend.DxChartSeriesPointContains settings for points of the chart’s line- and area-based series.

The following code snippet declares these objects in the markup:

razor
@using System.Drawing

<DxPolarChart Data=@DataSource>
    <DxPolarChartLineSeries ArgumentField="@((DiscretePoint i) => i.Arg)"
                            ValueField="@((DiscretePoint i) => i.Day)">
        <DxChartSeriesLabel Visible="true" FormatPattern="{value:##.#}" />
        <DxChartSeriesPoint Color="Color.SlateBlue" />
        <DxChartSeriesLegendItem Text="Daily Temperature" />
    </DxPolarChartLineSeries>
</DxPolarChart>

Customize Appearance

The Polar Chart allows you to use the following options to customize a line series:

BreakOnEmptyPointsSpecifies whether the series should break on points with null values.ClosedSpecifies whether to connect first and last series points.ColorSpecifies the color of the series.DashStyleSpecifies the line style.WidthSpecifies the width of the line series.

razor
@using System.Drawing

<DxPolarChart Data=@DataSource>
    <DxPolarChartLineSeries ArgumentField="@((DiscretePoint i) => i.Arg)"
                            ValueField="@((DiscretePoint i) => i.Day)"
                            Width="1"
                            Color="Color.DarkSalmon"
                            DashStyle="ChartDashStyle.DashDotDot">
    </DxPolarChartLineSeries>
</DxPolarChart>

User Interaction Options

Users can select a series and its points and hover the mouse pointer over them. The table below describes available user interaction options.

DescriptionComponent LevelSeries Level
Hover Over Series and Its ElementsNot ApplicableHoverMode
Series SelectionSeriesSelectionModeSelectionMode
Point SelectionPointSelectionModeNot Applicable

Implements

IComponent

IHandleEvent

IHandleAfterRender

IDisposable

IPolarChartSeries

IChartSeriesBase

Inheritance

Object ComponentBase DxSettingsComponent<DevExpress.Blazor.Internal.IPolarChartSeriesModel> DxComplexSettingsComponent<DxPolarChartBaseSeries<T, TArgument, TValue>, DevExpress.Blazor.Internal.IPolarChartSeriesModel> DxPolarChartBaseSeries<T, TArgument, TValue> DxPolarChartLineSeries<T, TArgument, TValue>

See Also

DxPolarChartLineSeries<T, TArgument, TValue> Members

DevExpress.Blazor Namespace