> For the complete documentation index, see [llms.txt](https://intercode.gitbook.io/intercode-saas-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://intercode.gitbook.io/intercode-saas-kit/pages/dashboard.md).

# Dashboard

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).&#x20;

{% hint style="success" %}
All widgets fetch data internally, have their own loading state, and can be reloaded separately. To properly support multiple languages, we need to pass a `key` prop with `i18.language` value to the chart components to trigger re-rendering when the language changes, ensuring the correct variant of labels is displayed.
{% endhint %}

Detailed chartJS docs:

{% embed url="<https://www.chartjs.org/docs>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://intercode.gitbook.io/intercode-saas-kit/pages/dashboard.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
