##// END OF EJS Templates
stacked and grouped bar chart examples updated
Marek Rosa -
r1579:6601aab802c5
parent child
Show More
@@ -21,7 +21,7
21
21
22 \snippet ../examples/groupedbarchart/main.cpp 3
22 \snippet ../examples/groupedbarchart/main.cpp 3
23
23
24 We define the categories here and add them to the x-axis.
24 We define the categories here and add them to QCategoriesAxis which we then set to be the x-axis of the chart.
25
25
26 \snippet ../examples/groupedbarchart/main.cpp 4
26 \snippet ../examples/groupedbarchart/main.cpp 4
27
27
@@ -60,6 +60,7 int main(int argc, char *argv[])
60 QChart* chart = new QChart();
60 QChart* chart = new QChart();
61 chart->addSeries(series);
61 chart->addSeries(series);
62 chart->setTitle("Simple grouped barchart example");
62 chart->setTitle("Simple grouped barchart example");
63 chart->createDefaultAxes();
63 //![3]
64 //![3]
64
65
65 //![4]
66 //![4]
@@ -67,7 +68,7 int main(int argc, char *argv[])
67 categories << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun";
68 categories << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun";
68 QCategoriesAxis* axis = new QCategoriesAxis();
69 QCategoriesAxis* axis = new QCategoriesAxis();
69 axis->append(categories);
70 axis->append(categories);
70 chart->createDefaultAxes();
71 chart->setAxisX(axis,series);
71 //![4]
72 //![4]
72
73
73 //![5]
74 //![5]
@@ -59,6 +59,7 int main(int argc, char *argv[])
59 QChart* chart = new QChart();
59 QChart* chart = new QChart();
60 chart->addSeries(series);
60 chart->addSeries(series);
61 chart->setTitle("Simple stackedbarchart example");
61 chart->setTitle("Simple stackedbarchart example");
62 chart->createDefaultAxes();
62 //![3]
63 //![3]
63
64
64 //![4]
65 //![4]
General Comments 0
You need to be logged in to leave comments. Login now