mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
statistics: fix range in categorical axes
The range for a one-bin chart is [-0.5,0.5], thus the range in an n-bin chart is [-0.5,n-0.5], not [-0.5,n+0.5]. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
83848fb2a8
commit
b5c8d0dbb4
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ CategoryAxis::CategoryAxis(QtCharts::QChart *chart, const QString &title, const
|
|||
addTick(pos + 0.5);
|
||||
pos += 1.0;
|
||||
}
|
||||
setRange(-0.5, static_cast<double>(labelsIn.size()) + 0.5);
|
||||
setRange(-0.5, static_cast<double>(labelsIn.size()) - 0.5);
|
||||
}
|
||||
|
||||
void CategoryAxis::updateLabels()
|
||||
|
|
Loading…
Reference in a new issue