Skip to content

Area chart

Prints one numeric series as a filled area chart.

When xLabels is provided, it must contain one label per value. When both bounds are provided, yMin must be lower than yMax.

Example

{
  "type": "areaChart",
  "series": {
    "label": "Room",
    "values": [
      19,
      21,
      20,
      22
    ]
  },
  "xLabels": [
    "08:00",
    "10:00",
    "12:00",
    "14:00"
  ]
}

Fields

FieldTypeDescription
typerequired"areaChart"

Discriminator for area-chart blocks.

seriesrequiredobject

Series plotted as a filled area.

Nested fields
FieldTypeDescription
labelrequiredstring

Short chart label.

  • Maximum length: 32
valuesrequiredarray<number>

Values in this series, ordered along the x-axis.

  • Minimum items: 2
  • Maximum items: 48
xLabelsoptionalarray<string>

Optional x-axis labels for each data point. Keep labels as short as possible.

  • Minimum items: 2
  • Maximum items: 48
yMinoptionalnumber

Optional lower bound for the y-axis.

yMaxoptionalnumber

Optional upper bound for the y-axis.