Skip to main content
All docs
V24.1

DxPolarChartBaseSeries<T, TArgument, TValue>.Data Property

Specifies the data source for the series.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public IEnumerable<T> Data { get; set; }

Property Value

Type Description
IEnumerable<T>

The data source.

Remarks

Use the Data property to specify the data source for a particular series if this source is different from data assigned to the Polar Chart component:

@inject IChartDiscreteDataProvider ChartDiscreteDataProvider

<DxPolarChart Data="@DataSource">
    <DxPolarChartLineSeries Data="@forecasts"
                            ArgumentField="@((WeatherForecast i) => i.Date)"
                            ValueField="@((WeatherForecast i) => i.TemperatureC)">
    </DxPolarChartLineSeries>
    <DxPolarChartAreaSeries Name="Night"
                            Color="Color.MidnightBlue"
                            ArgumentField="@((DiscretePoint i) => i.Arg)"
                            ValueField="@((DiscretePoint i) => i.Night)">
    </DxPolarChartAreaSeries>
</DxPolarChart>

@code {
    IEnumerable<DiscretePoint> DataSource = Enumerable.Empty<DiscretePoint>();
    WeatherForecast[] forecasts;

    public class WeatherForecast {
        public DateTime Date { get; set; }
        public int? TemperatureC { get; set; }
    }
    public class DiscretePoint {
        public string Arg { get; set; }
        public int Day { get; set; }
        public int Night { get; set; }
    }

    protected override void OnInitialized () {
        DataSource = ChartDiscreteDataProvider.GenerateData();
        SelectedSeries = SeriesTypes.FirstOrDefault();
        forecasts = ChartDiscreteDataProvider.GetForecast();
    }
}
See Also