TK::GraphMan - A scrolling Windows Task Manager style grid/graph chart
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();
Tk
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.
-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')
Begin scrolling the chart. The chart scrolls to the left, just like the Windows Task Manager chart.
Stop scrolling the chart.
Plot a number stored in $data scalar on the chart. Value will be added to the right-side of the chart.
Plot a list of numbers stored in @data array on the chart. Values will be added to the right-side of the chart.
Brett Carroll, <bcarroll@cpan.org>
To install Tk::GraphMan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::GraphMan
CPAN shell
perl -MCPAN -e shell install Tk::GraphMan
For more information on module installation, please visit the detailed CPAN module installation guide.