DevExtreme Angular - Skip Weekends and Holidays
If your dataset excludes non-working days, you can skip them on the axis as well by setting the workdaysOnly option to true. Use the workWeek array to specify which days are workdays. You can also include or exclude specific dates from the axis using the singleWorkdays and holidays arrays respectively.
jQuery
JavaScript
$(function() { $("#chartContainer").dxChart({ // ... argumentAxis: { workdaysOnly: true, workWeek: [0, 1, 2, 3, 4, 5], holidays: ["2017/1/16", "2017/2/20", "2017/5/29"] singleWorkdays: ["2017/1/1"] } }); });
Angular
HTML
TypeScript
<dx-chart ... > <dxo-argument-axis [workdaysOnly]="true" [workWeek]="[0, 1, 2, 3, 4, 5]" [holidays]="['2017/1/16', '2017/2/20', '2017/5/29']" [singleWorkdays]="['2017/1/1']"> </dxo-argument-axis> </dx-chart>
import { DxChartModule } from 'devextreme-angular'; // ... export class AppComponent { // ... } @NgModule({ imports: [ // ... DxChartModule ], // ... })
NOTE
This feature is available for the argument axis only.
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.