
Examples
Basic Usage

Line Chart with Series

Line Chart with Formatting

Line Chart with Series Colors
Revenue by Day of Week
Seasonality Analysis (Month of Year)
Quarterly Trends
Monthly Billing Cycle Patterns
Week Number Analysis
Day of Year Analysis
Attributes
Name of the table to query
IDs of filters to apply to the query
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:
string- Time period to filter. Use presets like ‘last 7 days’, dynamic patterns like ‘Last 90 days’, custom ranges like ‘2020-01-01 to 2023-03-01’, or partial ranges like ‘from 2020-01-01’.- Allowed values:
last 7 dayslast 30 dayslast 3 monthslast 6 monthslast 12 monthsweek to datemonth to datequarter to dateyear to dateprevious weekprevious monthprevious quarterprevious yearall time
- Allowed values:
- date:
string- Date column to filter on. Required when the data has multiple date columns.
Time grain for date truncation (default: day for date columns)Allowed values:
dayweekmonthquarteryearhourday of weekday of monthday of yearweek of yearmonth of yearquarter of year
How to handle missing data points. “connect” auto-connects points (default), “gaps” shows visual breaks, “zero” fills with zeros.Allowed values:
connectgapszero
Column name for x-axis
Format for x values and axis labels. See Value Formatting for available formats.
Format for y values and axis labels. See Value Formatting for available formats.
Format for y2 values and axis labels. See Value Formatting for available formats.
Column name for series grouping (applies to all series)
Column name for size
Column name for individual point labels displayed at the top of the tooltip
Title to display above the component
Subtitle to display below the title
Information tooltip text (can only be used with title). Displays an info icon next to the title.
URL to link the info text to (can only be used with info)
Create a custom link title for the info link, placed after the info text (can only be used with info_link)
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. Note: When used with tables, limit will disable subtotals to prevent incomplete subtotal rows.
Column name(s) with optional direction (e.g. “column_name”, “column_name desc”)
Custom SQL QUALIFY condition to filter windowed results
Set the width of this component (in percent) relative to the page width
Set a fixed height for the chart in pixels
Sort order for x-axis categories. Options:
asc (alphabetical), desc (reverse alphabetical), data (preserve query order), or an array for custom order like ["A", "B", "C"]Allowed values:ascdescdata
Configure the y-axisExample:Attributes:
- title:
string - title_position:
string- Position of the axis title. “top” places it horizontally at the top, “side” places it vertically along the axis. Defaults to “side” for 100% stacked charts, “top” otherwise.- Allowed values:
topside
- Allowed values:
- ticks:
boolean - baseline:
boolean - labels:
boolean- Show/hide axis labels - gridlines:
boolean- Show/hide gridlines - min:
number- Minimum value for this axis - max:
number- Maximum value for this axis - fit_to_data:
boolean- Fit the axis to the data instead of including 0 - interval:
number- Interval between axis ticks for numeric axes. This option is a suggestion, the actual interval may differ.
Configure the secondary y-axisExample:Attributes:
- title:
string - title_position:
string- Position of the axis title. “top” places it horizontally at the top, “side” places it vertically along the axis. Defaults to “side” for 100% stacked charts, “top” otherwise.- Allowed values:
topside
- Allowed values:
- ticks:
boolean - baseline:
boolean - labels:
boolean- Show/hide axis labels - gridlines:
boolean- Show/hide gridlines - min:
number- Minimum value for this axis - max:
number- Maximum value for this axis - fit_to_data:
boolean- Fit the axis to the data instead of including 0 - interval:
number- Interval between axis ticks for numeric axes. This option is a suggestion, the actual interval may differ.
Configure the x-axisExample:Attributes:
- title:
string - label_wrap:
boolean - ticks:
boolean - baseline:
boolean - labels:
boolean- Show/hide axis labels - gridlines:
boolean- Show/hide gridlines - min:
number- Minimum value for this axis - max:
number- Maximum value for this axis - fit_to_data:
boolean- Fit the axis to the data instead of including 0 - min_interval:
string- Minimum interval between axis ticks for time-based axes. This option is a suggestion, the actual interval may differ.- Allowed values:
yearquartermonthweekdayhour
- Allowed values:
- max_interval:
string- Maximum interval between axis ticks for time-based axes. This option is a suggestion, the actual interval may differ.- Allowed values:
yearquartermonthweekdayhour
- Allowed values:
- interval:
number- Interval between axis ticks for numeric axes. This option is a suggestion, the actual interval may differ. - label_rotate:
number- Rotation angle of axis label in degrees. Positive values rotate clockwise, negative values rotate counter-clockwise. - max_label_length:
number- Maximum character length for axis labels. Labels exceeding this length will be truncated with an ellipsis. Defaults to 20 characters when labels are rotated.
Show legend
Position of the legend (top or bottom)Allowed values:
topbottom
Array of series names to define the order of series in the chart and legend. Series not in the array will appear after the ordered ones.
Additional chart configuration optionsAttributes:
- color_palette:
array - series_colors:
map - zoom:
boolean- Enables zoom by dragging on the chart area - top_padding:
number- Additional padding (in px) above the chart area to prevent labels from being cut off
Column name for y-axis
Format for this series’ values. See Value Formatting for available formats.
Label each point in the series with its valueExample:Attributes:
- position:
string- Position the label relative to its data point- Allowed values:
abovebelowleftrightmiddle
- Allowed values:
- fmt:
string- Format the label value. Defaults to series or axis fmt.- Allowed values: See Value Formatting for all available formats.
- size:
number- Font size in px - distance:
number- How far the label is from the data point - rotate:
number- Rotate each label (degrees) - color:
string- Change the text color of the labels - show_overlap:
boolean- Show labels for every point even when they overlap
Column name for secondary y-axis
Example:Attributes:
- color:
string - width:
number- Width of the line - type:
string- Allowed values:
soliddasheddotted
- Allowed values:
- opacity:
number- Between 0 and 1 - markers:
options group - step:
string- Show a stepped line rather than a smooth line between points and control where the step happens (start, middle, or end)- Allowed values:
startmiddleend
- Allowed values:
- smooth:
boolean

