React Chart - Skip Weekends and Holidays
If your dataset excludes non-working days, you can skip them on the axis as well by setting the workdaysOnly property 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.
App.js
- import React from 'react';
- import Chart, {
- ArgumentAxis
- } from 'devextreme-react/chart';
- const workWeek = [0, 1, 2, 3, 4, 5];
- const holidays = ['2017/1/16', '2017/2/20', '2017/5/29'];
- const singleWorkdays = ['2017/1/1'];
- export default function App() {
- return (
- <Chart ... >
- <ArgumentAxis
- workdaysOnly={true}
- workWeek={workWeek}
- holidays={holidays}
- singleWorkdays={singleWorkdays}
- />
- </Chart>
- );
- }
NOTE
This feature is available for the argument axis only.