@@ -33,7 +33,7 int main(int argc, char *argv[]) | |||
|
33 | 33 | |
|
34 | 34 | //![1] |
|
35 | 35 | QLineSeries* series = new QLineSeries(); |
|
36 |
*series << QPointF(0, 6) << QPointF(0.5, 4) << QPointF(1, |
|
|
36 | *series << QPointF(0, 0.6) << QPointF(0.5, 0.4) << QPointF(1, 2) << QPointF(1.5, 1.2) << QPointF(2, 1.0); | |
|
37 | 37 | QChart* chart = new QChart(); |
|
38 | 38 | chart->legend()->hide(); |
|
39 | 39 | chart->addSeries(series); |
@@ -64,7 +64,7 int main(int argc, char *argv[]) | |||
|
64 | 64 | |
|
65 | 65 | //![3] |
|
66 | 66 | QBarCategoriesAxis* axisX = new QBarCategoriesAxis; |
|
67 |
Q |
|
|
67 | QBarCategoriesAxis* axisY = new QBarCategoriesAxis; | |
|
68 | 68 | |
|
69 | 69 | // Customize axis label font |
|
70 | 70 | QFont labelsFont; |
@@ -94,11 +94,14 int main(int argc, char *argv[]) | |||
|
94 | 94 | //![4] |
|
95 | 95 | axisX->append("low"); |
|
96 | 96 | axisX->append("optimal"); |
|
97 | axisX->append("high"); | |
|
97 | axisX->append("high"); | |
|
98 | 98 |
|
|
99 | 99 |
|
|
100 | axisY->setRange(0,10); | |
|
101 | axisY->setTicksCount(4); | |
|
100 | axisY->append("slow"); | |
|
101 | axisY->append("medium"); | |
|
102 | axisY->append("fast"); | |
|
103 | axisY->setRange("slow","fast"); | |
|
104 | // axisY->setTicksCount(4); | |
|
102 | 105 | chart->setAxisX(axisX, series); |
|
103 | 106 | chart->setAxisY(axisY, series); |
|
104 | 107 | //![4] |
General Comments 0
You need to be logged in to leave comments.
Login now