Ask a Question related to PERL Modules, Design and Development.
-
Peter Hickman #1
ANNOUNCE: Graph::Timeline and Graph::Timeline::GD 1.0
Graph::Timeline - Render timeline data
This document refers to verion 0.1 of Graph::Timeline, released November
11, 2003
This class takes a list of events and processes them so that they can
be rendered in various graphical formats by subclasses of this class.
The purpose of this class is to organise the data that will be used to
render a timeline. Events fall into two types. Intervals, which has a
start and an end. For example Albert Einstein was born on 1879/03/14
and died on 1955/04/18, this would be stored as an interval. His works
were publicly burned by the Nazi's on 1933/05/10 for being 'of un-German
spirit', I guess being Jewish didn't help either. So this event would be
marked as a point.
You feed events into the class using add_interval( ) and add_point( ),
then use window( ) to select which events you want to render and then
call data( ) to get the relevant events. This last bit will be done in
the subclass.
This document refers to verion 0.1 of Graph::Timeline::GD, released
November 11, 2003
This subclass produces the GD object of the timeline. The user has to
subclass from this class if they want a GD rendering of the timeline
data. By overriding the render_year( ) and render_interval( ) methods
the user can supply a less garish and more pleasing display.
use Graph::Timeline::GD;
my $x = Graph::Timeline::GD->new();
while ( my $line = <> ) {
chomp($line);
my ( $label, $start, $end, $group ) = split ( ',', $line );
$x->add_interval( label => $label, start => $start, end => $end,
group => $group );
}
$x->window(start=>'1900/01/01', end=>'1999/12/31');
open(FILE, '>test.png');
binmode(FILE);
print FILE $x->render( border => 2, pixelsperyear => 35 );
close(FILE);
Some sample data is also available.
Peter Hickman Guest
-
Timeline not available
On trying to add timeline in DW8 I get the following message: The function addTimeline() is currently unavailable. Do I need to install or download... -
Graph.0.69 Module---how to get a DAG from graph with cycles
Here I use an example to illustrate the problem I met when using Graph Theory Module: I have a directed graph looks like the following (see the... -
Timeline
I cannot find the Timeline panel in the Window menu of Dreamweaver MX 2004. I checked the application's online help and I could not find a single... -
GD::Graph - how to get rid of leading gap in line graph?
Is there a way to get rid of the leading gap to the left of a line graph? Therefore, I want the graph line to start on the Y-axis, not the... -
Proposed new module Graph::Timeline
I am currently looking to create a Graph::Timeline module (similar in some respects to Image::Timeline) that would allow rendering timelines as...



Reply With Quote

