History → Cloud: 'Energy consumption per 100 km — last 6 weeks' donut chart always shows 0%
Reported by @marmof in #16 (split out into a dedicated issue).
Problem
In the History → Cloud section, the donut chart "Energy consumption per 100 km — last 6 weeks" is never updated and always displays 0%.
Affected version
LeapConnect 0.8.2
Expected behavior
The chart should reflect the actual energy consumption per 100 km computed over the last 6 weeks.
Notes
Needs investigation into whether the underlying data is empty/zero, or whether the aggregation/rendering is broken.
The "Energy consumption per 100 km — last 6 weeks" gauge was reading the wrong field from the cloud response. The API returns two separate values: rankResult.result, which is just a status code (0 = OK), and rankResult.rank, which holds the actual percentile (a string like "85%"). The UI was displaying the status code instead of the percentile, so it showed 0% for everyone, regardless of the real ranking.
The fix parses the percentile from the correct field and uses it for the gauge value, badge and label. It will ship in the next release; once you update, the gauge will reflect your real ranking after the next data refresh.
Fixed in release v0.11.0