mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
106f7a8e0e
commit
7b0455b4d8
4 changed files with 185 additions and 108 deletions
|
@ -200,6 +200,8 @@ void StatsView::plot(const StatsState &stateIn)
|
|||
return plotHistogramBoxChart(dives, state.var1, state.var1Binner, state.var2);
|
||||
case ChartType::ScatterPlot:
|
||||
return plotScatter(dives, state.var1, state.var2);
|
||||
case ChartType::Invalid:
|
||||
return;
|
||||
default:
|
||||
qWarning("Unknown chart type: %d", (int)state.type);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue