summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2016-11-15 16:14:28 +0100
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2016-11-16 08:10:44 +0000
commitd5573d1a17a0533cfa0303602f707ece47ae5243 (patch)
tree6706e502967cd28d481d202675dcd929d34523aa /src
parent395a0f715695993bd9d66f0fed268d74f49b1498 (diff)
Doc: Edit class and type docs for bar series
Change-Id: I1c6b93b3d16af0a706ee8e219740e725d340ad5a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/charts/barchart/horizontal/bar/qhorizontalbarseries.cpp23
-rw-r--r--src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.cpp31
-rw-r--r--src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.cpp21
-rw-r--r--src/charts/barchart/vertical/bar/qbarseries.cpp21
-rw-r--r--src/charts/barchart/vertical/percent/qpercentbarseries.cpp27
-rw-r--r--src/charts/barchart/vertical/stacked/qstackedbarseries.cpp18
6 files changed, 78 insertions, 63 deletions
diff --git a/src/charts/barchart/horizontal/bar/qhorizontalbarseries.cpp b/src/charts/barchart/horizontal/bar/qhorizontalbarseries.cpp
index d739bf4d..7b3aa35d 100644
--- a/src/charts/barchart/horizontal/bar/qhorizontalbarseries.cpp
+++ b/src/charts/barchart/horizontal/bar/qhorizontalbarseries.cpp
@@ -41,11 +41,11 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QHorizontalBarSeries
\inmodule Qt Charts
- \brief Series for creating horizontal bar chart.
+ \brief The QHorizontalBarSeries class presents a series of data as horizontal bars grouped by
+ category.
- QHorizontalBarSeries represents a series of data shown as bars. The purpose of this class is to draw bars
- as groups, where bars in same category are grouped next to each other. QHorizontalBarSeries groups the data
- from sets to categories, which are defined by a QStringList.
+ This class draws data as a series of horizontal bars grouped by category, with one bar per
+ category from each bar set added to the series.
See the \l {HorizontalBarChart Example} {horizontal bar chart example} to learn how to create a horizontal bar chart.
\image examples_horizontalbarchart.png
@@ -59,9 +59,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits AbstractBarSeries
- \brief Series type for creating horizontal bar chart.
+ \brief Presents a series of data as horizontal bars grouped by category.
- The following QML shows how to create a simple horizontal bar chart:
+ The data is drawn as a series of horizontal bars grouped by category, with one bar per
+ category from each bar set added to the series.
+
+ The following QML code snippet shows how to create a simple horizontal bar chart:
\snippet qmlchart/qml/qmlchart/View9.qml 1
\beginfloatleft
\image examples_qmlchart9.png
@@ -70,8 +73,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- Constructs empty QHorizontalBarSeries.
- QHorizontalBarSeries is QObject which is a child of a \a parent.
+ Constructs an empty horizontal bar series that is a QObject and a child of \a parent.
*/
QHorizontalBarSeries::QHorizontalBarSeries(QObject *parent)
: QAbstractBarSeries(*new QHorizontalBarSeriesPrivate(this), parent)
@@ -79,8 +81,7 @@ QHorizontalBarSeries::QHorizontalBarSeries(QObject *parent)
}
/*!
- Destructor.
- Removes series from chart.
+ Removes the horizontal bar series from the chart.
*/
QHorizontalBarSeries::~QHorizontalBarSeries()
{
@@ -90,7 +91,7 @@ QHorizontalBarSeries::~QHorizontalBarSeries()
}
/*!
- Returns QChartSeries::SeriesTypeHorizontalBar.
+ Returns the horizontal bar series.
*/
QAbstractSeries::SeriesType QHorizontalBarSeries::type() const
{
diff --git a/src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.cpp b/src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.cpp
index 7a6e04de..5c1da062 100644
--- a/src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.cpp
+++ b/src/charts/barchart/horizontal/percent/qhorizontalpercentbarseries.cpp
@@ -38,12 +38,14 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QHorizontalPercentBarSeries
\inmodule Qt Charts
- \brief Series for creating horizontal percent bar chart.
+ \brief The QHorizontalPercentBarSeries class presents a series of categorized data as
+ a percentage of each category.
- QHorizontalPercentBarSeries represents a series of data shown as bars. The purpose of this
- class is to draw bars as groups, where bars in same category are grouped next to each other.
- QHorizontalPercentBarSeries groups the data from sets to categories, which are defined by a
- QStringList. Bars with zero value are not drawn.
+ This class draws data as a series of uniformly sized horizontally stacked bars, with one
+ bar per category. Each bar set added to the series contributes a single segment to each
+ stacked bar. The segment size corresponds to the percentage of the segment value compared
+ with the total value of all segments in the stack.
+ Bars with zero value are not drawn.
See the \l {HorizontalPercentBarChart Example} {horizontal percent bar chart example} to learn
how to create a horizontal percent bar chart.
@@ -59,9 +61,15 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits AbstractBarSeries
- \brief Series type for creating horizontal precent bar chart.
+ \brief Presents a series of categorized data as a percentage of each category.
- The following QML shows how to create a simple horizontal percent bar chart:
+ The data is drawn as a series of uniformly sized horizontally stacked bars, with one
+ bar per category. Each bar set added to the series contributes a single segment to each
+ stacked bar. The segment size corresponds to the percentage of the segment value compared
+ with the total value of all segments in the stack.
+ Bars with zero value are not drawn.
+
+ The following QML code snippet shows how to create a simple horizontal percent bar chart:
\snippet qmlchart/qml/qmlchart/View11.qml 1
\beginfloatleft
\image examples_qmlchart11.png
@@ -70,8 +78,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- Constructs empty QHorizontalPercentBarSeries.
- QHorizontalPercentBarSeries is QObject which is a child of a \a parent.
+ Constructs an empty horizontal percent bar series that is a QObject and a child of \a parent.
*/
QHorizontalPercentBarSeries::QHorizontalPercentBarSeries(QObject *parent) :
QAbstractBarSeries(*new QHorizontalPercentBarSeriesPrivate(this), parent)
@@ -79,7 +86,7 @@ QHorizontalPercentBarSeries::QHorizontalPercentBarSeries(QObject *parent) :
}
/*!
- Returns QAbstractSeries::SeriesTypeHorizontalPercentBar.
+ Returns the horizontal percent bar series.
*/
QAbstractSeries::SeriesType QHorizontalPercentBarSeries::type() const
{
@@ -87,8 +94,8 @@ QAbstractSeries::SeriesType QHorizontalPercentBarSeries::type() const
}
/*!
- Destructor.
- Removes series from chart.
+ Removes the bar series from the chart.
+
*/
QHorizontalPercentBarSeries::~QHorizontalPercentBarSeries()
{
diff --git a/src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.cpp b/src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.cpp
index 946311ca..f7530ce5 100644
--- a/src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.cpp
+++ b/src/charts/barchart/horizontal/stacked/qhorizontalstackedbarseries.cpp
@@ -37,11 +37,10 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QHorizontalStackedBarSeries
\inmodule Qt Charts
- \brief Series for creating horizontal stacked bar chart.
+ \brief The QHorizontalStackedBarSeries class presents a series of data as horizontally
+ stacked bars, with one bar per category.
- QHorizontalStackedBarSeries represents a series of data shown as bars. The purpose of this class is to draw bars
- as groups, where bars in same category are grouped next to each other. QHorizontalStackedBarSeries groups the data
- from sets to categories, which are defined by a QStringList.
+ Each bar set added to the series contributes a single segment to each stacked bar.
See the \l {HorizontalStackedBarChart Example} {horizontal stacked bar chart example} to learn how to create a horizontal stacked bar chart.
\image examples_horizontalstackedbarchart.png
@@ -55,9 +54,11 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits AbstractBarSeries
- \brief Series type for creating horizontal stacked bar chart.
+ \brief Presents a series of data as stacked horizontal bars, with one bar per category.
- The following QML shows how to create a simple horizontal stacked bar chart:
+ Each bar set added to the series contributes a single segment to each stacked bar.
+
+ The following QML code snippet shows how to create a simple horizontal stacked bar chart:
\snippet qmlchart/qml/qmlchart/View10.qml 1
\beginfloatleft
\image examples_qmlchart10.png
@@ -66,8 +67,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- Constructs empty QHorizontalStackedBarSeries.
- QHorizontalStackedBarSeries is QObject which is a child of a \a parent.
+ Constructs an empty horizontal stacked bar series that is a QObject and a child of \a parent.
*/
QHorizontalStackedBarSeries::QHorizontalStackedBarSeries(QObject *parent)
: QAbstractBarSeries(*new QHorizontalStackedBarSeriesPrivate(this), parent)
@@ -75,8 +75,7 @@ QHorizontalStackedBarSeries::QHorizontalStackedBarSeries(QObject *parent)
}
/*!
- Destructor.
- Removes series from chart.
+ Removes the bar series from the chart.
*/
QHorizontalStackedBarSeries::~QHorizontalStackedBarSeries()
{
@@ -86,7 +85,7 @@ QHorizontalStackedBarSeries::~QHorizontalStackedBarSeries()
}
/*!
- Returns QAbstractSeries::SeriesTypeHorizontalStackedBar.
+ Returns the horizontal stacked bar series.
*/
QAbstractSeries::SeriesType QHorizontalStackedBarSeries::type() const
{
diff --git a/src/charts/barchart/vertical/bar/qbarseries.cpp b/src/charts/barchart/vertical/bar/qbarseries.cpp
index 0c163ce5..03a04e98 100644
--- a/src/charts/barchart/vertical/bar/qbarseries.cpp
+++ b/src/charts/barchart/vertical/bar/qbarseries.cpp
@@ -40,11 +40,10 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QBarSeries
\inmodule Qt Charts
- \brief Series for creating bar chart.
+ \brief The QBarSeries class presents a series of data as vertical bars grouped by category.
- QBarSeries represents a series of data shown as bars. The purpose of this class is to draw bars
- as groups, where bars in same category are grouped next to each other. QBarSeries groups the data
- from sets to categories, which are defined by a QStringList.
+ This class draws data as a series of vertical bars grouped by category, with one bar per
+ category from each bar set added to the series.
See the \l {BarChart Example} {bar chart example} to learn how to create a grouped bar chart.
\image examples_barchart.png
@@ -58,9 +57,12 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits AbstractBarSeries
- \brief Series for creating bar chart.
+ \brief Presents a series of data as vertical bars grouped by category.
- The following QML shows how to create a simple grouped bar chart:
+ The data is drawn as a series of vertical bars grouped by category, with one bar per
+ category from each bar set added to the series.
+
+ The following QML code snippet shows how to create a simple grouped bar chart:
\snippet qmlchart/qml/qmlchart/View6.qml 1
\beginfloatleft
\image examples_qmlchart6.png
@@ -69,8 +71,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- Constructs empty QBarSeries.
- QBarSeries is QObject which is a child of a \a parent.
+ Constructs an empty bar series that is a QObject and a child of \a parent.
*/
QBarSeries::QBarSeries(QObject *parent)
: QAbstractBarSeries(*new QBarSeriesPrivate(this), parent)
@@ -79,7 +80,7 @@ QBarSeries::QBarSeries(QObject *parent)
}
/*!
- Returns QAbstractSeries::SeriesTypeBar.
+ Returns the bar series.
*/
QAbstractSeries::SeriesType QBarSeries::type() const
{
@@ -87,7 +88,7 @@ QAbstractSeries::SeriesType QBarSeries::type() const
}
/*!
- Destructor. Removes series from chart.
+ Removes the bar series from the chart.
*/
QBarSeries::~QBarSeries()
{
diff --git a/src/charts/barchart/vertical/percent/qpercentbarseries.cpp b/src/charts/barchart/vertical/percent/qpercentbarseries.cpp
index 63be6a74..c2e54b58 100644
--- a/src/charts/barchart/vertical/percent/qpercentbarseries.cpp
+++ b/src/charts/barchart/vertical/percent/qpercentbarseries.cpp
@@ -39,11 +39,13 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QPercentBarSeries
\inmodule Qt Charts
- \brief Series for creating percent bar chart.
+ \brief The QPercentBarSeries class presents a series of categorized data as
+ a percentage of each category.
- QPercentBarSeries represents a series of data shown as bars. The purpose of this class is to
- draw bars as stacks, where each bar is shown as percentage of all bars in that category.
- QPercentBarSeries groups the data from sets to categories, which are defined by a QStringList.
+ This class draws data as a series of uniformly sized vertically stacked bars, with one
+ bar per category. Each bar set added to the series contributes a single segment to each
+ stacked bar. The segment size corresponds to the percentage of the segment value compared
+ with the total value of all segments in the stack.
Bars with zero value are not drawn.
See the \l {PercentbarChart Example} {percent bar chart example} to learn how to create a
@@ -59,9 +61,15 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits AbstractBarSeries
- \brief Series for creating persent bar chart.
+ \brief Presents a series of categorized data as a percentage of each category.
- The following QML shows how to create a simple percent bar chart:
+ The data is drawn as a series of uniformly sized vertically stacked bars, with one
+ bar per category. Each bar set added to the series contributes a single segment to each
+ stacked bar. The segment size corresponds to the percentage of the segment value compared
+ with the total value of all segments in the stack.
+ Bars with zero value are not drawn.
+
+ The following QML code snippet shows how to create a simple percent bar chart:
\snippet qmlchart/qml/qmlchart/View8.qml 1
\beginfloatleft
\image examples_qmlchart8.png
@@ -70,8 +78,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- Constructs empty QPercentBarSeries.
- QPercentBarSeries is QObject which is a child of a \a parent.
+ Constructs an empty vertical percent bar series that is a QObject and a child of \a parent.
*/
QPercentBarSeries::QPercentBarSeries(QObject *parent)
: QAbstractBarSeries(*new QPercentBarSeriesPrivate(this), parent)
@@ -79,7 +86,7 @@ QPercentBarSeries::QPercentBarSeries(QObject *parent)
}
/*!
- Destructor. Removes series from chart.
+ Removes the bar series from the chart.
*/
QPercentBarSeries::~QPercentBarSeries()
{
@@ -89,7 +96,7 @@ QPercentBarSeries::~QPercentBarSeries()
}
/*!
- Returns QAbstractSeries::SeriesTypePercentBar.
+ Returns the vertical percent bar series.
*/
QAbstractSeries::SeriesType QPercentBarSeries::type() const
{
diff --git a/src/charts/barchart/vertical/stacked/qstackedbarseries.cpp b/src/charts/barchart/vertical/stacked/qstackedbarseries.cpp
index 7d4e2315..744617fd 100644
--- a/src/charts/barchart/vertical/stacked/qstackedbarseries.cpp
+++ b/src/charts/barchart/vertical/stacked/qstackedbarseries.cpp
@@ -39,11 +39,10 @@ QT_CHARTS_BEGIN_NAMESPACE
/*!
\class QStackedBarSeries
\inmodule Qt Charts
- \brief Series for creating stacked bar chart.
+ \brief The QStackedBarSeries class presents a series of data as vertically stacked bars,
+ with one bar per category.
- QStackedBarSeries represents a series of data shown as bars. The purpose of this class is to draw bars
- as stacks, where bars in same category are stacked on top of each other.
- QStackedBarSeries groups the data from sets to categories, which are defined by QStringList.
+ Each bar set added to the series contributes a single segment to each stacked bar.
See the \l {StackedbarChart Example} {stacked bar chart example} to learn how to create a stacked bar chart.
\image examples_stackedbarchart.png
@@ -58,7 +57,9 @@ QT_CHARTS_BEGIN_NAMESPACE
\inherits AbstractBarSeries
- \brief Series for creating stacked bar chart.
+ \brief Presents a series of data as vertically stacked bars, with one bar per category.
+
+ Each bar set added to the series contributes a single segment to each stacked bar.
The following QML shows how to create a simple stacked bar chart:
\snippet qmlchart/qml/qmlchart/View7.qml 1
@@ -69,8 +70,7 @@ QT_CHARTS_BEGIN_NAMESPACE
*/
/*!
- Constructs empty QStackedBarSeries.
- QStackedBarSeries is QObject which is a child of a \a parent.
+ Constructs an empty bar series that is a QObject and a child of \a parent.
*/
QStackedBarSeries::QStackedBarSeries(QObject *parent)
: QAbstractBarSeries(*new QStackedBarSeriesPrivate(this), parent)
@@ -78,7 +78,7 @@ QStackedBarSeries::QStackedBarSeries(QObject *parent)
}
/*!
- Destructor. Removes series from chart.
+ Removes the bar series from the chart.
*/
QStackedBarSeries::~QStackedBarSeries()
{
@@ -87,7 +87,7 @@ QStackedBarSeries::~QStackedBarSeries()
d->m_chart->removeSeries(this);
}
/*!
- Returns QAbstractSeries::SeriesTypeStackedBar.
+ Returns the stacked bar series.
*/
QAbstractSeries::SeriesType QStackedBarSeries::type() const
{