cabana: reduce the number of ticks on the Y-axis (#27964)

pull/27969/head
Dean Lee 2 years ago committed by GitHub
parent 500c049590
commit de62972e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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);

Loading…
Cancel
Save