cabana: show enum string in chart tooltip (#32303)

pull/32310/head
Dean Lee 1 year ago committed by GitHub
parent adabd108e2
commit 37877185f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      tools/cabana/chart/chart.cc

@ -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…
Cancel
Save