subsurface/stats/statsseries.cpp
Berthold Stoeger ccc95f938a statistics: save axis with series
In the future we want to use our own axis implementation to
convert from/to screen coordinates. For this purpose, we
need to save the axes with the series. Especially if we want
to support multiple series on different axes.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-06 12:31:22 -08:00

20 lines
368 B
C++

// SPDX-License-Identifier: GPL-2.0
#include "statsseries.h"
#include "statsaxis.h"
#include <QChart>
StatsSeries::StatsSeries(QtCharts::QChart *chart, StatsAxis *xAxis, StatsAxis *yAxis) :
xAxis(xAxis), yAxis(yAxis)
{
chart->addSeries(this);
if (xAxis && yAxis) {
attachAxis(xAxis->qaxis());
attachAxis(yAxis->qaxis());
}
}
StatsSeries::~StatsSeries()
{
}