Dashboard

Here you will find information about widgets, chart JS library and general page logic

Dashboard page is written with Ant Design Row and Col components which allow us to change sizes of widgets or adapt them to mobile layout easily.

Data for all widgets depends on the Businesses Select and RangePicker (which consists of two separate DatePickers). By default, the range is the last 30 calendar days, but it can be adjusted to any range from 1 day to several years. Regardless of whether the range is selected from left to right or right to left, the logic will pick the range between the dates. The Businesses Select is optimized with a debounce function, so data won't reload immediately. Additionally, the page maintains a state with previous select values, so if the user doesn't change the selections after clicking, the data will not be reloaded.

All charts used in widgets written with react-chartjs-2 library (chart JS wrapper for react).

Detailed chartJS docs:

Last updated