1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -25,6 +25,7 | |||||
25 | #include <QBarSet> |
|
25 | #include <QBarSet> | |
26 | #include <QLegend> |
|
26 | #include <QLegend> | |
27 | #include <QBarCategoryAxis> |
|
27 | #include <QBarCategoryAxis> | |
|
28 | #include <QValueAxis> | |||
28 | #include <QHorizontalBarSeries> |
|
29 | #include <QHorizontalBarSeries> | |
29 |
|
30 | |||
30 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
31 | QTCOMMERCIALCHART_USE_NAMESPACE | |
@@ -66,10 +67,12 int main(int argc, char *argv[]) | |||||
66 | //![4] |
|
67 | //![4] | |
67 | QStringList categories; |
|
68 | QStringList categories; | |
68 | categories << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun"; |
|
69 | categories << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun"; | |
69 | QBarCategoryAxis *axis = new QBarCategoryAxis(); |
|
70 | QBarCategoryAxis *axisY = new QBarCategoryAxis(); | |
70 | axis->append(categories); |
|
71 | axisY->append(categories); | |
71 | chart->createDefaultAxes(); |
|
72 | chart->setAxisY(axisY, series); | |
72 | chart->setAxisY(axis, series); |
|
73 | QValueAxis *axisX = new QValueAxis(); | |
|
74 | chart->setAxisX(axisX, series); | |||
|
75 | axisX->applyNiceNumbers(); | |||
73 | //![4] |
|
76 | //![4] | |
74 |
|
77 | |||
75 | //![5] |
|
78 | //![5] |
General Comments 0
You need to be logged in to leave comments.
Login now