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

# Query chart settings and formatting

> Format numbers, configure axes, gridlines and reference lines, and add rolling or cumulative calculations to a Kubit Query chart.

Chart settings change how a Query report displays its data after it runs: number formats, axes, line styles, gridlines, reference lines, pie and stacked options, rolling calculations, sorting and rank. Open them from the **Chart settings** tab next to **Report builder**, or from the gear icon above the chart.

## When to use

| Use case | Example |
| - | - |
| Show a raw value in friendlier units | A duration stored in milliseconds shown as seconds |
| Mark a target or threshold | A reference line at 10,000 on a daily revenue chart |
| Smooth a noisy series | A 7-day moving average on daily active users |
| Compare measures with different scales | One measure on the left Y-axis and another on the right in a Combo chart |

## Number formatting

Number formatting (**Measure Display Format**) controls how a measure's values appear in the chart and the table.

| Setting | Options |
| - | - |
| **Format Kind** | Number (`#`), Percent (`%`), Currency (`$`) |
| **Decimal Places** | 0, 1, 2, 3 or 4 |
| **Calculation** | Divide or multiply by a constant before display |
| **Calculation Presets** | 10, 60, 100, 720, 1,000, 3,600, 86,400, 1,000,000, or a custom value |
| **Unit Label** | Days, Hours, Minutes, Months, Milliseconds, Seconds, Weeks, Years |

For example, to show a value stored in milliseconds as seconds with 2 decimal places, set **Format Kind** to Number, **Calculation** to divide by 1000, **Decimal Places** to 2 and **Unit Label** to Seconds.

In the screenshot, the format settings open from a measure's options menu (the three-dot icon next to the measure in the legend) under **Format**, with the fields **Format**, **Precision**, **Calculation** and **Unit**.

![A measure's options menu open below the chart with Rename, Change Color, Format, Save Cohort and Inspect Users, and the Format submenu showing Format, Precision, Calculation and Unit fields with Reset and Confirm buttons.](https://mintcdn.com/kubit/9i8QHxqek50tMBGy/images/reports/query/measure-display-format.png?fit=max\&auto=format\&n=9i8QHxqek50tMBGy\&q=85\&s=8e2712641013b41701c6672799203241)

## Y-axis

| Setting | Options |
| - | - |
| **Axis** | Visible or Hidden |
| **Label** | Custom text, **50** characters at most |
| **Format** | Number, Percent or Currency, with adjustable decimals |
| **Bounds** | Auto (default), Truncate, or Custom with a min and max value |
| **Position** | Left Y-axis or right Y-axis, for dual-axis Combo charts |

![Chart settings tab with the Left Y-Axis section open, showing Axis set to Visible, a Label field, an Apply Y-Axis Format toggle, Bound set to Auto and a Show Reference Lines toggle.](https://mintcdn.com/kubit/9i8QHxqek50tMBGy/images/reports/query/y-axis-settings.png?fit=max\&auto=format\&n=9i8QHxqek50tMBGy\&q=85\&s=6e0aab0d7b8e5d1e4b1f7401c11a79e5)

## X-axis

| Setting | Options |
| - | - |
| **Axis** | Visible or Hidden |
| **Label** | Custom text, **100** characters at most |

## Line and point styles

These settings apply to Line and Combo charts.

| Setting | Options |
| - | - |
| **Line Style** | Straight or Smoothed (curved) |
| **Dot Style** | Filled, Outlined or Hidden |
| **Measure Line Type** | Combo charts only. Renders each measure as a line or as bars. |

## Gridlines

| Setting | Options |
| - | - |
| **X-Axis Gridlines** | Show or hide |
| **Y-Axis Gridlines** | Show or hide |
| **Gridline Style** | Solid or Dashed |

## Reference lines

Reference lines are horizontal lines that mark a threshold or target. Each axis takes up to **5** reference lines.

| Setting | Options |
| - | - |
| **Value** | The numeric position of the line |
| **Label** | Text label, **50** characters at most |
| **Color** | Custom hex color |
| **Stroke Style** | Solid, Dashed or Dotted |

## Pie chart settings

| Setting | Description |
| - | - |
| **Donut Mode** | Switches between a filled pie and a donut with a hollow center |
| **Show Labels** | Shows value labels on each slice |

## Stacked chart settings

| Setting | Description |
| - | - |
| **Number vs. Percentage** | Shows absolute values, or normalizes each column to 100% |
| **Hide Others** | Removes the "Others" category while keeping the total |

## Rolling and cumulative calculations

Rolling and cumulative calculations smooth or accumulate values over a time window.

| Calculation | Description |
| - | - |
| **Moving Average (7-day)** | Average of the current point and the previous 6 periods |
| **Moving Average (30-day)** | Average of the current point and the previous 29 periods |
| **Moving Sum (7-day)** | Sum of the current point and the previous 6 periods |
| **Moving Sum (30-day)** | Sum of the current point and the previous 29 periods |
| **Cumulative Sum** | Running total from the start of the date range |

[Advanced Query analysis](https://learn.kubit.ai/product-analytics/reports/query/advanced-analysis.md) covers rolling measures, which apply a rolling window to the measure itself.

## Sorting

| Setting | Options |
| - | - |
| **Measure Sort** | None, Alphabetical (A→Z or Z→A), Average (Low→High or High→Low) |
| **Breakdown Sort** | Sort direction per group, for breakdowns on several dimensions |

## Show rank

With a **Group By** active, turn on **Show Rank** to show a rank number (1st, 2nd, 3rd and so on) next to each breakdown value, ordered by measure value.

## MCP prompt examples

**Availability:** chart settings are applied in the Kubit app after a report is built. They can't be set through the MCP server.

> "Show me a line chart of daily revenue with a 7-day moving average, smoothed curves, and a reference line at 10,000"

> "Create a 100% stacked bar chart of events by category over the last 14 days"

> "Build a KPI showing average response time in seconds (the raw value is in milliseconds)"

## Related

* [Chart types](https://learn.kubit.ai/product-analytics/reports/query/chart-types.md): which settings apply to which chart.
* [Data table view](https://learn.kubit.ai/product-analytics/reports/query/data-table-view.md): the table below the chart, and hiding series.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.