Sometimes, when all the selected activities have only zero values and
the skipempty option has been used with "sadf -g", the "No data" message
is displayed instead of the graphs.
In these conditions make sure that it doesn't get printed over the table
of contents entries.
Here is how to reproduce the problem on my system (I don't have any
network filesystems):
$ sadf -g -O showtoc,skipempty -- -n NFS,NFSD > output.svg
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
if (!(action & F_BEGIN)) {
if (!hdr_parm->graph_nr) {
/* No views displayed */
- printf("<text x= \"0\" y=\"60\" text-anchor=\"start\" stroke=\"red\">");
+ printf("<text x= \"0\" y=\"%d\" text-anchor=\"start\" stroke=\"red\">",
+ SVG_H_YSIZE +
+ SVG_C_YSIZE * (DISPLAY_TOC(flags) ? hdr_parm->nr_act_dispd : 0));
printf("No data!</text>\n");
}
/* Give actual SVG height */