CSCartesianPlot QML Type

Display XY Plot. More...

Import Statement: import CSDataQuick.Components 1.0
Inherits:

BaseItem

Properties

Detailed Description

A Cartesian Plot consists of an X and one or two Y axes on which data can be plotted. The sets of data are called traces and consist of a set of (x, y) pairs, a color, and a Y axis indicator. The traces correspond to curves on the plot.

Currently there can be up to eight traces on a plot. The first trace is plotted on the Y1 axis, and the remaining traces (if any) are all plotted on the Y2 axis. But the Y axis, Y or Y2, can be selected for each trace. The X and Y1 axes may have a label, but the Y2 axis does not. Each trace can (but does not have to) have a CSData from which to get the x values and another from which to get the y values. These CSData can be of array type, such as Waveforms record in EPICS, or they can be of scalar type with only a single value.

There are eight possible kinds of traces as seen in the following table. The traces for a given plot do not all have to be of the same kind – they can be mixed.

In the table Nx is the number of elements in the CSData specified for x, and Ny is the number of elements in the CSData specified for y. The letter n denotes a number greater than one, and a blank indicates no CSData is specified. The axis limits LOPR and HOPR denote the limits obtained from CSData. Typically, these are the fields LOPR and HOPR in the associated record. Count is the specified Count for the Cartesian Plot, which is described in more detail below.

NxNyTypePoints
nnX Vector, Y Vectorx(i), y(i)
n1X Vector, Y Scalarx(i), y
1nX Scalar, Y Vectorx, y(i)
nX Vectorx(i), i
nY Vectori, y(i)
11X Scalar, Y Scalarx, y
1X Scalarx, i
1Y Scalari, y

Mouse interactions include,

ClickSelect the trace for zooming/panning.
Double ClickReset the zoom
WheelZoom the selected trace's axes. If the mouse hovers over a certain axis, only that axis gets zoomed.
DragPan view of the selected trace.

Property Documentation

count : int

Number of points


countSource : string

Source from where to get number of points.

This may be an integer or the data source. If the value is of non-number form, then it is considered to be a data source, and the value of count will come from the data source. Otherwise the count is the converted number.


eraseMode : int

  • 0: Erase the plot if the erase-channel CSData is not zero.
  • 1: Erase the plot if the erase-channel CSData is zero.

eraseOldest : bool

  • false: Plot n points corresponding to the first n changes of the data, then do not plot any more points.
  • true: Plot n points corresponding to the last n changes of the data, overwriting previous points.

eraseSource : string

The erase source is a CSData object that causes erasing of the plot. If there is an erase source, the plot erases when the CSData value turns either zero or non-zero, depending on the eraseMode.


legendVisible : bool

This property indicates whether the legend is visible.


model : var

Trace list model.

The model can be ListModel or JSON object array. In any case, each element contains the following properties,

  • label - trace label
  • xchannel - data source for x
  • ychannel - data source for y
  • color - line color

Note: Only in the form of JSON object array, it can be used in Qt Quick Designer


plotStyle : int

  • 0: Plot the data as points.
  • 1: Plot the data as lines.
  • 2: Plot the data as lines which are filled under (or over) from the line to the axis.

title : string

This property holds the graph title


triggerSource : string

Source of the trigger. If configured, whenever the value of the trigger data changes, the entire plot will be updated.


xLabel : string

This property holds the X axis label


yLabel : string

This property holds the Y axis label