Files
gitea-pages/software/CSDataQuick/docs/qml-csdataquick-components-cscartesianplot.html
T
2025-07-08 08:18:09 +02:00

271 lines
15 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- CSCartesianPlot.qml -->
<title>CSCartesianPlot QML Type | CSDataQuick Documentation 1.2</title>
<link rel="stylesheet" type="text/css" href="style/online.css" />
<script type="text/javascript">
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-24645639-4', 'qt.io');
ga('set', 'forceSSL', true);
ga('send', 'pageview');
</script>
</head>
<body>
<div class="header" id="header">
<header id="navbar" class="">
</header>
</div>
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul class="sub-navigation">
<li><a href="../../CSDataQuick.html">Home</a></li>
<li><a href="../docs.html" class="active">Documentation</a></li>
<li><a href="http://github.com/xiaoqiangwang/CSDataQuick/">Code</a></li>
<li><a href="https://github.com/xiaoqiangwang/CSDataQuick/issues/">Bug Reports</a></li>
</ul>
<div id="main_title_bar">
<h1>CSDataQuick Documentation</h1>
<div class="search_bar">
<script>
(function() {
var cx = '001693341472456439948:u9v0snkru3q';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchbox-only resultsUrl="search-results.html"></gcse:searchbox-only>
</div></div>
<ul>
<li><a href="index.html">CSDataQuick Documentation</a></li>
<li><a href="csdataquick-qmlmodules.html">QML Types</a></li>
<li>CSCartesianPlot QML Type</li>
</ul>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="qml-csdataquick-components-cscartesianplot.html#properties">Properties</a></li>
<li class="level1"><a href="qml-csdataquick-components-cscartesianplot.html#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<div class="context">
<h1 class="title">CSCartesianPlot QML Type</h1>
<span class="subtitle"></span>
<!-- $$$CSCartesianPlot-brief -->
<p>Display XY Plot. <a href="qml-csdataquick-components-cscartesianplot.html#details">More...</a></p>
<!-- @@@CSCartesianPlot -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import CSDataQuick.Components 1.0</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-csdataquick-components-baseitem.html">BaseItem</a></p>
</td></tr></table></div><ul>
<li><a href="qml-csdataquick-components-cscartesianplot-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#count-prop">count</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#countSource-prop">countSource</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#eraseMode-prop">eraseMode</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#eraseOldest-prop">eraseOldest</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#eraseSource-prop">eraseSource</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#legendVisible-prop">legendVisible</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#model-prop">model</a></b></b> : var</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#plotStyle-prop">plotStyle</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#title-prop">title</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#triggerSource-prop">triggerSource</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#xLabel-prop">xLabel</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-csdataquick-components-cscartesianplot.html#yLabel-prop">yLabel</a></b></b> : string</li>
</ul>
<!-- $$$CSCartesianPlot-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>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.</p>
<p>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 <a href="csdataquick-cpp.html#csdata">CSData</a> from which to get the x values and another from which to get the y values. These <a href="csdataquick-cpp.html#csdata">CSData</a> can be of array type, such as Waveforms record in EPICS, or they can be of scalar type with only a single value.</p>
<p>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.</p>
<p>In the table Nx is the number of elements in the <a href="csdataquick-cpp.html#csdata">CSData</a> specified for x, and Ny is the number of elements in the <a href="csdataquick-cpp.html#csdata">CSData</a> specified for y. The letter n denotes a number greater than one, and a blank indicates no <a href="csdataquick-cpp.html#csdata">CSData</a> is specified. The axis limits LOPR and HOPR denote the limits obtained from <a href="csdataquick-cpp.html#csdata">CSData</a>. 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.</p>
<div class="table"><table class="generic">
<thead><tr class="qt-style"><th >Nx</th><th >Ny</th><th >Type</th><th >Points</th></tr></thead>
<tr valign="top" class="odd"><td >n</td><td >n</td><td >X Vector, Y Vector</td><td >x(i), y(i)</td></tr>
<tr valign="top" class="even"><td >n</td><td >1</td><td >X Vector, Y Scalar</td><td >x(i), y</td></tr>
<tr valign="top" class="odd"><td >1</td><td >n</td><td >X Scalar, Y Vector</td><td >x, y(i)</td></tr>
<tr valign="top" class="even"><td >n</td><td ></td><td >X Vector</td><td >x(i), i</td></tr>
<tr valign="top" class="odd"><td ></td><td >n</td><td >Y Vector</td><td >i, y(i)</td></tr>
<tr valign="top" class="even"><td >1</td><td >1</td><td >X Scalar, Y Scalar</td><td >x, y</td></tr>
<tr valign="top" class="odd"><td >1</td><td ></td><td >X Scalar</td><td >x, i</td></tr>
<tr valign="top" class="even"><td ></td><td >1</td><td >Y Scalar</td><td >i, y</td></tr>
</table></div>
<p>Mouse interactions include,</p>
<div class="table"><table class="generic">
<tr valign="top" class="odd"><td >Click</td><td >Select the trace for zooming/panning.</td></tr>
<tr valign="top" class="even"><td >Double Click</td><td >Reset the zoom</td></tr>
<tr valign="top" class="odd"><td >Wheel</td><td >Zoom the selected trace's axes. If the mouse hovers over a certain axis, only that axis gets zoomed.</td></tr>
<tr valign="top" class="even"><td >Drag</td><td >Pan view of the selected trace.</td></tr>
</table></div>
<p class="centerAlign"><img src="images/cartesianplot.png" alt="" /></p><!-- @@@CSCartesianPlot -->
<h2>Property Documentation</h2>
<!-- $$$count -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="count-prop">
<td class="tblQmlPropNode"><p>
<a name="count-prop"></a><span class="name">count</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Number of points</p>
</div></div><!-- @@@count -->
<br/>
<!-- $$$countSource -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="countSource-prop">
<td class="tblQmlPropNode"><p>
<a name="countSource-prop"></a><span class="name">countSource</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Source from where to get number of points.</p>
<p>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 <a href="qml-csdataquick-components-cscartesianplot.html#count-prop">count</a> will come from the data source. Otherwise the <a href="qml-csdataquick-components-cscartesianplot.html#count-prop">count</a> is the converted number.</p>
</div></div><!-- @@@countSource -->
<br/>
<!-- $$$eraseMode -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="eraseMode-prop">
<td class="tblQmlPropNode"><p>
<a name="eraseMode-prop"></a><span class="name">eraseMode</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><ul>
<li>0: Erase the plot if the erase-channel <a href="csdataquick-cpp.html#csdata">CSData</a> is not zero.</li>
<li>1: Erase the plot if the erase-channel <a href="csdataquick-cpp.html#csdata">CSData</a> is zero.</li>
</ul>
</div></div><!-- @@@eraseMode -->
<br/>
<!-- $$$eraseOldest -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="eraseOldest-prop">
<td class="tblQmlPropNode"><p>
<a name="eraseOldest-prop"></a><span class="name">eraseOldest</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><ul>
<li>false: Plot n points corresponding to the first n changes of the data, then do not plot any more points.</li>
<li>true: Plot n points corresponding to the last n changes of the data, overwriting previous points.</li>
</ul>
</div></div><!-- @@@eraseOldest -->
<br/>
<!-- $$$eraseSource -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="eraseSource-prop">
<td class="tblQmlPropNode"><p>
<a name="eraseSource-prop"></a><span class="name">eraseSource</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The erase source is a <a href="csdataquick-cpp.html#csdata">CSData</a> object that causes erasing of the plot. If there is an erase source, the plot erases when the <a href="csdataquick-cpp.html#csdata">CSData</a> value turns either zero or non-zero, depending on the <a href="qml-csdataquick-components-cscartesianplot.html#eraseMode-prop">eraseMode</a>.</p>
</div></div><!-- @@@eraseSource -->
<br/>
<!-- $$$legendVisible -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="legendVisible-prop">
<td class="tblQmlPropNode"><p>
<a name="legendVisible-prop"></a><span class="name">legendVisible</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property indicates whether the legend is visible.</p>
</div></div><!-- @@@legendVisible -->
<br/>
<!-- $$$model -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="model-prop">
<td class="tblQmlPropNode"><p>
<a name="model-prop"></a><span class="name">model</span> : <span class="type"><a href="http://doc.qt.io/qt-5/qml-var.html">var</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Trace list model.</p>
<p>The model can be <a href="http://doc.qt.io/qt-5/qml-qtqml-models-listmodel.html">ListModel</a> or JSON object array. In any case, each element contains the following properties,</p>
<ul>
<li>label - trace label</li>
<li>xchannel - data source for x</li>
<li>ychannel - data source for y</li>
<li>color - line color</li>
</ul>
<p><i>Note: Only in the form of JSON object array, it can be used in Qt Quick Designer</i></p>
</div></div><!-- @@@model -->
<br/>
<!-- $$$plotStyle -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="plotStyle-prop">
<td class="tblQmlPropNode"><p>
<a name="plotStyle-prop"></a><span class="name">plotStyle</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><ul>
<li>0: Plot the data as points.</li>
<li>1: Plot the data as lines.</li>
<li>2: Plot the data as lines which are filled under (or over) from the line to the axis.</li>
</ul>
</div></div><!-- @@@plotStyle -->
<br/>
<!-- $$$title -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="title-prop">
<td class="tblQmlPropNode"><p>
<a name="title-prop"></a><span class="name">title</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the graph title</p>
</div></div><!-- @@@title -->
<br/>
<!-- $$$triggerSource -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="triggerSource-prop">
<td class="tblQmlPropNode"><p>
<a name="triggerSource-prop"></a><span class="name">triggerSource</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Source of the trigger. If configured, whenever the value of the trigger data changes, the entire plot will be updated.</p>
</div></div><!-- @@@triggerSource -->
<br/>
<!-- $$$xLabel -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="xLabel-prop">
<td class="tblQmlPropNode"><p>
<a name="xLabel-prop"></a><span class="name">xLabel</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the X axis label</p>
</div></div><!-- @@@xLabel -->
<br/>
<!-- $$$yLabel -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="yLabel-prop">
<td class="tblQmlPropNode"><p>
<a name="yLabel-prop"></a><span class="name">yLabel</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the Y axis label</p>
</div></div><!-- @@@yLabel -->
<br/>
</div>
</div>
</div>
</div>
</div>
<div class="footer">Copyright (C) 2012-2021 Xiaoqiang Wang, Paul Scherrer Institute.</div>
</body>
</html>