Skip to main content
{% bar y="sum(total_sales)" /%}

Examples

Stacked Bars

{% bar y="sum(total_sales)" stack_id="sales" /%}
{% bar y="sum(total_sales)+1000000" stack_id="sales" /%}

Attributes

y
String
required
Column name for y-axis
axis
String
default:"y1"
The axis to render the series onAllowed values:
  • y1
  • y2
fmt
String
Format for this series’ values
data_labels
default:"{}"
Label each point in the series with its valueExample:
data_labels={
  position = value
  fmt = value
  size = 0
  distance = 0
  rotate = 0
  color = "string"
  show_overlap = true
}
Attributes:
  • position: effects - Position the label relative to its data point
  • fmt: enum - Format the label value. Defaults to series or axis fmt.
  • size: number - Font size in px
  • distance: number - How far the label is from the data point
  • rotate: number - Rotate each label (degrees)
  • color: string - Change the text color of the labels
  • show_overlap: boolean - Show labels for every point even when they overlap
options
Example:
options={
  color = "string"
  opacity = 0
}
Attributes:
  • color: string
  • opacity: number - Between 0 and 1
stack_id
String
Stack identifier - bars with the same stack_id value will be stacked together

Allowed Parents