##// END OF EJS Templates
Area chart of theme example to use zero lower series
Tero Ahola -
r539:d81325ed2c25
parent child
Show More
@@ -71,14 +71,16 public:
71 71 chart->setRenderHint(QPainter::Antialiasing);
72 72 baseLayout->addWidget(chart, 1, 0);
73 73 {
74 for (int i(0); i < m_dataTable.count(); i++) {
74 75 QLineSeries *series1 = new QLineSeries(chart);
75 foreach (Data data, m_dataTable.first())
76 series1->add(data.first);
77 76 QLineSeries *series2 = new QLineSeries(chart);
78 foreach (Data data, m_dataTable.last())
79 series2->add(data.first);
80 QAreaSeries *series = new QAreaSeries(series1, series2);
81 chart->addSeries(series);
77 foreach (Data data, m_dataTable[i]) {
78 series1->add(data.first);
79 series2->add(QPointF(data.first.x(), 0.0));
80 }
81 QAreaSeries *area = new QAreaSeries(series1, series2);
82 chart->addSeries(area);
83 }
82 84 }
83 85 m_charts << chart;
84 86
General Comments 0
You need to be logged in to leave comments. Login now