Back to Devexpress

DxChartAxisStrip.Color Property

blazor-devexpress-dot-blazor-dot-dxchartaxisstrip-b5becb50.md

latest2.4 KB
Original Source

DxChartAxisStrip.Color Property

Specifies the strip color.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public string Color { get; set; }

Property Value

TypeDescription
String

The strip color.

|

Remarks

The Color property accepts the following formats:

  • Longhand and shorthand hexadecimal color values: #ffff00, #ff0.
  • RGB and RGBA color codes: rgb(255, 0, 0), rgba(0, 230, 0, 0.3).
  • HTML color name (case-insensitive): red, DarkGreen.

Specify the strip’s Color property to display the strip:

razor
<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)">
            <DxChartAxisStripsLabel Text="Above average high">
                <DxChartFont Color="@HighAverageColor" Weight="500" Size="14"/>
            </DxChartAxisStripsLabel>
        </DxChartAxisStrip>
        <DxChartAxisStrip EndValue="LowAverage"
                          Color="rgba(97, 153, 230, 0.1)">
            <DxChartAxisStripsLabel Text="Below average low">
                <DxChartFont Color="@LowAverageColor" Weight="500" Size="14" />
            </DxChartAxisStripsLabel>
        </DxChartAxisStrip>
    </DxChartValueAxis>
</DxChart>

@code {
    // ...
    Color SeriesColor = ColorTranslator.FromHtml("#a3aaaa");
    double HighAverage = 60.8;
    double LowAverage = 53;
    string HighAverageColor = "#ff9b52";
    string LowAverageColor = "#6199e6";
}

See Also

DxChartAxisStrip Class

DxChartAxisStrip Members

DevExpress.Blazor Namespace