# @category

## Quick Reference

```sql
-- @category: Month
```

## Valid Values

`One Of`

Must be a column name from the result set

## Full Example

```sql
-- @chart: Line
-- @title: Line - Sales by Month
-- @subtitle: An example line chart showing sales by month
-- @category: Month
-- @formats: currency
SELECT
	TRUNC(date_closed, 'MONTH') as Month,
	sum(amount) as Sales
FROM sales
GROUP BY TRUNC(date_closed, 'MONTH')
ORDER BY TRUNC(date_closed, 'MONTH') ASC
```

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

<details>

<summary>Sample Data</summary>

<img src="/files/O6X7Q5NEtUZc8FGBgu1x" alt="" data-size="original">

</details>

## Use Cases

When you do not want the @category columns auto-detected, you specify @category to pick the particular columns that you want used on the main axis.


---

# Agent Instructions: 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/category.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.
