summaryrefslogtreecommitdiffstats
path: root/stats/regressionitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'stats/regressionitem.h')
-rw-r--r--stats/regressionitem.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/stats/regressionitem.h b/stats/regressionitem.h
new file mode 100644
index 000000000..607317d08
--- /dev/null
+++ b/stats/regressionitem.h
@@ -0,0 +1,26 @@
+// A regression line and confidence area
+#ifndef REGRESSION_H
+#define REGRESSION_H
+
+#include "chartitem.h"
+
+class StatsAxis;
+class StatsView;
+
+struct regression_data {
+ double a,b;
+ double res2, r2, sx2, xavg;
+ int n;
+};
+
+class RegressionItem : public ChartPixmapItem {
+public:
+ RegressionItem(StatsView &view, regression_data data, StatsAxis *xAxis, StatsAxis *yAxis);
+ ~RegressionItem();
+ void updatePosition();
+private:
+ StatsAxis *xAxis, *yAxis;
+ regression_data reg;
+};
+
+#endif