Skip to content

Line chart

Prints one or more numeric series as lines over a shared x-axis.

All series must contain the same number of values. When xLabels is provided, it must contain one label per value.

Example

{
  "type": "lineChart",
  "series": [
    {
      "label": "API",
      "values": [
        120,
        140,
        110
      ]
    },
    {
      "label": "DB",
      "values": [
        80,
        90,
        95
      ]
    }
  ],
  "xLabels": [
    "10:00",
    "10:05",
    "10:10"
  ]
}

Fields

FieldTypeDescription
typerequired"lineChart"

Discriminator for line-chart blocks.

seriesrequiredarray<object>

One to four series plotted as separate lines.

  • Minimum items: 1
  • Maximum items: 4
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.