Chart-Clicker

 view release on metacpan or  search on metacpan

lib/Chart/Clicker/Axis/DivisionType/LinearExpandGraph.pm  view on Meta::CPAN

            $nice = 10;
        }
    } else {
        if($f <= 1) {
            $nice = 1;
        } elsif($f <= 2) {
            $nice = 2;
        } elsif($f <= 5) {
            $nice = 5;
        } else {
            $nice = 10;
        }
    }

    return $nice * (10 ** $exp);
}

 	

sub _log10 {
    my $n = shift;
    return log($n) / log(10);
}

no Moose;
1;

__END__

=pod

=head1 NAME

Chart::Clicker::Axis::DivisionType::LinearExpandGraph

=head1 VERSION

version 2.90

=head1 SYNOPSIS

  use Chart::Clicker::Axis;

  my $axis = Chart::Clicker::Axis->new({
    tick_division_type  => 'LinearRounded'
  });

=head1 DESCRIPTION

Role describing how to divide data for Chart::Clicker::Axis.

=head1 NAME

Chart::Clicker::Axis::DivisionType::LinearRounded - Nicely rounded segments on a linear scale.

=head1 ATTRIBUTES

=head2 tick_slop

This setting determines whether to add a tick outside of the data. If the tick would be
within the percentage of a ticks size specified here as a decimal (10% would be 0.1), then
the tick will be added expanding the graph.

=head1 METHODS

=head2 best_tick_size

The tick division considered best for the approximate number of ticks requested
and data within the range.

=head2 divvy

Divides the range up into nicely rounded chunks for L<Chart::Clicker::Axis>.

=head1 AUTHOR

Rod Taylor <chartclicker@rbt.ca>

=head1 SEE ALSO

perl(1)

=head1 LICENSE

You can redistribute and/or modify this code under the same terms as Perl
itself.

=head1 AUTHOR

Cory G Watson <gphat@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Cory G Watson.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut



( run in 2.739 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )