> For the complete documentation index, see [llms.txt](https://docs.chartsql.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chartsql.com/reference/directives/title.md).

# @title

## Quick Reference

```sql
-- @title: Sales by Month
```

## Valid Types

`String`

A string value of how you want to title the chart

## Full Example

```sql
-- @title: Auto Heatmap
-- @subtitle: An example auto generated heatmap comparing two categories
SELECT
Owner,
Channel,
count(*) as Sales
FROM Sales
WHERE Sales.Status = 'Won'
GROUP BY Owner, Channel
```

Chart titles are used in various places thoughout the UI

File menu:

<div align="left"><figure><img src="/files/pFDA8OX0OxZJjXADAaFZ" alt=""><figcaption><p>Example of a chart title showing in the file list</p></figcaption></figure></div>

File List:

<figure><img src="/files/Uv6Vc0hiPAzw3W8jLdqp" alt=""><figcaption></figcaption></figure>

## Use Cases

Setting a @title gives your chart a more user friendly title. When no title is set, the file name is the default title.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chartsql.com/reference/directives/title.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
