Hypatia-Chart-Clicker
view release on metacpan or search on metacpan
414243444546474849505152535455565758596061t/sqlite/options/axis/range.t
t/sqlite/options/axis/show_ticks.t
t/sqlite/options/axis/skip_range.t
t/sqlite/options/axis/staggered.t
t/sqlite/options/axis/tick_label_angle.t
t/sqlite/options/axis/tick_label_color.t
t/sqlite/options/axis/ticks.t
t/sqlite/options/background_color.t
t/sqlite/options/
format
.t
t/sqlite/options/height_width.t
t/sqlite/options/legend_position.t
t/sqlite/options/padding.t
t/sqlite/options/title_position.t
t/sqlite/pie.t
t/sqlite/pie_columns.t
t/sqlite/setup_guess_columns.t
t/sqlite/xy.t
t/sqlite/xy_columns.t
t/sqlite/xy_columns_dbh.t
t/sqlite/xy_dbh.t
t/sqlite/xy_multi_even.t
lib/Hypatia/Chart/Clicker/Options.pm view on Meta::CPAN
27282930313233343536373839404142434445has
'format'
=>(
isa
=>Format,
is
=>
'ro'
,
default
=>
"PNG"
);
has
"width"
=>(
isa
=>PositiveInt,
is
=>
"ro"
,
default
=>500);
has
'height'
=>(
isa
=>PositiveInt,
is
=>
'ro'
,
default
=>300);
#TODO: Legend options
has
'legend_position'
=>(
isa
=>Position,
is
=>
'ro'
,
default
=>
"south"
);
has
"padding"
=>(
isa
=>Padding,
is
=>
"ro"
,
coerce
=>1,
default
=>
sub
{ Graphics::Primitive::Insets->new({
top
=>3,
bottom
=>3,
right
=>3,
left
=>3}) });
#has "title"=>(isa=>"TitleOptions", is=>"ro", coerce=>1, default=>sub{ Hypatia::Chart::Clicker::Options::Title->new });
has
"title_position"
=>(
isa
=>Position,
is
=>
"ro"
,
default
=>
"north"
);
lib/Hypatia/Chart/Clicker/Options.pm view on Meta::CPAN
127128129130131132133134135136137138139140141142143144145146147A L<Graphics::Color::RGB> object that, unsurprisingly, controls the color of the background. The
default
is white.
=head2 format
A string: one of C<png>, C<pdf>, C<ps>, or C<svg>. The default is C<png>.
=head2 width,height
The width and height of the resulting image. The defaults are 500 and 300, respectively.
=head2 legend_position
One of C<north>, C<west>, C<east>, C<south>, or C<center>. The default is C<south>.
=head2 padding
A L<Graphics::Primitive::Insets> object representing the amount of padding (in pixels) for each of the sides of the chart. You may also pass in either a hash reference (with keys of C<top>, C<bottom>, C<right>, and C<left> having positive integer val...
=head2 title_position
One of C<north>, C<west>, C<east>, C<south>, or C<center>. The default is C<north>.
t/sqlite/options/legend_position.t view on Meta::CPAN
2021222324252627282930313233343536373839404142my
@positions
=
qw(north south east west center North South East West Center)
;
foreach
my
$position
(
@positions
)
{
my
$hypatia
=Hypatia->new({
dbi
=>{
dbh
=>
$hdts
->dbh,
table
=>
"hypatia_test_xy"
},
columns
=>{
x
=>
"x1"
,
y
=>
"y1"
},
back_end
=>
"Chart::Clicker"
,
graph_type
=>
"Line"
,
options
=>{
legend_position
=>
$position
}
});
isa_ok(
$hypatia
,
"Hypatia"
);
my
$cc
=
$hypatia
->chart;
isa_ok(
$cc
,
"Chart::Clicker"
);
ok(
$cc
->legend_position eq
$position
);
}
done_testing();
( run in 0.279 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )