@category
Defines the column from the result set that will serve as the primary xAxis category or pie chart category.
Quick Reference
-- @category: Month
Valid Values
One Of
Must be a column name from the result set
Full Example
-- @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

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.
Last updated
Was this helpful?