mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: paint custom grid
With removal of QtCharts' axes, the grid was lost. Readd it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8dfa3f6db3
commit
ab324ed769
9 changed files with 81 additions and 0 deletions
|
@ -135,6 +135,15 @@ void StatsAxis::addTick(double pos)
|
|||
ticks.emplace_back(pos, chart);
|
||||
}
|
||||
|
||||
std::vector<double> StatsAxis::ticksPositions() const
|
||||
{
|
||||
std::vector<double> res;
|
||||
res.reserve(ticks.size());
|
||||
for (const Tick &tick: ticks)
|
||||
res.push_back(toScreen(tick.pos));
|
||||
return res;
|
||||
}
|
||||
|
||||
// Map x (horizontal) or y (vertical) coordinate to or from screen coordinate
|
||||
double StatsAxis::toScreen(double pos) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue