##// END OF EJS Templates
Adjust barchart example to please Sami's eye
Jani Honkonen -
r1377:68827e982393
parent child
Show More
@@ -36,22 +36,20 int main(int argc, char *argv[])
36 QBarSet *set1 = new QBarSet("John");
36 QBarSet *set1 = new QBarSet("John");
37 QBarSet *set2 = new QBarSet("Axel");
37 QBarSet *set2 = new QBarSet("Axel");
38 QBarSet *set3 = new QBarSet("Mary");
38 QBarSet *set3 = new QBarSet("Mary");
39 QBarSet *set4 = new QBarSet("Samantha");
40
39
41 *set0 << QPointF(0.0, 1) << QPointF(1.0, 2) << QPointF(2.4, 3) << QPointF(3.0, 4) << QPointF(4.0, 5) << QPointF(5.0, 6);
40 *set0 << QPointF(0.0, 1) << QPointF(1.0, 2) << QPointF(2.4, 3) << QPointF(3.0, 4) << QPointF(4.0, 5) << QPointF(5.0, 6);
42 *set1 << QPointF(0.1, 2) << QPointF(1.2, 3) << QPointF(2.45, 4) << QPointF(3.2, 5) << QPointF(4.2, 6) << QPointF(5.2, 7);
41 *set1 << QPointF(0.1, 2) << QPointF(1.2, 3) << QPointF(2.45, 4) << QPointF(3.2, 5) << QPointF(4.2, 6) << QPointF(5.2, 7);
43 *set2 << QPointF(0.2, 3) << QPointF(1.4, 4) << QPointF(2.50, 5) << QPointF(3.4, 6) << QPointF(4.4, 7) << QPointF(5.4, 8);
42 *set2 << QPointF(0.2, 3) << QPointF(1.4, 4) << QPointF(2.50, 5) << QPointF(3.4, 6) << QPointF(4.4, 7) << QPointF(5.4, 8);
44 *set3 << QPointF(0.3, 4) << QPointF(1.6, 5) << QPointF(2.55, 6) << QPointF(3.6, 7) << QPointF(4.6, 8) << QPointF(5.6, 9);
43 *set3 << QPointF(0.3, 4) << QPointF(1.6, 5) << QPointF(2.55, 6) << QPointF(3.6, 7) << QPointF(4.6, 8) << QPointF(5.6, 9);
45 *set4 << QPointF(0.4, 5) << QPointF(1.8, 6) << QPointF(2.6, 7) << QPointF(3.8, 8) << QPointF(4.8, 9) << QPointF(5.8, 10);
46 //![1]
44 //![1]
47
45
48 //![2]
46 //![2]
49 QBarSeries* series = new QBarSeries();
47 QBarSeries* series = new QBarSeries();
48 series->setBarMargin(0.8);
50 series->append(set0);
49 series->append(set0);
51 series->append(set1);
50 series->append(set1);
52 series->append(set2);
51 series->append(set2);
53 series->append(set3);
52 series->append(set3);
54 series->append(set4);
55 //![2]
53 //![2]
56
54
57 //![3]
55 //![3]
General Comments 0
You need to be logged in to leave comments. Login now