Back to Devexpress

DxChartSeriesValueErrorBar.Type Property

blazor-devexpress-dot-blazor-dot-dxchartseriesvalueerrorbar-7af1020e.md

latest5.3 KB
Original Source

DxChartSeriesValueErrorBar.Type Property

Specifies how the Chart component calculates error bar values.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public ChartValueErrorBarType Type { get; set; }

Property Value

TypeDescription
ChartValueErrorBarType

An enumeration value.

|

Available values:

NameDescription
None

Obtains error values from data source fields specified by HighValueField and LowValueField properties.

| | Percent |

Error bars display percentage of argument values. Percentage factor is specified by the Value property.

| | StdError |

Indicates the standard error. You can specify a coefficient to adjust the function result (use the Value property).

| | StdDeviation |

Indicates the standard deviation. You can specify a coefficient to adjust the function result (use the Value property).

| | Variance |

Indicates variance. You can specify a coefficient to adjust the function result (use the Value property).

| | Fixed |

Error bars display constant values specified by the Value property.

|

Remarks

The DxChart component allows you to calculate error bar values based on a calculation algorithm. To enable this functionality, specify Type and Value properties.

Based on the Type property value, the Value property applies as follows:

FixedSpecifies constant error values.PercentSpecifies percentages of series point values.StdErrorMultiplies the calculated standard error.StdDeviationMultiplies the calculated standard deviation.VarianceMultiplies the calculated variance.NoneDoes not apply. The chart component obtains error bar values from data source fields.

razor
@inject IChartAverageTemperatureDataProvider ChartAverageTemperatureDataProvider
<DxChart Data="@DataSource">
    @* ... *@
    <DxChartLineSeries Pane="TopPane"
                       Name="@LineSeriesName"
                       ArgumentField="@((AverageTemperatureData i) => i.Month)"
                       ValueField="@((AverageTemperatureData i) => i.AverageTemperature)">
        <DxChartSeriesValueErrorBar LowValueField="@nameof(AverageTemperatureData.AverageLowTemperature)"
                                    HighValueField="@nameof(AverageTemperatureData.AverageHighTemperature)"
                                    LineWidth="1"
                                    Opacity="0.8"/>
    </DxChartLineSeries>
    <DxChartBarSeries Pane="BottomPane"
                      Name="@BarSeriesName"
                      ArgumentField="@((AverageTemperatureData i) => i.Month)"
                      ValueField="@((AverageTemperatureData i) => i.AverageHumidity)">
        <DxChartSeriesValueErrorBar Type="ChartValueErrorBarType.Fixed"
                                    Value="@ErrorBarValue"
                                    LineWidth="1" />
    </DxChartBarSeries>
    @* ... *@
</DxChart>

@code {
    IEnumerable<AverageTemperatureData> DataSource = Enumerable.Empty<AverageTemperatureData>();
    double ErrorBarValue = 6;
    protected override void OnInitialized() {
        DataSource = ChartAverageTemperatureDataProvider.GenerateData();
    }
    // ...
}
csharp
public List<AverageTemperatureData> GenerateData() {
    List<AverageTemperatureData> result = new List<AverageTemperatureData> {
        // ...
        new AverageTemperatureData {
            Month = "March",
            AverageTemperature = 15.6,
            AverageLowTemperature = 10.6,
            AverageHighTemperature = 20.4,
            AverageHumidity = 79
        },
        // ...
    };
    return result;
}

See Also

DxChartSeriesValueErrorBar Class

DxChartSeriesValueErrorBar Members

DevExpress.Blazor Namespace