]> ruin.nu Git - ndwebbie.git/commitdiff
fewer x values
authorMichael Andreen <harv@ruin.nu>
Sat, 27 Jan 2007 21:27:31 +0000 (21:27 +0000)
committerMichael Andreen <harv@ruin.nu>
Sat, 27 Jan 2007 21:27:31 +0000 (21:27 +0000)
ND/Web/Graph.pm

index 61f4fc2d7a2803482945bd4ff14d09effd5fe786..3f52b06b462ea1eccc3a9c216df92be5465012f9 100644 (file)
@@ -52,7 +52,7 @@ sub graphFromQuery {
                }
 
        }
-       $graph_settings{x_label_skip} = int((scalar @{$fields[0]}) / 10);
+       $graph_settings{x_label_skip} = int(1+(scalar @{$fields[0]}) / 10);
 
        my $graph = GD::Graph::lines->new($x,$y);
        $graph->set_legend(@{$query->{NAME}}[1..$fields]) or die $graph->error;