Example

{% histogram
    data="demo_daily_orders"
    value="transactions"
    bin_count=30
/%}

Attributes

data
String
required
Name of the table to query
value
String
required
SQL expression for the values to create histogram for
series
String
Column name to group data by series
bin_count
Number
default:"20"
Number of bins for the histogram (takes precedence over bin_width)
bin_width
Number
Width of each bin (ignored if bin_count is specified)
fmt
String
Format for the column values displayed in bin ranges
filters
Array
default:"[]"
Array of column names to use as filters
title
String
Title to display above the histogram
subtitle
String
Subtitle to display below the title
info
String
Info text to display in a tooltip next to the title. Can only be used with the title prop.
where
String
Custom SQL WHERE condition to apply to the query. For date filters, use date_range instead.
limit
Number
Maximum number of rows to return from the query
width
Number
Set the width of this component (in percent) relative to the page width