summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stats/statsseries.cpp3
-rw-r--r--stats/statsseries.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/stats/statsseries.cpp b/stats/statsseries.cpp
index 2fff4b306..48b31336e 100644
--- a/stats/statsseries.cpp
+++ b/stats/statsseries.cpp
@@ -4,7 +4,8 @@
#include <QChart>
-StatsSeries::StatsSeries(QtCharts::QChart *chart, StatsAxis *xAxis, StatsAxis *yAxis)
+StatsSeries::StatsSeries(QtCharts::QChart *chart, StatsAxis *xAxis, StatsAxis *yAxis) :
+ xAxis(xAxis), yAxis(yAxis)
{
chart->addSeries(this);
if (xAxis && yAxis) {
diff --git a/stats/statsseries.h b/stats/statsseries.h
index 567f32644..9b247fb95 100644
--- a/stats/statsseries.h
+++ b/stats/statsseries.h
@@ -22,6 +22,8 @@ public:
virtual void updatePositions() = 0; // Called if chart geometry changes.
virtual bool hover(QPointF pos) = 0; // Called on mouse movement. Return true if an item of this series is highlighted.
virtual void unhighlight() = 0; // Unhighlight any highlighted item.
+protected:
+ StatsAxis *xAxis, *yAxis; // May be zero for charts without axes (pie charts).
};
#endif