##// END OF EJS Templates
Add changes from commit d850de28
Michal Klocek -
r912:381dc7e69d56
parent child
Show More
@@ -230,6 +230,7 void MainWidget::addSeries(QString seriesName, int columnCount, int rowCount, QS
230 for (int j(0); j < data.count(); j ++) {
230 for (int j(0); j < data.count(); j ++) {
231 QList<qreal> column = data.at(j);
231 QList<qreal> column = data.at(j);
232 QLineSeries *series = new QLineSeries();
232 QLineSeries *series = new QLineSeries();
233 series->setName("line" + QString::number(j));
233 for (int i(0); i < column.count(); i++)
234 for (int i(0); i < column.count(); i++)
234 series->append(i, column.at(i));
235 series->append(i, column.at(i));
235 m_chart->addSeries(series);
236 m_chart->addSeries(series);
@@ -242,12 +243,14 void MainWidget::addSeries(QString seriesName, int columnCount, int rowCount, QS
242 for (int i(0); i < column.count(); i++)
243 for (int i(0); i < column.count(); i++)
243 lineSeries->append(i, column.at(i));
244 lineSeries->append(i, column.at(i));
244 QAreaSeries *areaSeries = new QAreaSeries(lineSeries);
245 QAreaSeries *areaSeries = new QAreaSeries(lineSeries);
246 areaSeries->setName("area" + QString::number(j));
245 m_chart->addSeries(areaSeries);
247 m_chart->addSeries(areaSeries);
246 }
248 }
247 } else if (seriesName == "Scatter") {
249 } else if (seriesName == "Scatter") {
248 for (int j(0); j < data.count(); j++) {
250 for (int j(0); j < data.count(); j++) {
249 QList<qreal> column = data.at(j);
251 QList<qreal> column = data.at(j);
250 QScatterSeries *series = new QScatterSeries();
252 QScatterSeries *series = new QScatterSeries();
253 series->setName("scatter" + QString::number(j));
251 for (int i(0); i < column.count(); i++)
254 for (int i(0); i < column.count(); i++)
252 series->append(i, column.at(i));
255 series->append(i, column.at(i));
253 m_chart->addSeries(series);
256 m_chart->addSeries(series);
General Comments 0
You need to be logged in to leave comments. Login now