Bug 376940 - Display time label on graphs in energy information
Summary: Display time label on graphs in energy information
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Applications
Component: Energy Information (show other bugs)
Version: 5.9.2
Platform: Archlinux Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-26 05:51 UTC by Kishore Gopalakrishnan
Modified: 2019-09-16 17:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2017-02-26 05:51:10 UTC
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.
Comment 1 Paul 2019-08-06 16:39:11 UTC
Fully concur...

Not only would axis markers make the graph more intelligible, but would also, IMHO, add to a rather more professional appearance.
Comment 2 Nate Graham 2019-09-16 17:06:26 UTC
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

Summary:
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.
FIXED-IN: 5.17.0

As QML was absolutely new to me, I am looking forward to your review.

Test Plan:
{F7320952}
{F7320951}
{F7320950}

Reviewers: #vdg, ngraham, #plasma

Reviewed By: #vdg, ngraham

Subscribers: meven, bcooksley, plasma-devel

Tags: #plasma

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

https://commits.kde.org/kinfocenter/1c7f121073a773c333b6886333a209235cdc89b4