Fix text alignment in battery plot.

Now it also aligns correctly if a value is 100%.
This commit is contained in:
Andreas Bachlechner 2022-02-28 21:59:00 +01:00
parent 93672947e0
commit a6b3a2c265
1 changed files with 12 additions and 12 deletions

View File

@ -570,22 +570,22 @@ sub nut_cgi {
undef(@tmpz);
undef(@CDEF);
push(@tmp, "AREA:bchar#4444EE:Charge");
push(@tmp, "GPRINT:bchar:LAST: Cur\\: %4.1lf%%");
push(@tmp, "GPRINT:bchar:AVERAGE: Avg\\: %4.1lf%%");
push(@tmp, "GPRINT:bchar:MIN: Min\\: %4.1lf%%");
push(@tmp, "GPRINT:bchar:MAX: Max\\: %4.1lf%%\\n");
push(@tmp, "GPRINT:bchar:LAST:Cur\\:%5.1lf%%");
push(@tmp, "GPRINT:bchar:AVERAGE: Avg\\:%5.1lf%%");
push(@tmp, "GPRINT:bchar:MIN: Min\\:%5.1lf%%");
push(@tmp, "GPRINT:bchar:MAX: Max\\:%5.1lf%%\\n");
push(@tmp, "AREA:loadc#EE4444:Load capacity");
push(@tmp, "GPRINT:loadc:LAST: Cur\\: %4.1lf%%");
push(@tmp, "GPRINT:loadc:AVERAGE: Avg\\: %4.1lf%%");
push(@tmp, "GPRINT:loadc:MIN: Min\\: %4.1lf%%");
push(@tmp, "GPRINT:loadc:MAX: Max\\: %4.1lf%%\\n");
push(@tmp, "GPRINT:loadc:LAST:Cur\\:%5.1lf%%");
push(@tmp, "GPRINT:loadc:AVERAGE: Avg\\:%5.1lf%%");
push(@tmp, "GPRINT:loadc:MIN: Min\\:%5.1lf%%");
push(@tmp, "GPRINT:loadc:MAX: Max\\:%5.1lf%%\\n");
push(@tmp, "LINE1:bchar#0000EE");
push(@tmp, "LINE1:loadc#EE0000");
push(@tmp, "LINE2:mbatc#EEEE44:Shutdown level");
push(@tmp, "GPRINT:mbatc:LAST: Cur\\: %4.1lf%%");
push(@tmp, "GPRINT:mbatc:AVERAGE: Avg\\: %4.1lf%%");
push(@tmp, "GPRINT:mbatc:MIN: Min\\: %4.1lf%%");
push(@tmp, "GPRINT:mbatc:MAX: Max\\: %4.1lf%%\\n");
push(@tmp, "GPRINT:mbatc:LAST:Cur\\:%5.1lf%%");
push(@tmp, "GPRINT:mbatc:AVERAGE: Avg\\:%5.1lf%%");
push(@tmp, "GPRINT:mbatc:MIN: Min\\:%5.1lf%%");
push(@tmp, "GPRINT:mbatc:MAX: Max\\:%5.1lf%%\\n");
push(@tmpz, "AREA:bchar#4444EE:Charge");
push(@tmpz, "AREA:loadc#EE4444:Load");
push(@tmpz, "LINE2:mbatc#EEEE44:Shutdown level");