@chart

Defines the type of chart like line, area, column, combo

Quick Reference

-- @chart: pie

Valid Values

Must be one and only one of the valid chart types supported by ChartSQL

One Of

  • column

  • bar

  • pie

  • line

  • area

  • combo

Full Example

-- @chart: column
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 want to specify the type of chart exactly, or the full auto-detection does not meet your needs, you use the @chart directive.

If you have not specified @category, @series or @secondary, they will be inferred from the columns in the result set.

Last updated

Support

DiscordX

ChartSQL