> ## Documentation Index
> Fetch the complete documentation index at: https://docs.adriel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Line chart

> Connected points showing a metric's trend over an ordered breakdown — most often time.

A **line chart** connects data points into a continuous line, showing how a metric moves across an ordered breakdown. Line charts are the natural choice for tracking metrics over time.

## When to use a line chart

* **Trends over time** — spend by day, conversions by week, impressions by hour.
* **Multiple metrics on shared axes** — for example, Spend and Conversions plotted together to spot the relationship between the two.
* **Long time windows** — line charts read well across many data points; a column chart with 90 daily bars gets cramped.

For side-by-side comparisons across a small set of categories, a [column chart](/widgets/widget-library/chart-widgets/column-chart) is easier to read.

## Configure a line chart

### Mandatory fields

<Steps>
  <Step title="Pick a data source">
    In the **Data sources** section, select the data source to include.
  </Step>

  <Step title="Pick a Y-axis metric">
    Click **Edit** on the Y-axis metric field to open the picker panel. Pick up to **20 metrics** to make available in the widget's dropdown, reorder them if needed, and set the active one shown by default. The active metric renders as the line series value — for example, Spend, Impressions, Conversions. New custom metrics can be created directly from the picker panel without leaving the chart widget. Multiple metrics can be plotted as separate lines on the same chart.
  </Step>

  <Step title="Pick an X-axis">
    Click **Edit** on the X-axis field to open the picker panel. Pick up to **20 breakdowns** to make available in the widget's dropdown, reorder them if needed, and set the active one shown by default. The active breakdown renders as the horizontal axis — for example, a time unit (such as Day, Week, Month, Quarter, or Year), which is what a line chart is best at showing. New custom breakdowns can be created directly from the picker panel without leaving the chart widget.

    Note: date breakdowns have per-connector lookback limits. See [Breakdowns → Date breakdown limits](/widgets/breakdowns-and-metrics/breakdowns#date-breakdown-limits).
  </Step>

  <Step title="Set the Group by">
    Click **Edit** on the Group by field to open the picker panel. Pick up to **20 breakdowns** to make available in the widget's dropdown, reorder them if needed, and set the active one shown by default. The active breakdown renders as the separate lines shown on the chart — for example, one line per Channel or one line per Campaign.

    Group by isn't strictly required. Every Group by picker includes a **No grouping** option, which shows a single line of aggregated totals across the X-axis.
  </Step>
</Steps>

Widget changes save automatically when the settings panel closes. Persist changes to the dashboard by clicking **Save dashboard**.

### Optional fields

* **Widget filter** — narrow the data feeding the widget. See [Filters](/dashboards/filters-and-dates/filters).
* **Period** — override the dashboard's date range. See [Date ranges](/dashboards/filters-and-dates/date-ranges).
* **Hide metric value** — hide items whose **Ad Spend**, **Impressions**, or **Link Clicks** meet a threshold. Two blocks are available: a preset "Value = 0" checkbox per metric, and a custom threshold block with an operator (default `≤`) and value. Both can be combined.
* **Display settings** — controls **Number of items** (All, 5, 10, 15, 20; default 10), **Sort order**, and a Hide "others" toggle for the aggregate residual.
* **Data labels** — show the metric value on each item. Off by default.
* **Grid** — toggle background gridlines.
* **Chart controls** — toggle whether Chart controls render on this widget. On by default.

## Chart controls

Chart controls are toggled on or off per widget from the **Chart controls** switch in the widget settings panel. When off, Chart controls don't render on the widget; when on, the dropdowns configured below appear on the widget.

Some key settings can be updated directly from the widget header without opening the settings panel. The **Chart controls** on a line chart expose:

* **Chart type** — a switcher on the left of the widget header to change to another chart type.
* **Y-axis** — swap the vertical metric inline.
* **X-axis** — swap the horizontal axis inline.
* **Group by** — change the line grouping inline.

Changes made in the Chart controls **aren't saved automatically** — click **Save dashboard** to persist them. Chart controls are read-only when viewing a shared dashboard. In shared dashboards, Chart controls show only the items selected in each field, matching what the dashboard owner configured.

## Comparison mode

Line charts render comparison values as a **gray line** across the chart. The comparison line only appears when both conditions are met:

* The dashboard-level or widget-level Compare toggle is on.
* The chart's **X-axis is a time unit**.

The gray line represents the **previous period's total** across the visible window. If the chart has a Group by (multiple colored lines), comparison ignores the grouping and plots only the aggregated total for the comparison window — so the comparison line is a single gray series, not one per group.

For any non-time X-axis, no comparison renders.

## Time-window cap

Line charts cap the visible **time window at 2 years** — a series longer than 2 years is dropped from the render. For longer history, split the analysis into multiple line charts scoped to shorter windows, or use a table widget.

## Missing data points

For most metrics, a data point with no value on a given date renders as `0`, so the line continues along the axis. Two metrics are exceptions: **CPC** and **Optimized Budget** render missing points as floating dots rather than zeroes — this avoids implying that CPC dropped to zero on a day with no impressions.

## Widget styling

Global widget style settings — font, border, background, and color themes — apply to every widget through the [Dashboard style settings](/dashboards/building/dashboard-style-settings#global-widget-settings). On top of those, Line chart widgets have style options unique to this widget type:

* **Color type** — toggle between **Solid** and **Gradient** for the line fill.
* **Data Label** and **Data Label Stroke** — when data labels are enabled, both the label color (HEX) and the stroke color (HEX + opacity) are configurable in the Grid block.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Line chart is empty">
    Confirm the Y-axis metric and X-axis produce data in the current date range. See [Data not loading](/troubleshooting/data-not-loading).
  </Accordion>

  <Accordion title="Time series looks cut off">
    Line charts cap the visible window at 2 years. Narrow the dashboard-level or widget-level date range to fit inside a 2-year window.
  </Accordion>

  <Accordion title="Data drops to zero on some days">
    For most metrics, missing values render as zero, which shows as the line touching the X-axis. If this is misleading, aggregate to a coarser X-axis such as Week or Month, or switch to CPC or Optimized Budget which render missing values as floating dots.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Column chart" href="/widgets/widget-library/chart-widgets/column-chart">
    Side-by-side comparisons across categories.
  </Card>

  <Card title="Combo chart" href="/widgets/widget-library/chart-widgets/combo-chart">
    Overlay a line over bars for combined visualization.
  </Card>

  <Card title="Date ranges" href="/dashboards/filters-and-dates/date-ranges">
    Set the reporting window.
  </Card>
</CardGroup>
