Example
Attributes
Table or view to query
Column for x-axis (often date/time)
Column for y-axis (values to plot)
Type of sparkline to display
Color of the sparkline (CSS color)
Format for y-axis tooltip (e.g., “num”, “usd”, “pct”)
Format for x-axis tooltip (e.g., “shortdate”, “longdate”)
Whether to scale the y-axis to the data range
Whether the sparkline should be interactive
IDs of filters to apply to the query
Custom SQL WHERE condition to apply to the query. For date filters, use date_range instead.
Custom SQL HAVING condition to apply to the query after GROUP BY
Maximum number of rows to return from the query
Column name(s) with optional direction (e.g. “column_name”, “column_name desc”)
Custom SQL QUALIFY condition to filter windowed results
date_range
Use date_range to filter data for specific time periods. Accepts predefined ranges (e.g., “last 12 months”), dynamic ranges (e.g., “Last 90 days”), custom date ranges (e.g., “2020-01-01 to 2023-03-01”), or partial ranges (e.g., “from 2020-01-01”, “until 2023-03-01”)Example:Attributes:
- range:
enum
- date:
string
date_grain
Time grain for date truncation (default: day for date columns)
Set the width of this component (in percent) relative to the page width