STREAM

Overview

Stream

A streamgraph, or stream graph, is a type of stacked area graph which is displaced around a central axis, resulting in a flowing, organic shape.

We have two modes of operation.

In the first mode, which we could call the "successive points" mode, we specify for each series a value in y at each message. Values ​​in x are automatic increments. 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: a table is specified at y, which explicitly defines all the points to be displayed.

Successive Points Mode

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

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

two points are displayed on the graph, at abscissa "0" and at ordinates 4 and 8.

If a new message is received:

{
  "payload": {
    "prop1": 6,
    "prop2": 10
  }
}

two new points are displayed, at abscissa 1 and ordinates 6 and 10.

XY Mode

If a user configures a "Series 1" series using table "tab1" and a "Series 2" series using table "tab2", then upon receiving the following message:

{
  "payload": {
    "tab1": [4, 6],
    "tab2": [8, 10]
  }
}

Four points are displayed on the graph: two at abscissa "0" (and ordinates 4 and 6), and two others at abscissa "1" (and ordinates 8 and 10). When new tables for x and y are received, the received data replaces the existing graph. The point limit has no meaning here and should be ignored.

Was this article helpful?

Powered by Zendesk