##// END OF EJS Templates
Updates class diagram
Updates class diagram

File last commit:

r971:29cedae3d4be
r1088:295795452ad9
Show More
examples-barchart.qdoc
40 lines | 1.2 KiB | text/plain | TextLexer
/ doc / src / examples-barchart.qdoc
Michal Klocek
Refactor documentation...
r330 /*!
Tero Ahola
Fixing example documentation
r500 \example examples/barchart
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387 \title BarChart Example
\subtitle
Michal Klocek
Refactor documentation...
r330
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387 The example shows how to create simple bar chart. Barchart shows the data in sets as separate bars, which are grouped in categories.
Michal Klocek
Refactor documentation...
r330
Tero Ahola
Updated bar chart documentation
r971 \image examples_barchart.png
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387
First we define categories.
sauimone
fixed example paths in barchart documentation
r492 \snippet ../examples/barchart/main.cpp 1
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387
Data that barchart visualizes, is defined by QBarSet instances. Here we create some sets and append data
Tero Ahola
Updated bar chart documentation
r971 we want to visualize to them.
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387
sauimone
fixed example paths in barchart documentation
r492 \snippet ../examples/barchart/main.cpp 2
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387
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.
sauimone
fixed example paths in barchart documentation
r492 \snippet ../examples/barchart/main.cpp 3
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387
Tero Ahola
Updated bar chart documentation
r971 Then we create a chart and add the series to it.
sauimone
fixed example paths in barchart documentation
r492 \snippet ../examples/barchart/main.cpp 4
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387
Tero Ahola
Updated bar chart documentation
r971 And we also want to show the legend, so that the data is easier to read.
sauimone
fixed example paths in barchart documentation
r492 \snippet ../examples/barchart/main.cpp 5
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387
Tero Ahola
Updated bar chart documentation
r971 Finally we add the chart onto a view.
sauimone
fixed example paths in barchart documentation
r492 \snippet ../examples/barchart/main.cpp 6
Tero Ahola
Updated bar chart documentation
r971
And it is ready to be shown in a window.
\snippet ../examples/percentbarchart/main.cpp 7
*/