From d8637d0dd3e5e1518ec3bb52a9ce6fb653bb7fe2 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Wed, 19 Apr 2023 13:48:36 +0800 Subject: [PATCH] cabana: reduce the number of ticks on the Y-axis (#27964) old-commit-hash: de62972e2c283882232faca9e309b3cffe0ac6e4 --- tools/cabana/chart/chart.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cabana/chart/chart.cc b/tools/cabana/chart/chart.cc index 4285c8a7f4..6f2962c229 100644 --- a/tools/cabana/chart/chart.cc +++ b/tools/cabana/chart/chart.cc @@ -331,7 +331,7 @@ void ChartView::updateAxisY() { } double delta = std::abs(max - min) < 1e-3 ? 1 : (max - min) * 0.05; - auto [min_y, max_y, tick_count] = getNiceAxisNumbers(min - delta, max + delta, axis_y->tickCount()); + auto [min_y, max_y, tick_count] = getNiceAxisNumbers(min - delta, max + delta, 3); if (min_y != axis_y->min() || max_y != axis_y->max() || y_label_width == 0) { axis_y->setRange(min_y, max_y); axis_y->setTickCount(tick_count);