Skip to content

Chart adjustments#204

Open
MARMdeveloper wants to merge 1 commit intomainfrom
fix/minor-adjustments-in-charts
Open

Chart adjustments#204
MARMdeveloper wants to merge 1 commit intomainfrom
fix/minor-adjustments-in-charts

Conversation

@MARMdeveloper
Copy link
Collaborator

@MARMdeveloper MARMdeveloper commented Mar 18, 2026

Summary

Improves Y-axis label rendering in all line charts. Labels now show meaningful, non-repeating values and include decimals only when the data range is too small to differentiate values without them. Also adds the maximum value label at the top of the chart.
closes #202

Changes

ChartDrawUtils.kt

  • drawYAxisLabels: now renders 5 labels (including upper grid line) instead of 4
  • Labels use %.0f format by default, switching automatically to %.1f when any two adjacent labels would otherwise display the same integer value
  • All labels are now positioned above its grid line to show equal space between them and not to overlap with data line when it start at (or near) max value.

ChargeDetailScreen.kt and DriveDetailScreen.ktBatteryChartCard

  • Y axis now auto-fits to the nearest multiple of 10 above and below the actual battery level range, instead of a fixed 0–100 range
  • This makes the charge curve visually clearer when the battery level change is small (e.g. charging from 33% to 42%)
  • For large charges/discharges the visual aspect is the same

@MARMdeveloper MARMdeveloper linked an issue Mar 18, 2026 that may be closed by this pull request
Added label for upper grid line
Equally spaced all labels above its line
Change format to add decimal digit when needed to avoid duplicate labels
@MARMdeveloper MARMdeveloper force-pushed the fix/minor-adjustments-in-charts branch from 8e84d66 to 48f03cc Compare March 22, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ajustes en gráficas

1 participant