);
},
'markers|m=s',
+ 'graph-format=s' => sub {
+ $opt{'graph-format'} = substr $_[1], 0, 1;
+ },
'spark:s' => sub {
$opt{spark} = [split //, $_[1] || '⎽▁▂▃▄▅▆▇█'];
},
$opt{width} ||= $ENV{COLUMNS} || 80;
$opt{color} //= -t *STDOUT; # enable on tty
+$opt{'graph-format'} //= '-';
$opt{trim} *= $opt{width} / 100 if $opt{trimpct};
$opt{units} = [split //, ' kMGTPEZYyzafpnμm'] if $opt{'human-readable'};
$opt{anchor} //= qr/\A/;
}
my $line = $lines[$nr] =~ s/\n/$val/r;
printf '%-*s', $len + length($val), $line;
- print $barmark[$_] // '-' for 1 .. $size && (($values[$nr] || 0) - $minval) * $size + .5;
+ print $barmark[$_] // $opt{'graph-format'} for 1 .. $size && (($values[$nr] || 0) - $minval) * $size + .5;
say '';
}
continue {
All input is still counted and analyzed for statistics,
but disregarded for padding and bar size.
+=item --graph-format=<character>
+
+Glyph to repeat for the graph line.
+Defaults to a dash C<->.
+
=item -m, --markers=
Statistical positions to indicate on bars.