Skip to content

Bar chart

Prints labelled non-negative values as vertical bars.

Item labels must be unique. If yMax is provided, it must be at least as large as every item value.

Example

{
  "type": "barChart",
  "items": [
    {
      "label": "Mon",
      "value": 12
    },
    {
      "label": "Tue",
      "value": 18
    }
  ]
}

Fields

FieldTypeDescription
typerequired"barChart"

Discriminator for bar-chart blocks.

itemsrequiredarray<object>

Labelled values plotted as vertical bars.

  • Minimum items: 1
  • Maximum items: 16
Nested fields
FieldTypeDescription
labelrequiredstring

Short chart label.

  • Maximum length: 32
valuerequirednumber

Finite numeric chart value.

  • Minimum: 0
yMaxoptionalnumber

Optional upper bound for the y-axis.

  • Minimum: 0