Hi All, im drawing a chart mountain but result image seems to be correct if i got an array with correct number while if i got array with several 0 value, xscale is composed by duplicated 0 and 1 values and also negative values like -0, -1, -2. i would like that my scale start from 0 and values not repeted in xscale. i tried to use option 'start' without any result. package that i'm using is Chart-2.4.1. here is my code.
#!/usr/bin/perl use Chart::Mountain; $filename = $ARGV[0]; $popname = $ARGV[1]; $g = Chart::Mountain->new(1000,500); $g->add_datafile( "$filename", set ); %hash = ( 'title' => 'Video Server Play Daily Hourly Report', 'grid_lines' => 'true', 'misc' => [0,0,0], 'y_label' => 'Numero Streams', 'include_zero' => 'true', 'x_ticks' => 'vertical', 'precision' => '0', @labels = ($popname) ); $g->set (%hash); $g->set('colors' => {'dataset0' => [0,255,0]}); $g->set ('legend_labels' => \@labels); $g->set ('tick_label_font' => (GD::Font->Giant)); $g->set ('title_font' => (GD::Font->Giant)); $g->jpeg ("$filename.jpeg");
In reply to Draw chart by lorenzob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |