Skip to main content
Date zoom lets you change the date granularity of all time-based charts on a dashboard at once. This is useful for zooming in to see daily patterns or zooming out to identify long-term trends—without editing individual charts.

How date zoom works

When viewing a dashboard, click the Date Zoom dropdown to select a granularity (Day, Week, Month, Quarter, Year). All charts with date dimensions will update to show data at that granularity.
Key behaviors:
  • Applies to charts with at least one date dimension in the results
  • If a chart has multiple date dimensions, date zoom uses the first (left-most) dimension
  • Changes are temporary—refreshing the dashboard restores the original granularity
  • You can see which dimension was affected by hovering over the indicator on each tile

Configuring available granularities

Dashboard editors can customize which granularities appear in the date zoom dropdown and set a default.

Setting available granularities

  1. Open the dashboard in edit mode
  2. Click the Date Zoom dropdown
  3. Click the pencil icon to enter edit mode
  4. Use the checkboxes to enable or disable granularities
  5. At least one granularity must remain enabled
  6. Save the dashboard to persist your changes

Setting a default granularity

You can pin a granularity as the default that’s automatically applied when the dashboard loads:
  1. In date zoom edit mode, click the pin icon next to a granularity
  2. The pinned granularity becomes the default
  3. Click the pin again to remove the default
When a default is set, the dashboard automatically applies that granularity on load (unless overridden by a URL parameter).
Default granularities don’t apply when the dashboard is loaded with a granularity already specified in the URL.

Using custom granularities

Custom granularities defined in your lightdash.config.yml appear in the date zoom dropdown alongside standard options. This is useful for business-specific time periods like fiscal quarters or custom week definitions. Custom granularities appear below a visual divider in the dropdown, using their configured labels. To use custom granularities in date zoom:
  1. Define the granularity in lightdash.config.yml:
custom_granularities:
  fiscal_quarter:
    label: "Fiscal Quarter"
    sql: "DATE_TRUNC('quarter', ${COLUMN} + INTERVAL '1 month')"
  1. Reference it in your dimension’s time_intervals:
columns:
  - name: order_date
    meta:
      dimension:
        type: date
        time_intervals: ['DAY', 'WEEK', 'MONTH', 'fiscal_quarter', 'YEAR']
The custom granularity will now appear in date zoom for any chart using that dimension.
See custom granularities configuration for the full reference and dimensions reference for more examples.

Removing date zoom from a dashboard

To prevent users from changing date granularity:
  1. Open the dashboard in edit mode
  2. Click the X on the Date Zoom dropdown
  3. Save the dashboard
This hides the date zoom control entirely.

Date zoom in embedded dashboards

Date zoom can be enabled or disabled in embedded dashboards using the canDateZoom option in your JWT token:
{
  content: {
    type: 'dashboard',
    dashboardUuid: 'your-dashboard-uuid',
    canDateZoom: true,  // Enable date zoom in embed
  }
}
See the embedding reference for complete details.