Skip to content

Chart adjustments#204

Open
MARMdeveloper wants to merge 2 commits intomainfrom
fix/minor-adjustments-in-charts
Open

Chart adjustments#204
MARMdeveloper wants to merge 2 commits intomainfrom
fix/minor-adjustments-in-charts

Conversation

@MARMdeveloper
Copy link
Collaborator

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

OptimizedLineChart.kt

  • drawYAxisLabels: now renders 5 labels (including the maximum) 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%)
  • Fore 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
modification for current charge also
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