Text::BarGraph - Text Bar graph generator

      use Text::BarGraph;

      $graph = Text::BarGraph->new();

    A module to create text bar graphs

    This module takes as input a hash, where the keys are labels for bars on
    a graph and the values are the magnitudes of those bars.

      $graph = Text::BarGraph->new();

      %hash = (
        alpha => 30,
        beta  => 40,
        gamma => 25

      print $g->graph(\%hash);

          $graph = Text::BarGraph->new();

        The constructor.

          $graph_text = $graph->graph(\%data);

        Return a graph of the data in the supplied hash. The keys in the
        hash are labels, and the values are the magnitudes.


        Set the character used in the graph.

        Default: #


        Whether to display the numerical value of each bar

        Default: 1


        Set what to use to sort the graph. Valid values are "data" and
        "key". Key sorts by the bar's label, data sorts by the bar's

        Default: key


        Whether to sort bar labels as strings or numerically. Valid values
        are "string" and "numeric". This option is ignored when sorting by

        Default: string


        Sets the initial value (far left) of the graph. Ignored if autozero
        is set. When zero is non-zero, an extra row will be printed to
        identify the minimum value.

        Default: 0


        Automatically choose the initial value (far left) of the graph.
        Overrides any value set with *zero*.

        Default: 0


        Forces the end of the graph (right side) to be larger than the
        maximum value in the graph. If the supplied value is less than the
        maximum value, it will be ignored.

        Default: 0


        Set the number of columns to use when displaying the graph. This
        value is ignored if autosize is used.

        Default: 80


        Automatically determine the size of the display. Only works if
        Term::ReadKey is installed and a terminal is detected. Otherwise,
        the value set by *columns* is used.

        Default: 1


        Whether to use ANSI color on the bargraph. Uses Term::ANSIColor if
        it is present.

        Default: 0

    Kirk Baucom 

    Copyright (c) 2011 Kirk Baucom. All rights reserved. This package is
    free software; you can redistribute it and/or modify it under the same
    terms as Perl itself.