subsurface/stats/statsseries.cpp
Berthold Stoeger 4ab9f1c6b0 statistics: replace QtCharts' axes
Replace by custom implementation, with the ultimate goal to
remove the QtCharts module. This doesn't yet display axis
titles or a grid.

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

18 lines
409 B
C++

// SPDX-License-Identifier: GPL-2.0
#include "statsseries.h"
#include "statsaxis.h"
StatsSeries::StatsSeries(QtCharts::QChart *chart, StatsAxis *xAxis, StatsAxis *yAxis) :
chart(chart), xAxis(xAxis), yAxis(yAxis)
{
}
StatsSeries::~StatsSeries()
{
}
QPointF StatsSeries::toScreen(QPointF p)
{
return xAxis && yAxis ? QPointF(xAxis->toScreen(p.x()), yAxis->toScreen(p.y()))
: QPointF(0.0, 0.0);
}