summaryrefslogtreecommitdiffstats
path: root/stats/statsseries.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'stats/statsseries.cpp')
-rw-r--r--stats/statsseries.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/stats/statsseries.cpp b/stats/statsseries.cpp
index 48b31336e..5996508a4 100644
--- a/stats/statsseries.cpp
+++ b/stats/statsseries.cpp
@@ -2,18 +2,17 @@
#include "statsseries.h"
#include "statsaxis.h"
-#include <QChart>
-
StatsSeries::StatsSeries(QtCharts::QChart *chart, StatsAxis *xAxis, StatsAxis *yAxis) :
- xAxis(xAxis), yAxis(yAxis)
+ chart(chart), xAxis(xAxis), yAxis(yAxis)
{
- chart->addSeries(this);
- if (xAxis && yAxis) {
- attachAxis(xAxis->qaxis());
- attachAxis(yAxis->qaxis());
- }
}
StatsSeries::~StatsSeries()
{
}
+
+QPointF StatsSeries::toScreen(QPointF p)
+{
+ return xAxis && yAxis ? QPointF(xAxis->toScreen(p.x()), yAxis->toScreen(p.y()))
+ : QPointF(0.0, 0.0);
+}