void legend_shift(char *legend);
void legend_shift(char *legend)
{
- if (!legend) { return; }
+ if (!legend || !legend[0]) { return; }
memmove(legend+2,legend,strlen(legend));
legend[0]=' ';
legend[1]=' ';
dprintf("YAXIS : %i\n",gdp->yaxisidx);
dprintf("=================================\n");
+ /* shift the legend by 2 spaces for the "coloured-box"*/
+ legend_shift(gdp->legend);
+
/* check that vidx is of type VDEF */
if (gdp->vidx != -1 && im->gdes[gdp->vidx].gf != GF_VDEF) {
rrd_set_error("Using vname %s of wrong type in line %s\n",