summaryrefslogtreecommitdiffstats
path: root/doc/src/examples-stackedbarchart.qdoc
diff options
context:
space:
mode:
authorTero Ahola <tero.ahola@digia.com>2012-04-11 11:06:14 +0300
committerTero Ahola <tero.ahola@digia.com>2012-04-11 11:06:53 +0300
commit29cedae3d4beeda353db0654ad829d38fc061037 (patch)
treed6afd49b808819fa44e251eff6861cf317718095 /doc/src/examples-stackedbarchart.qdoc
parent96879c8665448217cbe57e0c81087c81c2a74242 (diff)
Updated bar chart documentation
Diffstat (limited to 'doc/src/examples-stackedbarchart.qdoc')
-rw-r--r--doc/src/examples-stackedbarchart.qdoc36
1 files changed, 6 insertions, 30 deletions
diff --git a/doc/src/examples-stackedbarchart.qdoc b/doc/src/examples-stackedbarchart.qdoc
index 3c4cd234..903ef557 100644
--- a/doc/src/examples-stackedbarchart.qdoc
+++ b/doc/src/examples-stackedbarchart.qdoc
@@ -3,37 +3,13 @@
\title StackedBarChart Example
\subtitle
- The example shows how to create simple stacked bar chart. Stacked bar chart shows the data in sets as bars that are stacked on top of each other. The stacking is done per category.
+ The example shows how to create simple stacked bar chart. Stacked bar chart shows the data in sets as bars that are
+ stacked on top of each other. The stacking is done per category.
- \image stackedbarchart.png
+ \image examples_stackedbarchart.png
- First we define categories.
-
- \snippet ../examples/stackedbarchart/main.cpp 1
-
- Data that barchart visualizes, is defined by QBarSet instances. Here we create some sets and append data
- we want to visulaize to them.
-
- \snippet ../examples/stackedbarchart/main.cpp 2
-
- To combine the sets and categories to a chart, we need to create QBarSeries instance. When creating
- the QBarSeries, the categories must be known. Sets can be added later. For example purposes the sets
- are added to series here.
+ Creating stacked bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a
+ stacked bar chart, we use QStackedBarSeries api instead of QBarSeries.
\snippet ../examples/stackedbarchart/main.cpp 3
-
- We want our barchart to behave so, that when mouse is hovered over bar, the name of set which the bar
- represents is shown as tooltip.
- Also when we click the bar, floating values for the set are toggled. Floating values are the data values
- that are drawn on top of bars.
-
- \snippet ../examples/stackedbarchart/main.cpp 4
-
- Here we create the view and add our series to it. Also we set the title and theme we want our chart to use
-
- \snippet ../examples/stackedbarchart/main.cpp 5
-
- For barchart, we don't need X-axis to be visible, so it can be disabled.
-
- \snippet ../examples/stackedbarchart/main.cpp 6
-*/ \ No newline at end of file
+*/