]> granicus.if.org Git - sysstat/commitdiff
SVG: Display time as xx:00 instead of xxH when oneday option used
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 23 Dec 2017 16:47:19 +0000 (17:47 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 23 Dec 2017 16:47:19 +0000 (17:47 +0100)
Timestamps were displayed as 0H 2H ... 22H for graphs created with a
command like "sadf -g -O oneday...".
They are now displayed as 0:00 2:00 ... 22:00

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
svg_stats.c

index 96f3d1d5d8ef7f6256bee8ce793cec6d2b3fdea1..b9506622ce3ca88ff77d20aa17885aa47b8c5a34 100644 (file)
@@ -686,8 +686,8 @@ void display_vgrid(long int xpos, double xfactor, int v_gridnr, struct svg_parm
                 */
                if (DISPLAY_ONE_DAY(flags) && (rectime.tm_min == 0)) {
                        printf("<text x=\"%ld\" y=\"15\" style=\"fill: white; stroke: none; font-size: 14px; "
-                              "text-anchor: start\">%2dH</text>\n",
-                              (long) (xpos * j * xfactor) - 8, rectime.tm_hour);
+                              "text-anchor: start\">%2d:00</text>\n",
+                              (long) (xpos * j * xfactor) - 15, rectime.tm_hour);
                }
                else {
                        printf("<text x=\"%ld\" y=\"10\" style=\"fill: white; stroke: none; font-size: 12px; "