cabana: show enum string in chart tooltip (#32303)
old-commit-hash: 37877185f8
This commit is contained in:
parent
938759ebd1
commit
65660350dd
|
@ -581,7 +581,7 @@ void ChartView::showTip(double sec) {
|
|||
// use reverse iterator to find last item <= sec.
|
||||
auto it = std::lower_bound(s.vals.crbegin(), s.vals.crend(), sec, [](auto &p, double x) { return p.x() > x; });
|
||||
if (it != s.vals.crend() && it->x() >= axis_x->min()) {
|
||||
value = QString::number(it->y());
|
||||
value = s.sig->formatValue(it->y(), false);
|
||||
s.track_pt = *it;
|
||||
x = std::max(x, chart()->mapToPosition(*it).x());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue