It is currently April 25th, 2024, 5:44 pm
Help making Histogram or graph
-
- Posts: 6
- Joined: January 22nd, 2017, 7:43 am
- Location: India
Help making Histogram or graph
I am making an Android Nougat like suite . I need to make a battery skin for settings which shows a histogram or graph (whatever it is ) from the last time when battery was charged or full till now. Is it possible ? If yes then how ?
You do not have the required permissions to view the files attached to this post.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
-
- Posts: 6
- Joined: January 22nd, 2017, 7:43 am
- Location: India
Re: Help making Histogram or graph
No no, I think you misunderstood me . I know I can create a battery histogram but it only displays current percent and moves on. I want to make one that starts from 100 and decreases as battery percent reduces. I don't want it to move .
BTW thanks for your kind reply .
-
- Rainmeter Sage
- Posts: 16169
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help making Histogram or graph
Something like this?
To can use this code, you have to calculate the UpdateDivider value of the [MeterBatteryLine] meter. Be careful, this option is now empty, but you have to enter something there. Theoretically it's easy to calculate what value should you use. When the battery is fully charged, you'll see the lifetime of it, as the second value, after the charging percentage. Transform this into seconds. The UpdateDivider value of the [MeterBatteryLine] meter should be one hundredth of this "total" lifetime. Divide the lifetime with 100 and enter what you get (again, as UpdateDivider value of the [MeterBatteryLine] meter). But this value depends on many things (like the processor, the battery, the load of the computer), so you'll have to experiment a bit to find out the best value, around the previously got value.
Code: Select all
[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=80,80,80,160
SkinWidth=100
SkinHeight=75
[MeasurePosition]
Measure=Calc
Formula=( Clamp (( MeasurePosition + 1 ), 0, 100 ))
UpdateDivider=-1
[MeasureBatteryLifetime]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Lifetime
[MeasureBatteryPercent]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
[MeterBatteryLine]
Meter=Line
MeasureName=MeasureBatteryPercent
X=([MeasurePosition]-98)
Y=0
W=100
H=50
LineCount=1
LineColor=140,252,124,255
;SolidColor=0,0,0,255
AntiAlias=1
DynamicVariables=1
UpdateDivider=
OnUpdateAction=[!UpdateMeasure "MeasurePosition"][!Redraw]
[MeterBattery]
MeasureName=MeasureBatteryPercent
MeasureName2=MeasureBatteryLifetime
Meter=STRING
X=50
Y=52
Padding=15,5,15,5
FontColor=220,220,220
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTER
AntiAlias=1
Text=%1% %2
Last edited by balala on January 23rd, 2017, 3:36 pm, edited 1 time in total.
-
- Posts: 6
- Joined: January 22nd, 2017, 7:43 am
- Location: India
Re: Help making Histogram or graph
Well I am not 100℅ sure that this is what I wanted. I can't try this now. But I will try when I get free. Hope it helps.balala wrote:Something like this?To can use this code, you have to calculate the UpdateDivider value of the [MeterBatteryLine] meter. Be careful, this option is now empty, but you have to enter something there. Theoretically it's easy to calculate what value should you use. When the battery is fully charged, you'll see the lifetime of it, as the second value, after the charging percentage. Transform this into seconds. The UpdateDivider value of the [MeterBatteryLine] meter should be one hundredth of this "total" lifetime. Divide the lifetime with 100 and enter what you get (again, as UpdateDivider value of the [MeterBatteryLine] meter). But this value depends on many things (like the processor, the battery, the load of the computer), so you'll have to experiment a bit to find out the best value, around the previously got value.Code: Select all
[Rainmeter] Update=1000 BackgroundMode=2 SolidColor=80,80,80,160 SkinWidth=100 SkinHeight=75 [MeasurePosition] Measure=Calc Formula=( MeasurePosition + 1 ) UpdateDivider=-1 [MeasureBatteryLifetime] Measure=Plugin Plugin=PowerPlugin PowerState=Lifetime [MeasureBatteryPercent] Measure=Plugin Plugin=PowerPlugin PowerState=Percent [MeterBatteryLine] Meter=Line MeasureName=MeasureBatteryPercent X=([MeasurePosition]-98) Y=0 W=100 H=50 LineCount=1 LineColor=140,252,124,255 ;SolidColor=0,0,0,255 AntiAlias=1 DynamicVariables=1 UpdateDivider= OnUpdateAction=[!UpdateMeasure "MeasurePosition"][!Redraw] [MeterBattery] MeasureName=MeasureBatteryPercent MeasureName2=MeasureBatteryLifetime Meter=STRING X=50 Y=52 Padding=15,5,15,5 FontColor=220,220,220 FontSize=8 FontFace=Segoe UI StringStyle=BOLD StringAlign=CENTER AntiAlias=1 Text=%1% %2
Thanks for replying.
-
- Rainmeter Sage
- Posts: 16169
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help making Histogram or graph
Me too. Just let me know if it did.NiketanG wrote:Well I am not 100℅ sure that this is what I wanted. I can't try this now. But I will try when I get free. Hope it helps.
-
- Rainmeter Sage
- Posts: 16169
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help making Histogram or graph
In the meantime I updated the Formula option of the [MeasurePosition] measure in my previous post. Please use the new formula.
-
- Posts: 6
- Joined: January 22nd, 2017, 7:43 am
- Location: India
Re: Help making Histogram or graph
I haven't tried with new code of measure position but the previous code helped. Yeah it was working but not fully as i wanted. I would play with it and experiment so I can find a way.balala wrote:In the meantime I updated the Formula option of the [MeasurePosition] measure in my previous post. Please use the new formula.
Let me make it simple, I just want a graph of how the battery percent went from 100 to current percent.
If I can't find any other way to do it, I will do it as you told. It's very close to what i wanted.
Thanks again for taking time to help a dumb that even dont knows how to explain his problem properly .
-
- Rainmeter Sage
- Posts: 16169
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help making Histogram or graph
And what my code does? Not exactly this?NiketanG wrote:Let me make it simple, I just want a graph of how the battery percent went from 100 to current percent.
-
- Posts: 6
- Joined: January 22nd, 2017, 7:43 am
- Location: India
Re: Help making Histogram or graph
Yeah off course it does as I wanted. But I have to play around to make it exactly as I want.balala wrote:And what my code does? Not exactly this?
Last edited by NiketanG on January 24th, 2017, 6:50 pm, edited 1 time in total.