@@ -37,14 +37,20 QT_CHARTS_BEGIN_NAMESPACE | |||||
37 | \inmodule Qt Charts |
|
37 | \inmodule Qt Charts | |
38 | \brief Series for creating box-and-whiskers chart. |
|
38 | \brief Series for creating box-and-whiskers chart. | |
39 |
|
39 | |||
40 |
QBoxPlotSeries represents a series of data shown as box-and-whisker bars. The purpose of this |
|
40 | QBoxPlotSeries represents a series of data shown as box-and-whisker bars. The purpose of this | |
41 |
a container for single box-and-whisker items. Each item is drawn to own slot. |
|
41 | class is to act as a container for single box-and-whisker items. Each item is drawn to own slot. | |
42 |
QBoxPlotSeries then box-and-whiskers items with the same |
|
42 | If chart includes multiple instances of QBoxPlotSeries then box-and-whiskers items with the same | |
|
43 | index are drawn to same slot. | |||
43 |
|
44 | |||
44 | See the \l {Box and Whiskers Example} {box-and-whiskers chart example} to learn how to create a box-and-whiskers chart. |
|
45 | \note The slot, each item in QBoxPlotSeries is drawn, represents a category in QBarCategoryAxis. | |
|
46 | The category labels have to be unique. If same category label is defined for several | |||
|
47 | box-and-whisker items only the first one is drawn. | |||
|
48 | ||||
|
49 | See the \l {Box and Whiskers Example} {box-and-whiskers chart example} to learn how to create a | |||
|
50 | box-and-whiskers chart. | |||
45 | \image examples_boxplotchart.png |
|
51 | \image examples_boxplotchart.png | |
46 |
|
52 | |||
47 | \sa QBoxSet |
|
53 | \sa QBoxSet, QBarCategoryAxis | |
48 | */ |
|
54 | */ | |
49 | /*! |
|
55 | /*! | |
50 | \fn QBoxPlotSeries::boxsetsAdded(QList<QBoxSet *> sets) |
|
56 | \fn QBoxPlotSeries::boxsetsAdded(QList<QBoxSet *> sets) |
@@ -162,7 +162,7 void QBoxSet::append(const QList<qreal> &values) | |||||
162 | } |
|
162 | } | |
163 |
|
163 | |||
164 | /*! |
|
164 | /*! | |
165 | Sets new \a label for set. |
|
165 | Sets new \a label for the category of the set. | |
166 | */ |
|
166 | */ | |
167 | void QBoxSet::setLabel(const QString label) |
|
167 | void QBoxSet::setLabel(const QString label) | |
168 | { |
|
168 | { | |
@@ -170,7 +170,7 void QBoxSet::setLabel(const QString label) | |||||
170 | } |
|
170 | } | |
171 |
|
171 | |||
172 | /*! |
|
172 | /*! | |
173 | Returns label of the set. |
|
173 | Returns the label of the the category of the set. | |
174 | */ |
|
174 | */ | |
175 | QString QBoxSet::label() const |
|
175 | QString QBoxSet::label() const | |
176 | { |
|
176 | { |
@@ -43,7 +43,7 QT_CHARTS_BEGIN_NAMESPACE | |||||
43 | */ |
|
43 | */ | |
44 | /*! |
|
44 | /*! | |
45 | \qmlproperty string BoxSet::label |
|
45 | \qmlproperty string BoxSet::label | |
46 | Defines the label of the box-and-whiskers set. |
|
46 | Defines the label of the category of the box-and-whiskers set. | |
47 | */ |
|
47 | */ | |
48 | /*! |
|
48 | /*! | |
49 | \qmlproperty int BoxSet::count |
|
49 | \qmlproperty int BoxSet::count | |
@@ -122,6 +122,10 QT_CHARTS_BEGIN_NAMESPACE | |||||
122 | slot. If chart includes multiple instances of BoxPlotSeries then box-and-whiskers items with the |
|
122 | slot. If chart includes multiple instances of BoxPlotSeries then box-and-whiskers items with the | |
123 | same index are drawn to same slot. |
|
123 | same index are drawn to same slot. | |
124 |
|
124 | |||
|
125 | \note The slot, each item in BoxPlotSeries is drawn, represents a category in BarCategoryAxis. | |||
|
126 | The category labels have to be unique. If same category label is defined for several | |||
|
127 | box-and-whisker items only the first one is drawn. | |||
|
128 | ||||
125 | The following QML shows how to create a simple box-and-whiskers chart: |
|
129 | The following QML shows how to create a simple box-and-whiskers chart: | |
126 | \code |
|
130 | \code | |
127 | import QtQuick 2.0 |
|
131 | import QtQuick 2.0 | |
@@ -150,6 +154,8 QT_CHARTS_BEGIN_NAMESPACE | |||||
150 | \image examples_qmlboxplot.png |
|
154 | \image examples_qmlboxplot.png | |
151 | \endfloat |
|
155 | \endfloat | |
152 | \clearfloat |
|
156 | \clearfloat | |
|
157 | ||||
|
158 | \sa BoxSet, BarCategoryAxis | |||
153 | */ |
|
159 | */ | |
154 |
|
160 | |||
155 | /*! |
|
161 | /*! |
General Comments 0
You need to be logged in to leave comments.
Login now