Bug 437310

Summary: System monitor does not allow for negative values in ring charts
Product: [Applications] plasma-systemmonitor Reporter: David <kitt997>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: CONFIRMED ---    
Severity: normal CC: ahiemstra, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.21.5   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: See the Rate chart

Description David 2021-05-18 14:49:47 UTC
Created attachment 138543 [details]
See the Rate chart

SUMMARY
I've added a ring chart for my battery's chargin rate, but there's no way of mapping it to also negative values.

STEPS TO REPRODUCE
1. add a ring chart for a sensor that can read negative values
2. set the right domain for the sensor or either leave auto
3. wait for negative values

OBSERVED RESULT
ring starts showing a very casual behavior, not even linear wrt values.

EXPECTED RESULT
on a very basic level, it should not matter whether readings are negatively or positively valued. once a domain is entered, graph should divide currently set angular domain by sensor domain length, and add the lowest bound as an offset.
Or even better, it should recognize signed domains and have the ring go clockwise for positive values and ccwise for negative ones, starting from 0.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.11.20-300.fc34.x86_64
(available in About System)
KDE Plasma Version: 5.21
KDE Frameworks Version: 5.81
Qt Version: 5.15.2
Comment 1 Nate Graham 2021-05-19 02:12:02 UTC
Confirmed.

Side note: it looks like you're making some very cool pages. Would you consider submitting them on store.kde.org so that other users can take advantage of them? Or even submitting some of them upstream, if you think they're better than the default ones that we ship?
Comment 2 David 2021-05-19 08:52:31 UTC
> Side note: it looks like you're making some very cool pages. Would you
> consider submitting them on store.kde.org so that other users can take
> advantage of them? 

I really appreciate it, thanks :) I'll do that for sure.

> Or even submitting some of them upstream, if you think
> they're better than the default ones that we ship?

I don't want to criticize what's been done with system monitor, it's really good! 
Nonetheless I'll submit my pages so that you can integrate them in case, I'd be super happy with that.
Comment 3 Nate Graham 2021-05-19 16:08:21 UTC
Without having seen them all, it's hard to say, but I like what I see so far. That power page visible in your screenshot would be really nice to have for laptop users, at least.
Comment 4 David 2021-05-25 22:13:51 UTC
(In reply to Nate Graham from comment #3)
> Without having seen them all, it's hard to say, but I like what I see so
> far. That power page visible in your screenshot would be really nice to have
> for laptop users, at least.

Thanks! 
Yeah the idea was mainly to take the most possible advantage out of system monitor. I really like this possibility of extensively monitoring my system which, as in many other cases, only KDE allows for.

So far, though having had a hard time, I've managed to upload them to store.kde.org (which switches to pling when I upload stuff, and gets buggy). You should be able to see them! 
As soon as I can I will look for systemmonitor's repo and try to do a merge request there too.
Comment 5 Nate Graham 2021-05-25 22:42:23 UTC
https://www.pling.com/p/1529282/ in particular looks great to me. Maybe you can switch out those bar charts on bottom for line charts, so that you can see the charge over time?
Comment 6 David 2021-05-25 22:57:48 UTC
(In reply to Nate Graham from comment #5)
> https://www.pling.com/p/1529282/ in particular looks great to me. Maybe you
> can switch out those bar charts on bottom for line charts, so that you can
> see the charge over time?

They actually are line charts, but I've dumb enough to take screenshots when no variations occurred :)
Comment 7 Nate Graham 2021-05-25 23:01:12 UTC
LOL

JFYI the repo is at https://invent.kde.org/plasma/plasma-systemmonitor/