summaryrefslogtreecommitdiffstats
path: root/core/libdivecomputer.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-11 12:59:17 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-11 12:59:17 +0100
commitbdecd98ef500a8193b3abc5c51bf89d52271ea41 (patch)
tree6f76c1996fea522af1868e3a6296b27f5f091743 /core/libdivecomputer.h
parent0ff1145fd822fec21d301c221744073733f012ed (diff)
downloadsubsurface-bdecd98ef500a8193b3abc5c51bf89d52271ea41.tar.gz
statistics: consider overhang of horizontal axes
The old code didn't consider that labels can peak out of horizontal axes if labels are under ticks. This commit takes this into account. However, it must be noted that this is only heuristics: Before setting the size of the axes, the actual minimum and maximum label are not known, because we round to "nice" numbers. But the size of the axis can only be set after knowing the overhang, leading to a circular dependency. Therefore, the code currently simply uses the minimum and maximum value of the data, hoping that the "nice" values will not format to something significantly larger. We could do a multi-pass scheme, but let's not for now. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/libdivecomputer.h')
0 files changed, 0 insertions, 0 deletions