##// END OF EJS Templates
Fixes explicit issues in cstr
Fixes explicit issues in cstr

File last commit:

r500:4d73e3f9e3b6
r970:96879c866544
Show More
examples-barchart.qdoc
38 lines | 1.4 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
sauimone
Updated barchart examples and documentation. Also bug fix to barchart model
r387 \image barchart.png
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
we want to visulaize to them.
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
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.
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
Here we create the view and add our series to it. Also we set the title and theme we want our chart to use
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
For barchart, we don't need X-axis to be visible, so it can be disabled.
sauimone
fixed example paths in barchart documentation
r492 \snippet ../examples/barchart/main.cpp 6
Michal Klocek
Refactor documentation...
r330 */