##// 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 chart->setRenderHint(QPainter::Antialiasing);
71 chart->setRenderHint(QPainter::Antialiasing);
72 baseLayout->addWidget(chart, 1, 0);
72 baseLayout->addWidget(chart, 1, 0);
73 {
73 {
74 QLineSeries *series1 = new QLineSeries(chart);
74 for (int i(0); i < m_dataTable.count(); i++) {
75 foreach (Data data, m_dataTable.first())
75 QLineSeries *series1 = new QLineSeries(chart);
76 series1->add(data.first);
76 QLineSeries *series2 = new QLineSeries(chart);
77 QLineSeries *series2 = new QLineSeries(chart);
77 foreach (Data data, m_dataTable[i]) {
78 foreach (Data data, m_dataTable.last())
78 series1->add(data.first);
79 series2->add(data.first);
79 series2->add(QPointF(data.first.x(), 0.0));
80 QAreaSeries *series = new QAreaSeries(series1, series2);
80 }
81 chart->addSeries(series);
81 QAreaSeries *area = new QAreaSeries(series1, series2);
82 chart->addSeries(area);
83 }
82 }
84 }
83 m_charts << chart;
85 m_charts << chart;
84
86
General Comments 0
You need to be logged in to leave comments. Login now