Dashboards and visualizations
Dashboards are shared presentation surfaces that arrange query results into useful views. The system connects saved queries to named visualizations, places those visualizations or text in widgets, and serves the same content through the signed-in web app, public dashboard links, and visualization embeds.
Content model
Dashboard composition
A dashboard is an organization-scoped view with a name, owner, tags, publication state, and a set of widgets. Its layout and options describe how the view is arranged and how dashboard-level behavior is applied. The backend returns the dashboard with its widgets when the page needs to render it.
References: redash/…/__init__.py• L1114-1135 redash/…/__init__.py• L209-260
Query-backed visualizations
A visualization is a named presentation of one query result. It keeps the chart type and display choices with the query, so one query can support several views. The visualization API creates, updates, and removes these views within the access boundary of the owning query. See the reusable visualization library for the chart components that render them.
References: redash/…/__init__.py• L1240-1266 redash/…/visualizations.py• L12-56
Widget presentation
A widget is the dashboard-level placement of content. It is either a query visualization or a text box, and it carries its position, size, and dashboard-specific options. A user can add a visualization after choosing a query and view, add explanatory text, move or resize items, and remove items without removing the saved visualization itself.
References: redash/…/__init__.py• L1269-1289 client/…/AddWidgetDialog.jsx• L69-151 client/…/Widget.jsx• L98-130
Dashboard lifecycle
Dashboard discovery
The dashboard list is the entry point for finding and creating dashboards. It supports all accessible dashboards, dashboards owned by the current user, and the current user's favorites. Search, tags, ordering, and pagination are shared ways to narrow each view.
References: redash/…/dashboards.py• L36-105 redash/…/dashboards.py• L108-137 client/…/DashboardList.jsx• L28-47 client/…/DashboardList.jsx• L112-152
Dashboard editing
The dashboard page loads the saved dashboard, then coordinates layout changes, widget changes, query refreshes, and dashboard settings. Editing is limited by dashboard permissions and by whether the grid can support editing at the current screen size. The header changes to an edit state that reports save progress, retries failed layout saves, and saves dashboard parameters when the user finishes editing. Layout changes are saved as widget updates, while dashboard properties such as name, draft state, tags, filters, and options are saved as dashboard changes. Version checks protect dashboard edits from silently replacing another user's work.
References: redash/…/dashboards.py• L142-275 client/…/DashboardPage.jsx• L74-164 client/…/useDashboard.js• L68-93 client/…/useDashboard.js• L157-170 client/…/useEditModeHandler.js• L20-101 client/…/DashboardHeader.jsx• L254-311 client/…/DashboardHeader.less• L3-44 client/…/DashboardHeader.less• L67-98
The main dashboard flow moves from a dashboard request to widget data loading and then to a rendered grid. In edit mode, the grid sends changed positions back for persistence.
flowchart LR
A[Dashboard request] --> B[Dashboard and widgets]
B --> C[Load query results]
C --> D[Apply parameters and filters]
D --> E[Render widget grid]
E --> F[Save dashboard or widget changes]
Presentation and data flow
Widget query flow
A visualization widget uses its linked query to obtain current result data. The widget keeps the last result while a refresh runs, reports query errors in the tile, and passes successful data to the visualization renderer. This keeps query execution separate from the choice of chart or table used to show the result.
References: client/…/widget.js• L116-184 client/…/VisualizationWidget.jsx• L278-319 client/…/VisualizationRenderer.jsx• L39-89
Parameters and filters
Dashboard parameters provide shared values for widgets whose query parameters map to the dashboard level. Widget-level parameters remain local to one widget, while static values do not require user input. Query-result filters are collected across widgets and can be linked at dashboard level when that setting is enabled. A parameter or filter change refreshes the affected query-backed widgets.
References: client/…/widget.js• L89-93 client/…/widget.js• L217-284 client/…/dashboard.js• L11-38 client/…/useDashboard.js• L23-35 client/…/useDashboard.js• L131-155
Responsive presentation
The dashboard grid presents the same widgets in a multi-column desktop view and a single-column mobile view. Visualization settings supply suitable size limits and defaults, while the grid saves the durable layout only from the multi-column view. This lets a dashboard adapt to screen size without treating a mobile reflow as a content edit.
References: client/…/DashboardGrid.jsx• L166-223 client/…/DashboardGrid.jsx• L239-281 client/…/widget.js• L31-86 client/…/dashboard-grid-options.js• L1-13
Access and sharing
Access boundaries
Dashboard visibility combines organization membership, group access to the data sources used by its queries, and the dashboard's draft or archived state. A dashboard can remain visible while an individual visualization is restricted when the viewer lacks access to its query. The serializer returns a restricted widget shell instead of exposing the visualization content.
References: redash/…/__init__.py• L1144-1162 redash/…/__init__.py• L214-233 client/…/DashboardGrid.jsx• L55-75
Favorites
Favorites are user-specific links to dashboards. The backend prevents duplicate links, provides a filtered favorite list, and adds favorite state to dashboard responses. The frontend exposes that state in the dashboard list and uses dedicated favorite and unfavorite requests.
References: redash/…/__init__.py• L900-932 redash/…/favorites.py• L40-75 redash/…/dashboards.py• L366-405 client/…/dashboard.js• L172-178
Public dashboard sharing
Sharing creates a secret API-key URL for a dashboard rather than making the normal dashboard route anonymous. The owner or an administrator can enable or disable the key. New sharing requires every widget query to be safe, while an existing link can still be disabled if a query later becomes unsafe. Public access can also be disabled for the organization. The public response contains dashboard presentation data without the signed-in user's favorite state.
The dashboard header offers sharing controls when public URLs are enabled and either an active link exists or the current user can manage sharing. A viewer can copy an active link, but only the owner or an administrator can change its state. The public page loads the dashboard with its secret token and renders the same widgets without edit controls. Public viewers can still set dashboard parameters and filters that refresh the displayed query results.
References: redash/…/dashboards.py• L278-350 redash/…/__init__.py• L52-65 client/…/useDashboard.js• L43-55 client/…/useDashboard.js• L179-189 client/…/DashboardHeader.jsx• L183-242 client/…/ShareDashboardDialog.jsx• L29-132 client/…/ShareDashboardDialog.test.js• L27-46 client/…/PublicDashboardPage.jsx• L22-50 client/…/PublicDashboardPage.jsx• L58-109
Visualization embeds
A visualization embed is a focused presentation surface for one visualization from one query. It uses an API-key session, loads the query and its result, renders the selected view, and can expose parameters, timestamps, links, and result downloads according to URL options. Dashboard sharing instead presents the full widget collection through the public dashboard route.
References: redash/…/embed.py• L17-60 client/…/VisualizationEmbed.jsx• L163-265 client/…/VisualizationEmbed.jsx• L280-287
Related surfaces
Reusable visualization library
The reusable visualization library supplies the renderers and shared display pieces used by query pages, dashboard widgets, and embeds. This page covers how product surfaces select and manage visualizations; the child page Reusable visualization library covers the library as a separate component. Query execution and data-source behavior are described in Querying and data sources, while the wider client and API boundaries are described in Web client application and Backend HTTP API.
References: client/…/VisualizationRenderer.jsx• L7-9 client/…/VisualizationWidget.jsx• L278-303 client/…/VisualizationEmbed.jsx• L237-245
Change checklist
When these files or sections are changed, remember to consider these:
- Changes to dashboard or widget response fields must stay aligned with the client-side
DashboardandWidgettransformations. - Changes to visualization access rules must preserve the restricted-widget response so a dashboard does not expose query content by accident.
- Changes to parameter mapping names or types must preserve the link between dashboard parameters, widget parameters, URL values, and refresh selection.
- Changes to public sharing rules must stay aligned across the share API, public dashboard serializer, public route, dashboard hook, header controls, and sharing dialog.
- Changes to dashboard edit controls must preserve the save-status and retry path as well as the responsive header behavior on small screens.
- Changes to visualization types or size limits must remain compatible with widget placement and the reusable visualization library.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A dashboard update uses an old version | The backend rejects the update instead of merging concurrent edits. | The client reports the conflict and asks the user to reload or copy changes. |
| A widget's query is not accessible to the viewer | The dashboard shows a restricted widget and does not return visualization content. | Access is checked before full widget serialization. |
| A dashboard contains a text-parameter query and sharing is off | The owner or administrator cannot enable a new public link. | The dashboard hook checks all widget queries and the share dialog disables the enable switch. |
| A query result refresh fails | The affected visualization widget shows a query error and does not render new data. | The widget keeps refresh state and handles query-result errors in its presentation flow. |
| A public dashboard key is disabled or public URLs are disabled | The public dashboard request is rejected or cannot load the dashboard. | Sharing uses an active key and the public API checks the organization setting. |
| A user edits a dashboard while the grid cannot support editing | Layout changes cannot be made safely for that screen size. | The dashboard disables edit mode when the grid reports an unsupported breakpoint. |
Key files
| File | Why to read it |
|---|---|
| redash/…/__init__.py | Defines the dashboard, visualization, widget, and favorite relationships that form the content model. |
| redash/…/dashboards.py | Shows dashboard discovery, editing, archival, public access, favorites, and forking at the backend boundary. |
| redash/…/widgets.py | Shows how visualizations and text become dashboard widgets and how widget changes are protected. |
| redash/…/visualizations.py | Shows the API boundary for views owned by queries. |
| redash/…/__init__.py | Defines the dashboard, widget, restricted-widget, favorite-state, and public response shapes. |
| client/…/dashboard.js | Connects dashboard data to the client model and coordinates dashboard requests, filters, parameters, and widget placement. |
| client/…/widget.js | Connects a widget to its query result, parameter mappings, display sizing, and persistence. |
| client/…/DashboardPage.jsx | Shows the signed-in dashboard page and how its major controls work together. |
| client/…/useDashboard.js | Coordinates dashboard state, query loading, refresh, parameter persistence, permissions, and sharing. |
| client/…/DashboardHeader.jsx | Shows publication, refresh, fullscreen, edit, archive, favorite, and sharing controls. |
| client/…/DashboardHeader.less | Shows the responsive header behavior and the save-status presentation used during editing. |
| client/…/ShareDashboardDialog.jsx | Shows how users enable, disable, and copy public dashboard access. |
| client/…/ShareDashboardDialog.test.js | Captures the sharing contract for viewers, owners, administrators, safe queries, and existing unsafe links. |
| client/…/DashboardGrid.jsx | Shows the responsive layout boundary between dashboard state and widget presentation. |
| client/…/VisualizationWidget.jsx | Shows the user-facing lifecycle of a query-backed widget. |
| client/…/PublicDashboardPage.jsx | Shows how a shared dashboard reuses the dashboard presentation without edit controls. |
| client/…/VisualizationEmbed.jsx | Shows the focused query visualization embed surface. |