examples-percentbarchart.qdoc
17 lines
| 754 B
| text/plain
|
TextLexer
sauimone
|
r387 | /*! | ||
Tero Ahola
|
r500 | \example examples/percentbarchart | ||
sauimone
|
r387 | \title PercentBarChart Example | ||
\subtitle | ||||
Tero Ahola
|
r971 | The example shows how to create simple percent bar chart. Percent bar chart shows the data in set as percentage of | ||
all sets, per category. | ||||
sauimone
|
r387 | |||
Tero Ahola
|
r971 | \image examples_percentbarchart.png | ||
sauimone
|
r387 | |||
Tero Ahola
|
r971 | Creating percent bar chart is just like creating a regular \l {BarChart Example} {bar chart}, except that for a | ||
percent bar chart, we use QPercentBarSeries api instead of QBarSeries. Also, in the | ||||
\l {BarChart Example} {bar chart} we used nice numbers algorithm to make the y axis numbering look better. With | ||||
percent bar chart there is no need for that, because the maximum y-axis value is always 100. | ||||
sauimone
|
r387 | |||
sauimone
|
r492 | \snippet ../examples/percentbarchart/main.cpp 3 | ||
Tero Ahola
|
r971 | */ | ||