<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- declarativeboxplotseries.cpp --> <title>BoxPlotSeries QML Type | Qt Charts 5.11</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td ><a href="../qtdoc/index.html">Qt 5.11</a></td><td ><a href="qtcharts-index.html">Qt Charts</a></td><td ><a href="qtcharts-qmlmodule.html">QML Types</a></td><td >BoxPlotSeries QML Type</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.11.2 Reference Documentation</td> </tr></table> </div> </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="#properties">Properties</a></li> <li class="level1"><a href="#signals">Signals</a></li> <li class="level1"><a href="#methods">Methods</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">BoxPlotSeries QML Type</h1> <span class="subtitle"></span> <!-- $$$BoxPlotSeries-brief --> <p>Presents data in box-and-whiskers charts. <a href="#details">More...</a></p> <!-- @@@BoxPlotSeries --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtCharts 2.2</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qml-qtcharts-boxplotseries.html"><a href="qboxplotseries.html">QBoxPlotSeries</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtcharts-abstractseries.html">AbstractSeries</a></p> </td></tr></table></div><ul> <li><a href="qml-qtcharts-boxplotseries-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-qtcharts-boxplotseries.html#axisX-prop">axisX</a></b></b> : AbstractAxis</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#axisXTop-prop">axisXTop</a></b></b> : AbstractAxis</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#axisY-prop">axisY</a></b></b> : AbstractAxis</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#axisYRight-prop">axisYRight</a></b></b> : AbstractAxis</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#boxOutlineVisible-prop">boxOutlineVisible</a></b></b> : bool</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#boxWidth-prop">boxWidth</a></b></b> : real</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#brushFilename-prop">brushFilename</a></b></b> : string</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#count-prop">count</a></b></b> : int</li> </ul> <a name="signals"></a> <h2 id="signals">Signals</h2> <ul> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#boxsetsAdded-signal">boxsetsAdded</a></b></b>(list <i>sets</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#boxsetsRemoved-signal">boxsetsRemoved</a></b></b>(list <i>sets</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#clicked-signal">clicked</a></b></b>(BoxSet <i>boxset</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#doubleClicked-signal">doubleClicked</a></b></b>(BoxSet <i>boxset</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#hovered-signal">hovered</a></b></b>(bool <i>status</i>, BoxSet <i>boxset</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#pressed-signal">pressed</a></b></b>(BoxSet <i>boxset</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#released-signal">released</a></b></b>(BoxSet <i>boxset</i>)</li> </ul> <a name="methods"></a> <h2 id="methods">Methods</h2> <ul> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#append-method-1">append</a></b></b>(BoxSet <i>box</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#append-method">append</a></b></b>(string <i>label</i>, VariantList <i>values</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#at-method">at</a></b></b>(int <i>index</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#clear-method">clear</a></b></b>()</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#insert-method">insert</a></b></b>(int <i>index</i>, string <i>label</i>, VariantList <i>values</i>)</li> <li class="fn"><b><b><a href="qml-qtcharts-boxplotseries.html#remove-method">remove</a></b></b>(QBoxSet <i>boxset</i>)</li> </ul> <!-- $$$BoxPlotSeries-description --> <a name="details"></a> <h2 id="details">Detailed Description</h2> <p>A box plot series acts as a container for box-and-whiskers items. Items from multiple series are grouped into categories according to their index value.</p> <p>The <a href="qml-qtcharts-barcategoryaxis.html">BarCategoryAxis</a> class is used to add the categories to the chart's axis. Category labels have to be unique. If the same category label is defined for several box-and-whiskers items, only the first one is drawn.</p> <p>The following QML code snippet shows how to create a simple box-and-whiskers chart:</p> <pre class="cpp"> import <span class="type">QtQuick</span> <span class="number">2.0</span> import <span class="type">QtCharts</span> <span class="number">2.0</span> ChartView { title: <span class="string">"Box Plot series"</span> width: <span class="number">400</span> height: <span class="number">300</span> theme: ChartView<span class="operator">.</span>ChartThemeBrownSand legend<span class="operator">.</span>alignment: <span class="type"><a href="../qtqml/qml-qtqml-qt.html">Qt</a></span><span class="operator">.</span>AlignBottom BoxPlotSeries { id: plotSeries name: <span class="string">"Income"</span> BoxSet { label: <span class="string">"Jan"</span>; values: <span class="operator">[</span><span class="number">3</span><span class="operator">,</span> <span class="number">4</span><span class="operator">,</span> <span class="number">5.1</span><span class="operator">,</span> <span class="number">6.2</span><span class="operator">,</span> <span class="number">8.5</span><span class="operator">]</span> } BoxSet { label: <span class="string">"Feb"</span>; values: <span class="operator">[</span><span class="number">5</span><span class="operator">,</span> <span class="number">6</span><span class="operator">,</span> <span class="number">7.5</span><span class="operator">,</span> <span class="number">8.6</span><span class="operator">,</span> <span class="number">11.8</span><span class="operator">]</span> } BoxSet { label: <span class="string">"Mar"</span>; values: <span class="operator">[</span><span class="number">3.2</span><span class="operator">,</span> <span class="number">5</span><span class="operator">,</span> <span class="number">5.7</span><span class="operator">,</span> <span class="number">8</span><span class="operator">,</span> <span class="number">9.2</span><span class="operator">]</span> } BoxSet { label: <span class="string">"Apr"</span>; values: <span class="operator">[</span><span class="number">3.8</span><span class="operator">,</span> <span class="number">5</span><span class="operator">,</span> <span class="number">6.4</span><span class="operator">,</span> <span class="number">7</span><span class="operator">,</span> <span class="number">8</span><span class="operator">]</span> } BoxSet { label: <span class="string">"May"</span>; values: <span class="operator">[</span><span class="number">4</span><span class="operator">,</span> <span class="number">5</span><span class="operator">,</span> <span class="number">5.2</span><span class="operator">,</span> <span class="number">6</span><span class="operator">,</span> <span class="number">7</span><span class="operator">]</span> } } } </pre> <div style="float: left; margin-right: 2em"><p class="centerAlign"><img src="images/examples_qmlboxplot.png" alt="" /></p></div><br style="clear: both" /><p><b>See also </b><a href="qml-qtcharts-boxset.html">BoxSet</a> and <a href="qml-qtcharts-barcategoryaxis.html">BarCategoryAxis</a>.</p> <!-- @@@BoxPlotSeries --> <h2>Property Documentation</h2> <!-- $$$axisX --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="axisX-prop"> <td class="tblQmlPropNode"><p> <a name="axisX-prop"></a><span class="name">axisX</span> : <span class="type"><a href="qml-qtcharts-abstractaxis.html">AbstractAxis</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The x-axis used for the series. If you leave both axisX and <a href="qml-qtcharts-boxplotseries.html#axisXTop-prop">axisXTop</a> undefined, a <a href="qml-qtcharts-barcategoryaxis.html">BarCategoryAxis</a> is created for the series.</p> <p><b>See also </b><a href="qml-qtcharts-boxplotseries.html#axisXTop-prop">axisXTop</a>.</p> </div></div><!-- @@@axisX --> <br/> <!-- $$$axisXTop --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="axisXTop-prop"> <td class="tblQmlPropNode"><p> <a name="axisXTop-prop"></a><span class="name">axisXTop</span> : <span class="type"><a href="qml-qtcharts-abstractaxis.html">AbstractAxis</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The x-axis used for the series, drawn on top of the chart view.</p> <p><b>Note: </b>You can only provide either <a href="qml-qtcharts-boxplotseries.html#axisX-prop">axisX</a> or axisXTop, but not both.</p><p><b>See also </b><a href="qml-qtcharts-boxplotseries.html#axisX-prop">axisX</a> and <a href="qml-qtcharts-boxplotseries.html#axisX-prop">axisX</a>.</p> </div></div><!-- @@@axisXTop --> <br/> <!-- $$$axisY --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="axisY-prop"> <td class="tblQmlPropNode"><p> <a name="axisY-prop"></a><span class="name">axisY</span> : <span class="type"><a href="qml-qtcharts-abstractaxis.html">AbstractAxis</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The y-axis used for the series. If you leave both axisY and <a href="qml-qtcharts-boxplotseries.html#axisYRight-prop">axisYRight</a> undefined, a <a href="qml-qtcharts-valueaxis.html">ValueAxis</a> is created for the series.</p> <p><b>See also </b><a href="qml-qtcharts-boxplotseries.html#axisYRight-prop">axisYRight</a>.</p> </div></div><!-- @@@axisY --> <br/> <!-- $$$axisYRight --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="axisYRight-prop"> <td class="tblQmlPropNode"><p> <a name="axisYRight-prop"></a><span class="name">axisYRight</span> : <span class="type"><a href="qml-qtcharts-abstractaxis.html">AbstractAxis</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The y-axis used for the series, drawn to the right on the chart view.</p> <p><b>Note: </b>You can only provide either <a href="qml-qtcharts-boxplotseries.html#axisY-prop">axisY</a> or axisYRight, but not both.</p><p><b>See also </b><a href="qml-qtcharts-boxplotseries.html#axisY-prop">axisY</a>.</p> </div></div><!-- @@@axisYRight --> <br/> <!-- $$$boxOutlineVisible --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="boxOutlineVisible-prop"> <td class="tblQmlPropNode"><p> <a name="boxOutlineVisible-prop"></a><span class="name">boxOutlineVisible</span> : <span class="type"><a href="../qtqml/qml-bool.html">bool</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The visibility of the box outline.</p> </div></div><!-- @@@boxOutlineVisible --> <br/> <!-- $$$boxWidth --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="boxWidth-prop"> <td class="tblQmlPropNode"><p> <a name="boxWidth-prop"></a><span class="name">boxWidth</span> : <span class="type"><a href="../qtqml/qml-real.html">real</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The width of the box-and-whiskers item. The value indicates the relative width of the item within its category. The value can be between 0.0 and 1.0. Negative values are replaced with 0.0 and values greater than 1.0 are replaced with 1.0.</p> </div></div><!-- @@@boxWidth --> <br/> <!-- $$$brushFilename --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="brushFilename-prop"> <td class="tblQmlPropNode"><p> <a name="brushFilename-prop"></a><span class="name">brushFilename</span> : <span class="type"><a href="../qtqml/qml-string.html">string</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The name of the file used as a brush for the series.</p> </div></div><!-- @@@brushFilename --> <br/> <!-- $$$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"><a href="../qtqml/qml-int.html">int</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The number of box-and-whiskers items in a box plot series.</p> </div></div><!-- @@@count --> <br/> <h2>Signal Documentation</h2> <!-- $$$boxsetsAdded --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="boxsetsAdded-signal"> <td class="tblQmlFuncNode"><p> <a name="boxsetsAdded-signal"></a><span class="name">boxsetsAdded</span>(<span class="type"><a href="../qtqml/qml-list.html">list</a></span> <i>sets</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when the box-and-whiskers items specified by <i>sets</i> are added to the series.</p> <p>The corresponding signal handler is <code>onBoxsetsAdded()</code>.</p> </div></div><!-- @@@boxsetsAdded --> <br/> <!-- $$$boxsetsRemoved --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="boxsetsRemoved-signal"> <td class="tblQmlFuncNode"><p> <a name="boxsetsRemoved-signal"></a><span class="name">boxsetsRemoved</span>(<span class="type"><a href="../qtqml/qml-list.html">list</a></span> <i>sets</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when the box-and-whiskers items specified by <i>sets</i> are removed from the series.</p> <p>The corresponding signal handler is <code>onBoxsetsRemoved()</code>.</p> </div></div><!-- @@@boxsetsRemoved --> <br/> <!-- $$$clicked --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="clicked-signal"> <td class="tblQmlFuncNode"><p> <a name="clicked-signal"></a><span class="name">clicked</span>(<span class="type"><a href="qml-qtcharts-boxset.html">BoxSet</a></span> <i>boxset</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when the user clicks the box-and-whiskers item specified by <i>boxset</i> in the chart.</p> <p>The corresponding signal handler is <code>onClicked()</code>.</p> </div></div><!-- @@@clicked --> <br/> <!-- $$$doubleClicked --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="doubleClicked-signal"> <td class="tblQmlFuncNode"><p> <a name="doubleClicked-signal"></a><span class="name">doubleClicked</span>(<span class="type"><a href="qml-qtcharts-boxset.html">BoxSet</a></span> <i>boxset</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when the user double-clicks the box-and-whiskers item specified by <i>boxset</i> in the chart.</p> <p>The corresponding signal handler is <code>onDoubleClicked()</code>.</p> </div></div><!-- @@@doubleClicked --> <br/> <!-- $$$hovered --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="hovered-signal"> <td class="tblQmlFuncNode"><p> <a name="hovered-signal"></a><span class="name">hovered</span>(<span class="type"><a href="../qtqml/qml-bool.html">bool</a></span> <i>status</i>, <span class="type"><a href="qml-qtcharts-boxset.html">BoxSet</a></span> <i>boxset</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when a mouse is hovered over the box-and-whiskers item specified by <i>boxset</i> in the chart. When the mouse moves over the item, <i>status</i> turns <code>true</code>, and when the mouse moves away again, it turns <code>false</code>.</p> <p>The corresponding signal handler is <code>onHovered()</code>.</p> </div></div><!-- @@@hovered --> <br/> <!-- $$$pressed --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="pressed-signal"> <td class="tblQmlFuncNode"><p> <a name="pressed-signal"></a><span class="name">pressed</span>(<span class="type"><a href="qml-qtcharts-boxset.html">BoxSet</a></span> <i>boxset</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when the user presses the <i>boxset</i> on the chart.</p> <p>The corresponding signal handler is <code>onPressed</code>.</p> </div></div><!-- @@@pressed --> <br/> <!-- $$$released --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="released-signal"> <td class="tblQmlFuncNode"><p> <a name="released-signal"></a><span class="name">released</span>(<span class="type"><a href="qml-qtcharts-boxset.html">BoxSet</a></span> <i>boxset</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when the user releases the mouse press on the box-and-whiskers item specified by <i>boxset</i> in the chart.</p> <p>The corresponding signal handler is <code>onReleased()</code>.</p> </div></div><!-- @@@released --> <br/> <h2>Method Documentation</h2> <!-- $$$append --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="append-method-1"> <td class="tblQmlFuncNode"><p> <a name="append-method-1"></a><span class="name">append</span>(<span class="type"><a href="qml-qtcharts-boxset.html">BoxSet</a></span> <i>box</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Appends the box-and-whiskers item specified by <i>box</i> to the series.</p> </div></div><!-- @@@append --> <br/> <!-- $$$append --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="append-method"> <td class="tblQmlFuncNode"><p> <a name="append-method"></a><span class="name">append</span>(<span class="type"><a href="../qtqml/qml-string.html">string</a></span> <i>label</i>, <span class="type">VariantList</span> <i>values</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Appends a new box-and-whiskers item with the label specified by <i>label</i> and the values specified by <i>values</i> to the series.</p> </div></div><!-- @@@append --> <br/> <!-- $$$at --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="at-method"> <td class="tblQmlFuncNode"><p> <a name="at-method"></a><span class="name">at</span>(<span class="type"><a href="../qtqml/qml-int.html">int</a></span> <i>index</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Returns the box-and-whiskers item in the position specified by <i>index</i>.</p> </div></div><!-- @@@at --> <br/> <!-- $$$clear --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="clear-method"> <td class="tblQmlFuncNode"><p> <a name="clear-method"></a><span class="name">clear</span>()</p></td></tr> </table></div> </div><div class="qmldoc"><p>Removes all box-and-whiskers items from the series and permanently deletes them.</p> </div></div><!-- @@@clear --> <br/> <!-- $$$insert --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="insert-method"> <td class="tblQmlFuncNode"><p> <a name="insert-method"></a><span class="name">insert</span>(<span class="type"><a href="../qtqml/qml-int.html">int</a></span> <i>index</i>, <span class="type"><a href="../qtqml/qml-string.html">string</a></span> <i>label</i>, <span class="type">VariantList</span> <i>values</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Inserts a new box-and-whiskers item with the label specified by <i>label</i> and the values specified by <i>values</i> to the series at the position specified by <i>index</i>.</p> </div></div><!-- @@@insert --> <br/> <!-- $$$remove --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="remove-method"> <td class="tblQmlFuncNode"><p> <a name="remove-method"></a><span class="name">remove</span>(<span class="type">QBoxSet</span> <i>boxset</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Removes the box-and-whiskers item specified by <i>boxset</i> from the series.</p> </div></div><!-- @@@remove --> <br/> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>