Skip to content

Conversation

@varajan
Copy link

@varajan varajan commented Nov 23, 2025

From bug #5216: Companion Log Viewer Scaling issue

Current Behavior
Depending the log file, the Viewer changes the scale from left to right what makes the selected (relevant) fields hard to read / compare. For example, selecting all Lipo Battery cells (C1-C6). File 073542, C5 and C6 are shown using the right scale while the others use the left scale as it supposed to see file 071847.

Expected Behavior
Use 1 scale for for all selected fields related to each other such as Lipo cells.

Summary of changes:

  • Use common axes checkbox was added
  • translations were updated

Before:
no-common-axis

After:
common-axis

@pfeerick pfeerick changed the title feat: Make possible to use same scale in Companion Log Viewer feat(cpn): make possible to use same scale in Log Viewer Nov 24, 2025
@pfeerick pfeerick requested a review from elecpower November 24, 2025 03:31
@pfeerick pfeerick added companion Related to the companion software enhancement ✨ New feature or request labels Nov 24, 2025
@elecpower
Copy link
Collaborator

Have you considered putting 'Use common axis' checkbox on the same line as Zoom and expand Reset to also reset the new checkbox?

@varajan
Copy link
Author

varajan commented Dec 3, 2025

Have you considered putting 'Use common axis' checkbox on the same line as Zoom and expand Reset to also reset the new checkbox?

I’ve moved the checkbox to the row above and updated the Reset button handler — it now resets the checkbox states as well.

Here’s how it looks now. Note: I also added some spacing between the "X/Y" checkboxes and the “Use common Y axis” checkbox.
image

default:
break;
if (!useCommonAxes) {
switch (plots.coords[i].yaxis) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 977 2 spaces to left

auto [min, max] = this->GetMinMaxY();
axisRect->axis(QCPAxis::atLeft)->setRange(min, max);
} else {
axisRect->axis(QCPAxis::atLeft)->setRange(yAxesRanges[firstLeft].min, yAxesRanges[firstLeft].max);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line1046 2 spaces to left

Copy link
Collaborator

@elecpower elecpower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I am so pleased to see someone helping out on the Companion side and has Qt experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

companion Related to the companion software enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants