The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

TK::GraphMan - A scrolling Windows Task Manager style grid/graph chart

SYNOPSIS

  use Tk;
  use Tk::GraphMan;
  my $main = new MainWindow();
  my $grid1 = $main->GraphMan( -interval => 250 )->pack();
  $grid1->Tk::GraphMan::start();
  #do something to generate numeric data for graphing to the chart...
  $grid1->Tk::GraphMan::data(100); #add an integer to the graph's timeline, in scalar context
  # or ...
  $grid1->Tk::GraphMan::data_array(35,36,37,38,39,40,38,36,33); #add an integer to the graph's timeline, in array context
  $main->MainLoop();

REQUIRES

  Tk

DESCRIPTION

A scrolling Windows Task Manager style grid/graph chart. This is a Tk::Canvas widget that has the look and feel of the Windows Task Manager grid/graph chart.

WIDGET-SPECIFIC OPTIONS

  -bgcolor
  Specify the background color of the chart.  (Default is 'black')

  -grid_color
  Specify the vertical and horizontal grid line colors of the chart.  (Default is '#008040')

  -data_color
  Color of the data being displayed plotted on the chart.  (Default is 'green')

  -interval(milliseconds)
  This options determines how frequently to scroll the chart.

  -height
  Sets the height of the chart, in pixels.  (Default is 100)

  -width
  Sets the width of the chart, in pixels.  (Default is 230)

  -data_title
  Name of the data being displayed.  This is only used when the -showvalues option is set to 'on'.  (Default is 'Data')

  -text_color
  Sets the text color of the -data_title option.  This is only used when the -showvalues option is set to 'on'.  (Default is 'white')

  -showvalues('on'|'off')
  This option toggles printing of the current value (value on the far right of the chart) on and off.  (Default is 'off')

  -centerline('on'|'off')
  This option toggles a line to be drawn horizontally in the center of the graph.  (Default is 'off')

  -centerline_color
  Sets the color of the centerline.  This is only used when the -centerline option is set to 'on'.  (Default is '#ff0000')

METHODS

start()

  Begin scrolling the chart.  The chart scrolls to the left, just like the Windows Task Manager chart.

stop()

  Stop scrolling the chart.

data($data)

  Plot a number stored in $data scalar on the chart.  Value will be added to the right-side of the chart.

data_array(@data)

  Plot a list of numbers stored in @data array on the chart.  Values will be added to the right-side of the chart.

AUTHOR

Brett Carroll, <bcarroll@cpan.org>