barchart

barchart, tile type

The barchart tile displays one or more numeric series grouped by category. Each value expression passed after the with keyword should use an aggregator. An explicit group by statement is expected.

table T = extend.range(10)
T.X = random.poisson(5 into T)
T.G = "G\{T.N}"

show barchart "My Groups" {unit: "$"} with
  sum(T.X)
  group by T.G

The tile can also display multiple series:

table T = with
  [| as Category, as Units, as Returns |]
  [| "A", 10, 1 |]
  [| "A", 15, 2 |]
  [| "B", 8, 0 |]
  [| "B", 12, 1 |]

show barchart "Units and returns" { 1..2, 1..4 } with
  sum(T.Units) as "Units" { color: "orange" }
  sum(T.Returns) as "Returns" { color: "red" }
  group by T.Category

Remarks

Each value expression becomes one series in the barchart.

Legacy dashboards version with placement such as a1d4 accepts exactly one value expression. Use region placement to display multiple series.

StyleCode

For generic StyleCode rules, see stylecode.

User Contributed Notes
0 notes + add a note