piechart

piechart, tile type

The piechart tile is intended to display a piechart. The tile expects one vector passed as argument and one group by option.

table T = with 
  [| "Shirt" as Product, "FR" as Country |]
  [| "Hat"             , "FR"            |]
  [| "Hat"             , "US"            |]
  [| "Pant"            , "US"            |]
  [| "Pant"            , "UK"            |]
  [| "Shoes"           , "UK"            |]

T.Sales = random.poisson(10 into T)

show piechart "Sales per product" a1c6 {unit: "$"} with
  sum(T.Sales)
  group by T.Product

The aggregator is not needed if group by is done with a dimension.

table T[product] = with 
  [| "Shirt" as Product |]
  [| "Hat"              |]
  [| "Pant"             |]
  [| "Shoes"            |]

T.Sales = random.poisson(10 into T)

show piechart "Sales per product" a1c6 {unit: "$"} with
  T.Sales
  group by product
User Contributed Notes
0 notes + add a note