<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qbarcategoryaxis.cpp --> <title>BarCategoryAxis QML Type | Qt Charts 5.9</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 >Qt 5.9</td><td ><a href="qtcharts-index.html">Qt Charts</a></td><td ><a href="qtcharts-qmlmodule.html">QML Types</a></td><td >BarCategoryAxis QML Type</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 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">BarCategoryAxis QML Type</h1> <span class="subtitle"></span> <!-- $$$BarCategoryAxis-brief --> <p>Adds categories to a chart's axes. <a href="#details">More...</a></p> <!-- @@@BarCategoryAxis --> <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-barcategoryaxis.html"><a href="qbarcategoryaxis.html">QBarCategoryAxis</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtcharts-abstractaxis.html">AbstractAxis</a></p> </td></tr></table></div><ul> <li><a href="qml-qtcharts-barcategoryaxis-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-barcategoryaxis.html#categories-prop">categories</a></b></b> : QStringList</li> <li class="fn"><b><b><a href="qml-qtcharts-barcategoryaxis.html#count-prop">count</a></b></b> : int</li> <li class="fn"><b><b><a href="qml-qtcharts-barcategoryaxis.html#max-prop">max</a></b></b> : string</li> <li class="fn"><b><b><a href="qml-qtcharts-barcategoryaxis.html#min-prop">min</a></b></b> : string</li> </ul> <a name="signals"></a> <h2 id="signals">Signals</h2> <ul> <li class="fn"><b><b><a href="qml-qtcharts-barcategoryaxis.html#rangeChanged-signal">rangeChanged</a></b></b>(string <i>min</i>, string <i>max</i>)</li> </ul> <a name="methods"></a> <h2 id="methods">Methods</h2> <ul> <li class="fn">void <b><b><a href="qml-qtcharts-barcategoryaxis.html#clear-method">clear</a></b></b>()</li> </ul> <!-- $$$BarCategoryAxis-description --> <a name="details"></a> <h2 id="details">Detailed Description</h2> <p>The <a href="qml-qtcharts-barcategoryaxis.html">BarCategoryAxis</a> type can be set up to show an axis line with tick marks, grid lines, and shades. Categories are drawn between the ticks. It can be used also with a line series.</p> <p>The following QML snippet illustrates how to use <a href="qml-qtcharts-barcategoryaxis.html">BarCategoryAxis</a>:</p> <pre class="cpp"> ChartView { BarCategoryAxis { id: categoryAxis categories: <span class="operator">[</span><span class="string">"Jan"</span><span class="operator">,</span> <span class="string">"Feb"</span><span class="operator">,</span> <span class="string">"Mar"</span><span class="operator">,</span> <span class="string">"Apr"</span><span class="operator">,</span> <span class="string">"May"</span><span class="operator">,</span> <span class="string">"Jun"</span> <span class="operator">]</span> } <span class="comment">// Add a few series...</span> } </pre> <!-- @@@BarCategoryAxis --> <h2>Property Documentation</h2> <!-- $$$categories --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="categories-prop"> <td class="tblQmlPropNode"><p> <a name="categories-prop"></a><span class="name">categories</span> : <span class="type">QStringList</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The categories of an axis.</p> </div></div><!-- @@@categories --> <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">int</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The number of categories of an axis.</p> </div></div><!-- @@@count --> <br/> <!-- $$$max --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="max-prop"> <td class="tblQmlPropNode"><p> <a name="max-prop"></a><span class="name">max</span> : <span class="type">string</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The maximum value on the axis.</p> </div></div><!-- @@@max --> <br/> <!-- $$$min --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="min-prop"> <td class="tblQmlPropNode"><p> <a name="min-prop"></a><span class="name">min</span> : <span class="type">string</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The minimum value on the axis.</p> </div></div><!-- @@@min --> <br/> <h2>Signal Documentation</h2> <!-- $$$rangeChanged --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="rangeChanged-signal"> <td class="tblQmlFuncNode"><p> <a name="rangeChanged-signal"></a><span class="name">rangeChanged</span>(<span class="type">string</span> <i>min</i>, <span class="type">string</span> <i>max</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when <i>min</i> or <i>max</i> value of the axis changes.</p> <p>The corresponding signal handler is <code>onRangeChanged</code>.</p> </div></div><!-- @@@rangeChanged --> <br/> <h2>Method Documentation</h2> <!-- $$$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="type">void</span> <span class="name">clear</span>()</p></td></tr> </table></div> </div><div class="qmldoc"><p>Removes all categories. Sets the maximum and minimum values of the axis range to QString::null.</p> </div></div><!-- @@@clear --> <br/> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 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>