ranvar

There are other concepts named ranvar. See the entire list.

ranvar, tile type

The ranvar tile plots a probability distribution in a region-based dashboard. It accepts one ranvar value. Unlike the general-purpose scalar tile, show ranvar explicitly requests a distribution chart.

Examples

show ranvar "Demand" { 1..6, 1..6 } with poisson(4)

The chart displays a Poisson demand distribution with a mean of 4 units.

The distribution accepts a series name with as and its own color:

show ranvar "Demand" { 1..6, 1..6;
  tileColor: red;
  tileTooltip: "Demand over the **lead time**."
} with
  poisson(4) as "Lead-time demand" { color: blue }

The bars are blue while the tile accent is red. Without an explicit series color, the bars use the tile color. The series name identifies the distribution when hovering over the chart. Use tileTooltip for a Markdown tooltip on the tile; tileTooltipText is not supported.

Use sliced to display a different distribution for each dashboard slice:

table Products = with
  [| as Product, as MeanDemand |]
  [| "Shirt", 4 |]
  [| "Hat", 9 |]

table Slices[slice] = slice by Products.Product title: Products.Product
Slices.Demand = poisson(same(Products.MeanDemand))

show ranvar "Demand by product" sliced { 1..6, 1..6 } with Slices.Demand

Selecting “Shirt” displays the distribution with a mean of 4 units; selecting “Hat” displays the distribution with a mean of 9 units.

StyleCode

StyleCode applies to the ranvar tile itself and its single series. Attach series StyleCode to the ranvar expression inside with. See stylecode for the general syntax and scope rules.