It is currently March 29th, 2024, 2:17 am

HDD pie graph text "wrapping"

Get help with creating, editing & fixing problems with skins
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

HDD pie graph text "wrapping"

Post by StArL0rd84 »

pie.png
I have made a hard drive pie chart based on balala's example code he posted here:
https://forum.rainmeter.net/viewtopic.php?p=111684#p111684

It works really well and it makes it easy to get a overview of all the drives connected to the system.
But the suite i made it for is two toned, so i can't color code it like this example shows, and just have the drives listed in the middle.

No, I need the text's x and y to stick to an imaginary ring around the bar graph, at the halfway point for the corresponding slice of pie, like the C: and D: drive does in the example image.
I did set the C: and D: drive x and y manually just to show you what i mean.

I am almost certain that the measures in the skin can be used in the calculations, but my math kung-fu was not stong enough to figure it out.

I tried different things like the rotate measure and straight calc measures to no avail.
So i am jut hoping i can snag one of you math guru's to help me out here.
Took a lot of courage to ask for help, and i hope you understand my question.
HDDcircleGraph_1.rmskin

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Variables]
Color1=60,242,24
Color2=80,160,240
Color3=220,60,90
Color4=220,250,30
Color5=255,255,255

PieSize=200
LineStart=(#PieSize#/2)-10

Drive1=C
Drive2=D
Drive3=J
Drive4=X



[mDriveUsed1]
Measure=FreeDiskSpace
Drive=#Drive1#:
InvertMeasure=1
IgnoreRemovable=0
[mDriveUsed2]
Measure=FreeDiskSpace
Drive=#Drive2#:
InvertMeasure=1
IgnoreRemovable=0
[mDriveUsed3]
Measure=FreeDiskSpace
Drive=#Drive3#:
InvertMeasure=1
IgnoreRemovable=0
[mDriveUsed4]
Measure=FreeDiskSpace
Drive=#Drive4#:
InvertMeasure=1
IgnoreRemovable=0



[mDriveFree1]
Measure=FreeDiskSpace
Drive=#Drive1#:
IgnoreRemovable=0
[mDriveFree2]
Measure=FreeDiskSpace
Drive=#Drive2#:
IgnoreRemovable=0
[mDriveFree3]
Measure=FreeDiskSpace
Drive=#Drive3#:
IgnoreRemovable=0
[mDriveFree4]
Measure=FreeDiskSpace
Drive=#Drive4#:
IgnoreRemovable=0
[mTotalFree]
Measure=Calc
Formula=( mDriveFree1 + mDriveFree2 + mDriveFree3 + mDriveFree4 )



[mPercent1]
Measure=Calc
Formula=( mDriveUsed1 / ( mDriveUsed1 + mDriveUsed2 + mDriveUsed3 + mDriveUsed4 + mTotalFree ))

[mPercent2]
Measure=Calc
Formula=( mDriveUsed2 / ( mDriveUsed1 + mDriveUsed2 + mDriveUsed3 + mDriveUsed4 + mTotalFree ))

[mPercent3]
Measure=Calc
Formula=( mDriveUsed3 / ( mDriveUsed1 + mDriveUsed2 + mDriveUsed3 + mDriveUsed4 + mTotalFree ))

[mPercent4]
Measure=Calc
Formula=( mDriveUsed4 / ( mDriveUsed1 + mDriveUsed2 + mDriveUsed3 + mDriveUsed4 + mTotalFree ))

[mPercent5]
Measure=Calc
Formula=( mTotalFree / ( mDriveUsed1 + mDriveUsed2 + mDriveUsed3 + mDriveUsed4 + mTotalFree ))



[mPercent1%]
Measure=Calc
Formula=( 100 * mPercent1 )

[mPercent2%]
Measure=Calc
Formula=( 100 * mPercent2 )

[mPercent3%]
Measure=Calc
Formula=( 100 * mPercent3 )

[mPercent4%]
Measure=Calc
Formula=( 100 * mPercent4 )

[mPercent5%]
Measure=Calc
Formula=( 100 * mPercent5 )





[MeterNumber1]
Meter=Roundline
MeasureName=mPercent1
X=100
Y=100
W=#PieSize#
H=#PieSize#
StartAngle=0
RotationAngle=6.283
LineStart=#LineStart#
LineLength=(#PieSize#/2)
LineColor=#Color1#
Solid=1
AntiAlias=1
DynamicVariables=1

[MeterNumber2]
Meter=Roundline
MeasureName=mPercent2
X=r
Y=r
W=#PieSize#
H=#PieSize#
StartAngle=(2*PI*[mPercent1])
RotationAngle=6.283
LineStart=#LineStart#
LineLength=(#PieSize#/2)
LineColor=#Color2#
Solid=1
AntiAlias=1
DynamicVariables=1

[MeterNumber3]
Meter=Roundline
MeasureName=mPercent3
X=r
Y=r
W=#PieSize#
H=#PieSize#
StartAngle=(2*PI*([mPercent1]+[mPercent2]))
RotationAngle=6.283
LineStart=#LineStart#
LineLength=(#PieSize#/2)
LineColor=#Color3#
Solid=1
AntiAlias=1
DynamicVariables=1

[MeterNumber4]
Meter=Roundline
MeasureName=mPercent4
X=r
Y=r
W=#PieSize#
H=#PieSize#
StartAngle=(2*PI*([mPercent1]+[mPercent2]+[mPercent3]))
RotationAngle=6.283
LineStart=#LineStart#
LineLength=(#PieSize#/2)
LineColor=#Color4#
Solid=1
AntiAlias=1
DynamicVariables=1

[MeterNumber5]
Meter=Roundline
MeasureName=mPercent5
X=r
Y=r
W=#PieSize#
H=#PieSize#
StartAngle=(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]))
RotationAngle=6.283
LineStart=#LineStart#
LineLength=(#PieSize#/2)
LineColor=#Color5#,100
Solid=1
AntiAlias=1
DynamicVariables=1





[MeterString1]
MeasureName=mPercent1%
Meter=STRING
X=320
Y=220
FontColor=#Color1#
SolidColor=0,0,0
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
NumOfDecimals=0
AntiAlias=1
Text=#Drive1#: %1%
DynamicVariables=1

[MeterString2]
MeasureName=mPercent2%
Meter=STRING
X=265
Y=300
FontColor=#Color2#
SolidColor=0,0,0
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
NumOfDecimals=0
AntiAlias=1
Text=#Drive2#: %1%
DynamicVariables=1

[MeterString3]
MeasureName=mPercent3%
Meter=STRING
X=200
Y=180
FontColor=#Color3#
SolidColor=0,0,0
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
NumOfDecimals=0
AntiAlias=1
Text=#Drive3#: %1%
DynamicVariables=1

[MeterString4]
MeasureName=mPercent4%
Meter=STRING
X=0r
Y=4R
FontColor=#Color4#
SolidColor=0,0,0
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
NumOfDecimals=0
AntiAlias=1
Text=#Drive4#: %1%
DynamicVariables=1

[MeterString5]
MeasureName=mPercent5%
Meter=STRING
X=0r
Y=4R
FontColor=#Color5#,130
SolidColor=0,0,0
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
NumOfDecimals=0
AntiAlias=1
Text=Free %1%
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HDD pie graph text "wrapping"

Post by balala »

StArL0rd84 wrote:Took a lot of courage to ask for help
Don't have to. Feel free to ask anytime you have questions.
StArL0rd84 wrote:and i hope you understand my question.
Yep, we (I) did.
The only things you have to alter are the X and Y options of the String meters.
First please add a Dist variable into the [Variables] section. This will be the distance between the outer edge of the rings and the shown percentages:

Code: Select all

[Variables]
...
Dist=10
Then make the following modification to the X and Y options of the String meters, accordingly:

Code: Select all

[MeterString1]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((25+#PieSize#/2)*Cos(2*PI*([mPercent1]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((25+#PieSize#/2)*Sin(2*PI*([mPercent1]/2))))
...

[MeterString2]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((25+#PieSize#/2)*Cos(2*PI*([mPercent1]+[mPercent2]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((25+#PieSize#/2)*Sin(2*PI*([mPercent1]+[mPercent2]/2))))
...

[MeterString3]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((25+#PieSize#/2)*Cos(2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((25+#PieSize#/2)*Sin(2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2))))
...

[MeterString4]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((25+#PieSize#/2)*Cos(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((25+#PieSize#/2)*Sin(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2))))
...

[MeterString5]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((25+#PieSize#/2)*Cos(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((25+#PieSize#/2)*Sin(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2))))
...
As I believe you've figured it out, you don't have to modify any other options, just these.
Definitely there are some others things we can alter furtherly, in order to make the code even better, this is just a start. Please test it and let me know what do you think.
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: HDD pie graph text "wrapping"

Post by StArL0rd84 »

balala wrote:As I believe you've figured it out, you don't have to modify any other options, just these.
Definitely there are some others things we can alter furtherly, in order to make the code even better, this is just a start. Please test it and let me know what do you think.
Oh wow, Thank you balala.
It works so well!
Figured out the Dist variable was the margin around the circle, nice one.
pie 2.png
What else did you have in mind?
You do not have the required permissions to view the files attached to this post.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HDD pie graph text "wrapping"

Post by balala »

I'm really sorry, there is a small mistake in my previously posted options. I added the Dist variable, but didn't use it in the X and Y options. Instead I used a distance of 25 (this was the distance I worked with at the beginning, then forgot to modify it). So, please replace once again the same options with the following ones:

Code: Select all

[MeterString1]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((#Dist#+#PieSize#/2)*Cos(2*PI*([mPercent1]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((#Dist#+#PieSize#/2)*Sin(2*PI*([mPercent1]/2))))
...

[MeterString2]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((#Dist#+#PieSize#/2)*Cos(2*PI*([mPercent1]+[mPercent2]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((#Dist#+#PieSize#/2)*Sin(2*PI*([mPercent1]+[mPercent2]/2))))
...

[MeterString3]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((#Dist#+#PieSize#/2)*Cos(2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((#Dist#+#PieSize#/2)*Sin(2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2))))
...

[MeterString4]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((#Dist#+#PieSize#/2)*Cos(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((#Dist#+#PieSize#/2)*Sin(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2))))
...

[MeterString5]
...
X=([MeterNumber1:X]+[MeterNumber1:W]/2+((#Dist#+#PieSize#/2)*Cos(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2))))
Y=([MeterNumber1:Y]+[MeterNumber1:H]/2+((#Dist#+#PieSize#/2)*Sin(2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2))))
...
But I'm glad if you got it working as you want.
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: HDD pie graph text "wrapping"

Post by StArL0rd84 »

balala wrote:I'm really sorry, there is a small mistake in my previously posted options. I added the Dist variable, but didn't use it in the X and Y options. But I'm glad if you got it working as you want.
No worries, i'm just really happy you came to my rescue.
It really spiced up the look of the UI in my suite.
Thanks again balala.
hdd_UI.png
You do not have the required permissions to view the files attached to this post.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HDD pie graph text "wrapping"

Post by balala »

I'm happy to help.
StArL0rd84 wrote:What else did you have in mind?
Another thing I'd do would be to rotate the strings to have them parallelly with the ring. I admit this isn't a too easy thing, but definitely can be done, using transformation matrices.
If you're interested, add the following options to the meters, accordingly:

Code: Select all

[MeterString1]
...
TransformationMatrix=(Cos(-PI/2-2*PI*([mPercent1]/2)));(-Sin(-PI/2-2*PI*([mPercent1]/2)));(Sin(-PI/2-2*PI*([mPercent1]/2)));(Cos(-PI/2-2*PI*([mPercent1]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI/2-2*PI*([mPercent1]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI/2-2*PI*([mPercent1]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI/2-2*PI*([mPercent1]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI/2-2*PI*([mPercent1]/2))))

[MeterString2]
...
TransformationMatrix=(Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]/2)));(-Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]/2)));(Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]/2)));(Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]/2))))

[MeterString3]
...
TransformationMatrix=(Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)));(-Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)));(Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)));(Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2))))

[MeterString4]
...
TransformationMatrix=(Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)));(-Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)));(Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)));(Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2))))

[MeterString5]
...
TransformationMatrix=(Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)));(-Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)));(Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)));(Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2))))
Again: don't modify the existing options, just add these ones.
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: HDD pie graph text "wrapping"

Post by StArL0rd84 »

balala wrote:I'm happy to help.
Another thing I'd do would be to rotate the strings to have them parallelly with the ring. I admit this isn't a too easy thing, but definitely can be done, using transformation matrices.
Damn son. that certainly looks interesting.
Mind blown.
But, not really practical with upside down text and all, hehe.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HDD pie graph text "wrapping"

Post by balala »

StArL0rd84 wrote:But, not really practical with upside down text and all, hehe.
Yes, this is right, I think.
It could be modified to have the strings rotated in a way to not have them so.
Immediately will try to come back with a such solution...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HDD pie graph text "wrapping"

Post by balala »

This?

Code: Select all

[MeterString1]
...
TransformationMatrix=(Cos(-PI*([mPercent1]<0.5)-PI/2-2*PI*([mPercent1]/2)));(-Sin(-PI*([mPercent1]<0.5)-PI/2-2*PI*([mPercent1]/2)));(Sin(-PI*([mPercent1]<0.5)-PI/2-2*PI*([mPercent1]/2)));(Cos(-PI*([mPercent1]<0.5)-PI/2-2*PI*([mPercent1]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI*([mPercent1]<0.5)-PI/2-2*PI*([mPercent1]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI*([mPercent1]<0.5)-PI/2-2*PI*([mPercent1]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI*([mPercent1]<0.5)-PI/2-2*PI*([mPercent1]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI*([mPercent1]<0.5)-PI/2-2*PI*([mPercent1]/2))))

[MeterString2]
...
TransformationMatrix=(Cos(-PI*(([mpercent1]+[mPercent2]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]/2)));(-Sin(-PI*(([mpercent1]+[mPercent2]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]/2)));(Sin(-PI*(([mpercent1]+[mPercent2]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]/2)));(Cos(-PI*(([mpercent1]+[mPercent2]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI*(([mpercent1]+[mPercent2]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI*(([mpercent1]+[mPercent2]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI*(([mpercent1]+[mPercent2]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI*(([mpercent1]+[mPercent2]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]/2))))

[MeterString3]
...
TransformationMatrix=(Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)));(-Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)));(Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)));(Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]/2))))

[MeterString4]
...
TransformationMatrix=(Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)));(-Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)));(Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)));(Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]/2))))

[MeterString5]
...
TransformationMatrix=(Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)));(-Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)));(Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)));(Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)));(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)-(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2))));(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)+(([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2)*Sin(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)))-(([#CURRENTSECTION#:Y]+[#CURRENTSECTION#:H]/2)*Cos(-PI*(([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2)<0.5)-PI/2-2*PI*([mPercent1]+[mPercent2]+[mPercent3]+[mPercent4]+[mPercent5]/2))))
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: HDD pie graph text "wrapping"

Post by StArL0rd84 »

Had to go to bed.
Will try new code tomorrow.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))