Time charts

A time chart plots channels against their time: waveform time, a time channel, or the row index.

A chart of a test bench: a pressure at 1 kHz

Open a chart

Each chart is an editor tab:

  • Open chart in a group tab;

  • the chart icon in the editor title bar of the viewer;

  • Measurement Data: Open Chart in the Command Palette.

Place it beside or below the viewer, or in a floating window, and open as many as you need. VS Code reopens them after a restart.

Choose the channels

The list on the left shows each group by time base:

Waveform time

Channels with the wf_start_time and wf_increment properties of TDMS, or the WAVEFORM_T0 and WAVEFORM_DT attributes of h5labview2.

A time channel

A timestamp channel, or a channel named as a time, and the channels measured with it. In HDF5 files, CF times and dimension scales are time channels too; see Conventions. Several acquisition rates in one group are recognized: in the demonstration file, a pressure at 1 kHz with Time_P, two temperatures at 2 Hz with Time_T.

Row index

Channels without time.

Tick the channels: the X axis follows. Select all and Deselect all act on every channel of the list, or on those that match the filter above it. Channels in the toolbar hides the list.

The menu of the X of a time base

The X of each time base is a menu: another time channel, any other channel of the same length, or the row index, for all the channels of the time base at once. The menu of a channel changes its own.

Channels of several groups are plotted on one time axis, shown as dates and times or as seconds since the start, to the nanosecond.

Time series only

The X values of a curve never go back. A curve whose X values go back, or are missing, is refused with the row where they do. To plot a channel against another one, use an XY chart.

Plots

  • One plot per unit, or all units in one plot: the list in the toolbar.

  • Digital channels are drawn as steps, in strips of 0 and 1: Boolean channels, and integer channels whose values are all 0 or 1, such as the Booleans that LabVIEW writes as U8 and the digital lines of DAQmx.

  • Peaks are never lost, whatever the zoom level: for each pixel column, the chart draws the minimum and maximum of the samples it covers.

A position
Gesture Action

Mouse wheel

Zoom in time around the pointer.

Ctrl + wheel

Zoom a plot in Y.

Drag

Pan.

Double click

Show everything.

+, -, 0

Zoom in, zoom out, show everything.

←, →

Pan; with the measurement cursors shown, Shift + ← and Shift + →.

The help on the navigation shows while the mouse rests on the plots. The legend shows the value of each curve under the pointer.

Measurement cursors

Cursors C1/C2 in the toolbar shows two measurement cursors. The table under the plots gives, for each curve:

  • its values at C1 and C2, and their difference;

  • the difference of X, and 1/ΔX;

  • the minimum, maximum and mean between the cursors, also marked on the curves: triangles at the minimum and maximum, a dotted line at the mean. The setting measurementDataViewer.cursorStatistics turns these marks off.

Move the cursors:

  • click in the plots to move the active one;

  • drag C1 or C2;

  • ← and → move the active cursor by one sample, 1 and 2 choose it.

The cursors are linked with the grid of values: see Linked with the charts.

Images

Image in the toolbar saves the chart as an SVG or PNG image, next to the file by default: the plots, their legends and axes, and the measurement cursors with their table when they are shown.

  • The images have the colours of VS Code by default, as the chart looks on the screen.

  • The setting measurementDataViewer.imageTheme makes them light, for documents and reports, or dark, whatever the theme of VS Code.

  • PNG images are twice the size of the chart on the screen.

The same chart in the dark theme of VS Code

Large channels

A curve of more than 4 million samples is drawn from an overview that the extension computes once, in the background: a few seconds for 357 million samples, its progress shown in the chart. The chart then shows it at any zoom at once, and refines the details; it says Refining a curve… (or Refining 2 curves…, and so on) while they are on their way. The values under the cursors and the statistics between them stay exact.