@series-labels

Adds labels to series items, placing the text at the top, bottom, inside and various positions

Quick Reference

-- @series-labels: inside, top

Type

List

Comma separated list of label positions that ordinally match the @series and @secondary-series

Full Example

-- @chart: column
-- @title: Series Labels - Label at Top of Series
-- @subtitle: An example column chart with a series label above the top
-- @formats: currency
-- @series-labels: top
SELECT 
	TRUNC(date_closed, 'MONTH') as Month,
	sum(amount) as Sales
FROM sales
-- Select just 1 year so that the labels are not too cluttered
WHERE year(date_closed) = 2017
GROUP BY TRUNC(date_closed, 'MONTH')
ORDER BY TRUNC(date_closed, 'MONTH') ASC;

Valid Values

  • true

  • false

  • top

  • left

  • right

  • bottom

  • inside

  • insideLeft

  • insideRight

  • insideTop

  • insideBottom

  • insideTopLeft

  • insideBottomLeft

  • insideTopRight

  • insideBottomRight

Other directives that have an impact on the rendering of @series-labels

@formats

Series formats of currency , percent, integer, & decimal will also apply the same styling rules to the series labels

Use Cases

Adding series labels is helpful when you intend to review the actual value for each item in a series, rather than just look at the overall trend. It is easier to read the label then to have to scan the axis values. The downside of labels is they add more visual clutter to the visualization. You should only use series labels when there are not too many elements and the value of each series item is always important to see at a glance.

Example Charts

Last updated

Support

DiscordX

ChartSQL