summaryrefslogtreecommitdiffstats
path: root/src/charts/barchart/vertical
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/charts/barchart/vertical
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/charts/barchart/vertical')
-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
3 files changed, 37 insertions, 29 deletions
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
{