All Default

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );


print $dash->as_HTML();

A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


Striped Reports

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_first_row( '#f0fff0' );
$dash->set_odd_row(   '#fffacd' );
$dash->set_even_row(  style => 'font-style: italic' );
$dash->set_last_row(  '#e0ffff' );

print $dash->as_HTML();

A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


Striped Columns

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_even_col( '#bfefff' );
$dash->set_last_col( style => 'font-size: xx-small; color: red' );

print $dash->as_HTML();

A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


Cell Triggers (triggered on 3rd column)

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_cell_low( 3, sub { my ( $x ) = @_; $x < 4 }, 'lime' );
$dash->set_cell_med( 3, sub { my ( $x ) = @_; $x >=4 }, 'yellow' );
$dash->set_cell_hi(  3, sub { my ( $x ) = @_; $x > 7 }, 
                     style => 'background-color: red; font-weight: bold' );

print $dash->as_HTML();

A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


Row Triggers

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_row_low( sub { my ( $r ) = @_; $r->[1]%3 || $r->[3]>4 }, 'lime' );
$dash->set_row_hi(  sub { my ( $r ) = @_; $r->[3]>7 }, 'red' );

print $dash->as_HTML();

A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


Column Triggers

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_col_low( 1, sub { my ( $x ) = @_; $x < 4 }, 'lime' );

print $dash->as_HTML();

A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


Triggers blend with stripes

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_row_hi( sub { $_[0]->[1] % 2 == 1 }, style => 'color: red' );

print $dash->as_HTML();

A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


But Triggers Clobber each other

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_row_low( sub { $_[0]->[1]%2 }, 'lime' );
$dash->set_col_med( 1, sub { $_[0] == 8 }, 'yellow' );
$dash->set_cell_hi( 1, sub { $_[0]>=4 && $_[0]<5 }, 'red' );
$dash->set_cell_hi( 3, sub { $_[0]>4 && $_[0]<5 }, 'red' );

print $dash->as_HTML();

A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


Captions

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_captions( 'First Col', 'A Number', 'String', 'Some Float', 'Name' );

print $dash->as_HTML();

First ColA NumberStringSome FloatName
A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo


View

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_view( 4, 1, 3 );

print $dash->as_HTML();

smith03.12
smith16.22
smith23.16
allan37.12
allan43.47
joedo54.18
joedo63.13
joedo77.15
joedo82.42


Simple Sort (Numeric sort on 3rd column)

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_sort( sub { my ( $x, $y ) = @_; $x->[3] <=> $y->[3] } );

print $dash->as_HTML();

I8blo2.42joedo
A0foo3.12smith
G6gzi3.13joedo
C2gzx3.16smith
E4bnk3.47allan
F5hue4.18joedo
B1bar6.22smith
D3baz7.12allan
H7fct7.15joedo


Fancy Sort (First on Names, then reverse on numbers)

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_sort( sub { my ( $x, $y ) = @_; 
		       $x->[4] cmp $y->[4] || $y->[1] <=> $x->[1] } );

print $dash->as_HTML();

E4bnk3.47allan
D3baz7.12allan
I8blo2.42joedo
H7fct7.15joedo
G6gzi3.13joedo
F5hue4.18joedo
C2gzx3.16smith
B1bar6.22smith
A0foo3.12smith


Simple Format (Truncate float to single digit)

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_format( 3, sub { my ( $x ) = @_; sprintf( "%.1f", $x ) } );

print $dash->as_HTML();

A0foo3.1smith
B1bar6.2smith
C2gzx3.2smith
D3baz7.1allan
E4bnk3.5allan
F5hue4.2joedo
G6gzi3.1joedo
H7fct7.2joedo
I8blo2.4joedo


Collate (Glue column 0 and 1 together, suppress column 0 through view)

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_view( 1, 2, 3, 4 );
$dash->set_collate( 1, sub { my ( @r ) = @_; $r[0] . '-' . $r[1] } );

print $dash->as_HTML();

A-0foo3.12smith
B-1bar6.22smith
C-2gzx3.16smith
D-3baz7.12allan
E-4bnk3.47allan
F-5hue4.18joedo
G-6gzi3.13joedo
H-7fct7.15joedo
I-8blo2.42joedo


Pagination

$dash = HTML::Dashboard->new();
$dash->set_data_without_captions( $data );

$dash->set_pagesize( 5 );

$dash->set_captions( 'First Col', 'A Number', 'String', 'Some Float', 'Name' );
$dash->set_table( style => 'margin-bottom: 1em' );

print $dash->as_HTML( 0 );

print $dash->as_HTML( 1 );

First ColA NumberStringSome FloatName
A0foo3.12smith
B1bar6.22smith
C2gzx3.16smith
D3baz7.12allan
E4bnk3.47allan
First ColA NumberStringSome FloatName
F5hue4.18joedo
G6gzi3.13joedo
H7fct7.15joedo
I8blo2.42joedo