Bug 433007 - Line chart data range of maximum 5 digits is insufficient
Summary: Line chart data range of maximum 5 digits is insufficient
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-16 14:43 UTC by gilles.coremans
Modified: 2021-02-26 09:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gilles.coremans 2021-02-16 14:43:45 UTC
SUMMARY
The "data range" field for line charts only takes numbers of up to 5 digits. This is insufficient for things like memory, as memory is measured in KiB but modern systems can have GiB of memory, requiring more than 5 digit amounts of KiB to represent. Thus it is impossible to make a nice-looking line graph of memory usage.

STEPS TO REPRODUCE
1. Create a Line Chart
2. Add an "application memory (KiB)" sensor (or similar)
3. Attempt to set data range to 0 to 16777220 KiB (= 16 GiB)

OBSERVED RESULT
The max of the data range is truncated to 16777 KiB, making the graph unreadable as the memory usage is always higher than ~16 MiB.

EXPECTED RESULT
The max of the data range is set to the requested amount and a readable graph results.

SOFTWARE/OS VERSIONS
Linux: 5.10.16-arch1-1
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Using the automatic Y range does result in a graph with gigabytes on the axis. However, the maximum on this graph is about 42 GiB, and as my system only has 16 GiB, this is still an ugly (and difficult to read) graph.
Comment 1 Arjen Hiemstra 2021-02-24 12:19:39 UTC
Git commit 504dcbd225e26fe39f1f26d65ad477fc73558762 by Arjen Hiemstra.
Committed on 23/02/2021 at 15:27.
Pushed by ahiemstra into branch 'master'.

Set min/max for Y axis range spinboxes to minimum/maximum possible value

Some sensors have a range of gigabytes or terabytes, like memory and
disk. Since the base unit for these is bytes, we end up needing a very
large value in the range, which currently is not possible due to the
spinbox limiting the value. Internally, spinbox seems to use an int so
we can only store a value that fits within the range of an int, so we
use that as min/max value.

Longer term we want to have some ability to choose an actual "maximum"
sensor but that's going to need more work.
Related: bug 424527

M  +4    -4    faces/facepackages/barchart/contents/ui/Config.qml
M  +4    -4    faces/facepackages/linechart/contents/ui/Config.qml
M  +4    -2    faces/facepackages/piechart/contents/ui/Config.qml

https://invent.kde.org/plasma/libksysguard/commit/504dcbd225e26fe39f1f26d65ad477fc73558762
Comment 2 Arjen Hiemstra 2021-02-26 09:40:02 UTC
Git commit e01caf4fb1bb4245d1f1fdb20cf58a9695037628 by Arjen Hiemstra.
Committed on 26/02/2021 at 09:39.
Pushed by ahiemstra into branch 'Plasma/5.21'.

Set min/max for Y axis range spinboxes to minimum/maximum possible value

Some sensors have a range of gigabytes or terabytes, like memory and
disk. Since the base unit for these is bytes, we end up needing a very
large value in the range, which currently is not possible due to the
spinbox limiting the value. Internally, spinbox seems to use an int so
we can only store a value that fits within the range of an int, so we
use that as min/max value.

Longer term we want to have some ability to choose an actual "maximum"
sensor but that's going to need more work.
Related: bug 424527


(cherry picked from commit 504dcbd225e26fe39f1f26d65ad477fc73558762)

M  +4    -4    faces/facepackages/barchart/contents/ui/Config.qml
M  +4    -4    faces/facepackages/linechart/contents/ui/Config.qml
M  +4    -2    faces/facepackages/piechart/contents/ui/Config.qml

https://invent.kde.org/plasma/libksysguard/commit/e01caf4fb1bb4245d1f1fdb20cf58a9695037628