The energy information graph could use some labelling on the horizontal (time) axis. Right now, the horizontal axis is just left unlabelled in both the 'charge percentage' and 'energy consumption' graphs. The graphs would be much more useful if I could use them to get an approximate idea of the time energy usage spikes or dips occurred.
Not only would axis markers make the graph more intelligible, but would also, IMHO, add to a rather more professional appearance.
Git commit 1c7f121073a773c333b6886333a209235cdc89b4 by Nate Graham, on behalf of Alex Debus.
Committed on 16/09/2019 at 17:06.
Pushed by ngraham into branch 'master'.
Add time line to X axis
The current energy plot does not display any time line. This patch adds a grid and time stamps to the X axis.
It is assumed that the X axis of the plot ranges over [Now - Timespan, Now].
The timestamps for the timespans greater than "1 hour" are aligned to either half hours or full hours.
The resolution respectively the divisions count or number of ticks is made dependend on the timespan.
Dates are only shown if the date changes in the timespan.
If there are more or equal 10 divisions, only every second grid line gets a label to avoid that
the labels pile up, when the window size becomes small.
This patch may be only of temporary nature until [[ https://invent.kde.org/kde/kf5quickcharts | kf5quickcharts ]] becomes production ready.
As QML was absolutely new to me, I am looking forward to your review.
Reviewers: #vdg, ngraham, #plasma
Reviewed By: #vdg, ngraham
Subscribers: meven, bcooksley, plasma-devel
Differential Revision: https://phabricator.kde.org/D23520
M +132 -20 Modules/energy/package/contents/ui/Graph.qml
M +16 -1 Modules/energy/package/contents/ui/main.qml