LINE

Overview

Line

Line chart with stacking ability.

We have two modes of operation:

In the first mode (which we could call the "successive points" mode), we specify a value in x and a value in y for each message. This leads to an additional point being displayed in the graph, and the points continue to add to the graph up to the user-defined limit quantity, then each new point replaces the oldest and so on. This mode is practical for time series where the data arrives gradually.

The second mode is the XY mode: we specify in x and y two tables of the same dimensions, which explicitly define all the points to be displayed. The first table defines the list of abscissas and the second table defines the list of ordinates.

Successive point mode

If a user configures a series "Series 1", choosing the "prop1" property for the x axis and the "prop2" property for the y axis, then upon receiving the following message:

{
  "payload": {
    "prop1": "abscisse1",
    "prop2": 4
  }
}

A point is displayed on the graph, at the abscissa "abscissa1" and at the ordinate 4.

If a new message is received:

{
  "payload": {
    "prop1": "abscisse2",
    "prop2": 4
  }
}

A second point is displayed, at the abscissa "abscissa 2" and at the ordinate 4. A line then connects these two points.

XY Mode

If a user configures a series "Series 1", choosing for the x axis the table "tab1" and for the y axis the table "tab2", then when receiving the following message:

{
  "payload": {
    "tab1": ["abscisse1", "abscisse2"],
    "tab2": [4, 4]
  }
}

Two points are displayed on the graph, at the abscissa "abscissa1" and "abscissa2", and both at the ordinate 4. A line connects them. When new tables for x and y are received, the received data replaces the existing graph. The point count limit has no meaning here and should be ignored.

Was this article helpful?

Powered by Zendesk