Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V24.1

DxChartArgumentAxis.Holidays Property

Specifies dates that DxChart marks as holidays.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

Declaration

[Parameter]
public object[] Holidays { get; set; }

Property Value

Type Description
Object[]

An array of objects.

Remarks

Enable the WorkdaysOnly option to display workdays only on the argument axis. Use the Holidays property to mark additional dates as holidays and exclude them from available arguments.

To specify which days of the week are workdays, use the WorkWeek property.

The following example demonstrates a scenario where a business workweek includes only three days – Monday, Tuesday, and Wednesday. It also marks a weekend date as a workday and a work week date as a holiday.

<DxChart Data="@stockData">
    <DxChartLegend Position="RelativePosition.Outside" />
    <DxChartStockSeries OpenField="(StockDataPoint sdp) => sdp.Open"
                        HighField="sdp => sdp.High"
                        LowField="sdp => sdp.Low"
                        CloseField="sdp => sdp.Close"
                        ArgumentField="@(sdp => new DateTime(
                                        sdp.DateTimeStamp.Year,
                                        sdp.DateTimeStamp.Month,
                                        sdp.DateTimeStamp.Day,
                                        sdp.DateTimeStamp.Hour,
                                        sdp.DateTimeStamp.Minute,
                                        0) )"
                        Name="Eco Supreme" />
    <DxChartArgumentAxis WorkdaysOnly="showWorkdays"
                         TickInterval="ChartAxisInterval.Days(1)"
                         WorkWeek="@(new int[]{1, 2, 3})"
                         WorkDates="@(new object[]{new DateTime(2024, 1, 12)})"
                         Holidays="@(new object[]{new DateTime(2024, 1, 9)})" />
    @* ... *@
</DxChart>

@code {
    IEnumerable<StockDataPoint> stockData;
    bool showWorkdays = true;
    // ...
}

Chart - Workdays on axis

See Also