Bug 433375

Summary: system monitor widget doesn't remember unit and si prefix when using manual y data range
Product: [Plasma] plasmashell Reporter: Emil <emil.vanherp>
Component: System Monitor widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, kde, nate, notmart
Priority: NOR    
Version First Reported In: 5.21.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: Plasma 5.23
Sentry Crash Report:
Attachments: screenshot of unit and si prefix missing
% missing
plasmashell log

Description Emil 2021-02-21 10:23:38 UTC
Created attachment 136007 [details]
screenshot of unit and si prefix missing

SUMMARY
system monitor widget doesn't remember unit when using manual y data range, see attached image. Left is with an automatic y range and right is with a manual y range, the unit and si prefix are missing.

STEPS TO REPRODUCE
1. Add any system monitor widget that uses line chart or bar chart chart (Disk Usage, Individual Core Usage, System Monitor Sensor, Network speed, ...)
2. Open the widget configuration and disable "Automatic Y Data Range"
3. logout and login again.

OBSERVED RESULT
Y axis units are gone

EXPECTED RESULT
Y axis units are show and it's possible to select Si prefix (K/Ki/Mi/G/Gi ...) for the data range.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 David Redondo 2021-02-26 08:51:49 UTC
Units do not get lost here.

Unfortunately you have to enter the data range in the base unit for now. 

https://invent.kde.org/plasma/libksysguard/-/commit/504dcbd225e26fe39f1f26d65ad477fc73558762  makes sure that it is possible to enter a value that is big enough.
Comment 2 Emil 2021-02-26 15:36:11 UTC
Not only the prefix but also the units on the y axis are gone. %, °C, Hz etc are not shown.
Comment 3 Emil 2021-02-26 15:37:45 UTC
Created attachment 136195 [details]
% missing

Units are missing too
Comment 4 David Redondo 2021-02-26 15:39:30 UTC
Unfortunately I cannot reproduce that at all. Are there suspicious messages in the output of plasmashell?
Comment 5 Emil 2021-02-26 16:41:40 UTC
Created attachment 136198 [details]
plasmashell log

Anything useful in here?
Comment 6 Emil 2021-03-02 15:45:00 UTC
I can reproduce the issue consistently on 2 different machines. Plasmashell needs to be restarted for the problem to occur.
Comment 7 Arjen Hiemstra 2021-08-06 11:10:44 UTC
There was an issue with how the unit for the Y axis labels was retrieved. We changed some things there, I believe this should be fixed with Plasma 5.23.