DxChartAxisStrip Class
Defines a strip that highlights a range between two axis values.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public class DxChartAxisStrip :
DxComplexSettingsComponent<DxChartAxisStrip, ChartAxisStripModel>,
IModelProvider<ChartAxisStripLabelModel>
Remarks
Use this object to highlight a range between two axis values or an area above/below a value. Such highlighted areas allow users to quickly see whether a point falls in or out of a predefined range. An axis can contain multiple strips.
To create an axis strip, complete the following steps:
Add a
DxChartAxisStrip
object to axis markup (DxChartArgumentAxis or DxChartValueAxis).Specify StartValue and EndValue properties to define the strip range. Use both properties to highlight an area between two values. Define only one property to highlight the area above or below a certain value.
Specify the Color property to display the strip.
Optional. Add a DxChartAxisStripLabel object to strip markup to configure strip label settings.
<DxChart Data="@DataSource" Width="100%">
<DxChartTitle Text="Temperature (high) in September, °F" />
<DxChartLegend Visible="false" />
<DxChartSplineSeries ArgumentField="@((TemperatureData s) => s.Date)"
ValueField="@((TemperatureData s) => s.Temperature)"
Color="@SeriesColor">
<DxChartSeriesLabel FormatPattern="{value:#}°F" />
</DxChartSplineSeries>
<DxChartValueAxis>
<DxChartAxisStrip StartValue="@HighAverage"
Color="rgba(255, 155, 85, 0.15)">
<DxChartAxisStripLabel Text="Above average high">
<DxChartFont Color="@HighAverageColor" Weight="500" Size="14"/>
</DxChartAxisStripLabel>
</DxChartAxisStrip>
<DxChartAxisStrip EndValue="LowAverage"
Color="rgba(97, 153, 230, 0.1)">
<DxChartAxisStripLabel Text="Below average low">
<DxChartFont Color="@LowAverageColor" Weight="500" Size="14" />
</DxChartAxisStripLabel>
</DxChartAxisStrip>
</DxChartValueAxis>
</DxChart>
@code {
// ...
Color SeriesColor = ColorTranslator.FromHtml("#a3aaaa");
double HighAverage = 60.8;
double LowAverage = 53;
string HighAverageColor = "#ff9b52";
string LowAverageColor = "#6199e6";
}