summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTitta Heikkala <titta.heikkala@theqtcompany.com>2015-09-17 10:19:59 +0300
committerTitta Heikkala <titta.heikkala@theqtcompany.com>2015-09-17 07:56:03 +0000
commit2c2bde37df65e5ff7b71705c1a056af342551a0a (patch)
tree44830bcdd5ba0d16d68810dc9073ddc5710c11af
parenta137e485781a4595b3b30068e71ea905181f2790 (diff)
Clarified box-and-whiskers chart documentation
The documentation now explains that the label is the category of QBarCategoryAxis that is used for slots in box-and-whiskers chart. Change-Id: I6a16a0f02f49790ab923c1a4432dc308d8246fc2 Task-number: QTRD-3697 Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
-rw-r--r--src/charts/boxplotchart/qboxplotseries.cpp16
-rw-r--r--src/charts/boxplotchart/qboxset.cpp4
-rw-r--r--src/chartsqml2/declarativeboxplotseries.cpp8
3 files changed, 20 insertions, 8 deletions
diff --git a/src/charts/boxplotchart/qboxplotseries.cpp b/src/charts/boxplotchart/qboxplotseries.cpp
index 5e67130a..e8a3fa7e 100644
--- a/src/charts/boxplotchart/qboxplotseries.cpp
+++ b/src/charts/boxplotchart/qboxplotseries.cpp
@@ -37,14 +37,20 @@ QT_CHARTS_BEGIN_NAMESPACE
\inmodule Qt Charts
\brief Series for creating box-and-whiskers chart.
- QBoxPlotSeries represents a series of data shown as box-and-whisker bars. The purpose of this class is to act as
- a container for single box-and-whisker items. Each item is drawn to own slot. If chart includes multiple instances of
- QBoxPlotSeries then box-and-whiskers items with the same index are drawn to same slot.
+ QBoxPlotSeries represents a series of data shown as box-and-whisker bars. The purpose of this
+ class is to act as a container for single box-and-whisker items. Each item is drawn to own slot.
+ If chart includes multiple instances of QBoxPlotSeries then box-and-whiskers items with the same
+ index are drawn to same slot.
- See the \l {Box and Whiskers Example} {box-and-whiskers chart example} to learn how to create a box-and-whiskers chart.
+ \note The slot, each item in QBoxPlotSeries is drawn, represents a category in QBarCategoryAxis.
+ The category labels have to be unique. If same category label is defined for several
+ box-and-whisker items only the first one is drawn.
+
+ See the \l {Box and Whiskers Example} {box-and-whiskers chart example} to learn how to create a
+ box-and-whiskers chart.
\image examples_boxplotchart.png
- \sa QBoxSet
+ \sa QBoxSet, QBarCategoryAxis
*/
/*!
\fn QBoxPlotSeries::boxsetsAdded(QList<QBoxSet *> sets)
diff --git a/src/charts/boxplotchart/qboxset.cpp b/src/charts/boxplotchart/qboxset.cpp
index 9b1ad08f..a9e79887 100644
--- a/src/charts/boxplotchart/qboxset.cpp
+++ b/src/charts/boxplotchart/qboxset.cpp
@@ -162,7 +162,7 @@ void QBoxSet::append(const QList<qreal> &values)
}
/*!
- Sets new \a label for set.
+ Sets new \a label for the category of the set.
*/
void QBoxSet::setLabel(const QString label)
{
@@ -170,7 +170,7 @@ void QBoxSet::setLabel(const QString label)
}
/*!
- Returns label of the set.
+ Returns the label of the the category of the set.
*/
QString QBoxSet::label() const
{
diff --git a/src/chartsqml2/declarativeboxplotseries.cpp b/src/chartsqml2/declarativeboxplotseries.cpp
index 63f5384a..c5835a3b 100644
--- a/src/chartsqml2/declarativeboxplotseries.cpp
+++ b/src/chartsqml2/declarativeboxplotseries.cpp
@@ -43,7 +43,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
\qmlproperty string BoxSet::label
- Defines the label of the box-and-whiskers set.
+ Defines the label of the category of the box-and-whiskers set.
*/
/*!
\qmlproperty int BoxSet::count
@@ -122,6 +122,10 @@ QT_CHARTS_BEGIN_NAMESPACE
slot. If chart includes multiple instances of BoxPlotSeries then box-and-whiskers items with the
same index are drawn to same slot.
+ \note The slot, each item in BoxPlotSeries is drawn, represents a category in BarCategoryAxis.
+ The category labels have to be unique. If same category label is defined for several
+ box-and-whisker items only the first one is drawn.
+
The following QML shows how to create a simple box-and-whiskers chart:
\code
import QtQuick 2.0
@@ -150,6 +154,8 @@ QT_CHARTS_BEGIN_NAMESPACE
\image examples_qmlboxplot.png
\endfloat
\clearfloat
+
+ \sa BoxSet, BarCategoryAxis
*/
/*!