Commit graph

3 commits

Author SHA1 Message Date
Berthold Stoeger
ba259fb1d6 statistics: make confidence area and regression line opt-in
This is not perfect - the polygon of the confidence area is
calculated even if it is not shown. Oh well.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-20 08:47:18 +01:00
Berthold Stoeger
7b0455b4d8 statistics: reverse chart selection logic
The old ways was to select the chart first, then depending on
the chart choose the binning.

Willem says that it should work the other way round: select
the binning (or operation) and make the charts depend on
that.

I'm not arguing one way or the other, just note that the new
way is much more tricky, because it is easy to get unsupported
combinations. For example, there is no chart where the
first variable is unbinned, but the second axis is binned
or has an operation. This makes things distinctly more tricky
and this code still needs a thorough audit.

Since this is all more tricky, implement a "invalid" chart
state. Ideally that should be never shown to the user, but
let's try to be defensive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-03 13:41:15 -08:00
Berthold Stoeger
a034014a6a statistics: implement a structure representing the chart state
The StatsState structure fully describes the current state of
the chart: the selected axes, operations and additional chart
features, such as legend or labels.

The code implements sanity checks and reacts accordingly,
if an invalid combination of variables and charts is chosen.

The chart and variable lists to be displayed can be queried
and are encapsulated in the StatsState::UIState structure.

Some variable / chart combinations are possible, but not
recommended, which is represented by a warning flag.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-02 11:04:03 -08:00