Skip to content
Commit 1c7f1210 authored by Alex Debus's avatar Alex Debus Committed by Nate Graham
Browse files

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.

BUG: 376940
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
parent dd9bc6a3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment