@@ -200,6 +200,7 QChart* ThemeWidget::createAreaChart() const | |||
|
200 | 200 | area->setName(name + QString::number(nameIndex)); |
|
201 | 201 | nameIndex++; |
|
202 | 202 | chart->addSeries(area); |
|
203 | chart->createDefaultAxes(); | |
|
203 | 204 | lowerSeries = upperSeries; |
|
204 | 205 | } |
|
205 | 206 | |
@@ -229,6 +230,7 QChart* ThemeWidget::createBarChart(int valueCount) const | |||
|
229 | 230 | } |
|
230 | 231 | chart->addSeries(series); |
|
231 | 232 | chart->createDefaultAxes(); |
|
233 | chart->setAxisX(axis, series); | |
|
232 | 234 | |
|
233 | 235 | return chart; |
|
234 | 236 | } |
@@ -296,6 +298,7 QChart* ThemeWidget::createSplineChart() const | |||
|
296 | 298 | series->setName(name + QString::number(nameIndex)); |
|
297 | 299 | nameIndex++; |
|
298 | 300 | chart->addSeries(series); |
|
301 | chart->createDefaultAxes(); | |
|
299 | 302 | } |
|
300 | 303 | return chart; |
|
301 | 304 | } |
@@ -315,6 +318,7 QChart* ThemeWidget::createScatterChart() const | |||
|
315 | 318 | series->setName(name + QString::number(nameIndex)); |
|
316 | 319 | nameIndex++; |
|
317 | 320 | chart->addSeries(series); |
|
321 | chart->createDefaultAxes(); | |
|
318 | 322 | } |
|
319 | 323 | return chart; |
|
320 | 324 | } |
@@ -89,8 +89,9 TableWidget::TableWidget(QWidget *parent) | |||
|
89 | 89 | QStringList categories; |
|
90 | 90 | categories << "April" << "May" << "June" << "July" << "August"; |
|
91 | 91 | QCategoriesAxis* axis = new QCategoriesAxis(); |
|
92 | axis->append(categories); | |
|
92 | axis->append(categories); | |
|
93 | 93 |
|
|
94 | chart->setAxisX(axis, series); | |
|
94 | 95 | //! [6] |
|
95 | 96 | |
|
96 | 97 | //! [7] |
General Comments 0
You need to be logged in to leave comments.
Login now