Skip to main content
App version: 3.4.14

Smoothing in charts

Neptune may transform the data displayed on charts by applying the following:

A chart with and without the manual smoothing applied.

Full fidelity

Neptune can always retrieve 100% accurate values. You can increase the precision of displayed values by zooming in.

Apply smoothing

When you enable smoothing, Neptune recalculates the y-values that are displayed on the chart. A higher smoothing factor increases the size of the window that's used to determine each point's y-value.

To ensure uniformity between displayed graphs, the window is based on X-axis distance rather than the number of displayed points.

Details on edge behavior
  • Near the edges of the chart, the input window shrinks to include fewer points. For example, if using causal smoothing, at the very left edge the window consists of only the point itself.
  • When a chart is zoomed in, only points in the visible range are retrieved and taken into account when smoothing is applied. This can lead to reduced smoothing precision at the edges of the visible range.

Choosing the algorithm

To select the algorithm, access the global controls or widget menu ():

  • EMA Causal (default): Exponential moving average calculated from past inputs, with exponentially decreasing weights as the distance increases. The weight drop-off is based on x-range, regardless of the number of points.

  • SMA: Simple moving average, calculated from inputs that fit inside the window's x-range.

    • Causal: The window is backward-looking and only includes past and present inputs.
    • Centered: The window includes past, present, and future inputs, from an equal x-range in each direction.

Setting the factor

You can control the smoothing factor in the local or global chart settings. Use the slider, or input a percentage number directly.

The smoothing factor determines the size of the window as follows:

WindowSize = FullRangeOfXValues ÷ 2 × (SmoothingFactor ÷ 100)

For example:

  • With 100% smoothing, the window comprises 50% of the X-axis range.

    Chart with the smoothing slider set to 100%.

  • With the smoothing slider in a middle position, the window size is scaled down linearly. For example: With 50% smoothing, the window size is 25% of the chart width.

    Chart with the smoothing slider set to 50%.

EMA and window size

For the causal EMA algorithm, the window represents the X-axis range that 95% of the total weight is accumulated over. The total weight refers to the integral of the EMA weighting function over all past values.

For example: With a range of [0, 1000] and smoothing factor 40, the window size is 1000 ÷ 2 × 0.4 = 200. In this case, 95% of the weight is accumulated over a backward-looking window spanning 200/1000 = 20% of the chart width. The remaining 5% of the weight is accumulated over the remaining 80% of the past points.

Rendering algorithm ("downsampling")

Neptune renders charts based on all data points. You can always retrieve and display original values by zooming the chart enough.

If there are too many original points to display at once, Neptune renders aggregated values. To ensure uniform distribution of all data points, the rendering algorithm divides the X-axis of a chart into ranges of the same length, then selects a data point to display for each range.

  • If a series has multiple values logged in a given range, the average of the y values is displayed. In addition, the shaded area on the chart represents the minimum and maximum values for that range.
  • If a series doesn't have values logged in a given range, the displayed data point is interpolated based on the values of the surrounding points.

If the X-axis displays time instead of steps, the rendered time values are used to calculate the average.