in reply to How to creata a Line Graph

Take a look at Chart::OFC. It uses a free flash widget that you feed a data file to. Chart::OFC creates that data file. There is a presentation that shows some basic usage. Also, here is some code for a line chart:
use warnings; use strict; use Chart::OFC; my ( @data1, @data2, @data3 ); for ( 1 .. 1200 ) { push @data3, 1 + int( rand(7) ); push @data2, 8 + int( rand(6) ); push @data1, 14 + int( rand(6) ); } my $chart = Chart::OFC::Grid->new( title => 'Many data lines', title_style => '{font-size: 20px; color: #736AFF}', datasets => [ Chart::OFC::Dataset::Line->new( values => \@data1, width => 2, color => '#9933CC', label => 'Page Views', text_size => 10, ), Chart::OFC::Dataset::LineWithDots->new( values => \@data2, solid_dots => 1, width => 3, color => '#CC3399', label => 'Downloads', text_size => 10, dot_size => 5, ), Chart::OFC::Dataset::LineWithDots->new( values => \@data3, solid_dots => 0, width => 2, color => '#80a033', label => 'Bounces', text_size => 10, dot_size => 4, ), ], x_axis => Chart::OFC::XAxis->new( labels => [ qw(January February March April May June July August September October November December) ], axis_label => '', orientation => 'horizontal', label_steps => 2, ), y_axis => Chart::OFC::YAxis->new( axis_label => Chart::OFC::AxisLabel->new( label => 'Open Flash Chart', text_size => 12, text_color => '#736AFF', ), min => 0, max => 20, label_steps => 5, ), ); print $chart->as_ofc_data();

Replies are listed 'Best First'.
Re^2: How to creata a Line Graph
by azaragoza (Acolyte) on Sep 17, 2008 at 14:26 UTC
    I tried running this code on Win32 XP and got the following: E:\PerlGraphs>perl E:\PerlGraphs\OFCChart.pl &title=Many data lines,{ {font-size: 20px; color: #736AFF} }& &x_legend=,20,#000000& &x_labels=January,February,March,April,May,June,July,August,September,October,November,D ember& &x_label_style=10,#784016,0,2& &y_legend=Open Flash Chart,12,#736AFF& &y_label_style=10,#784016& &y_ticks=5,10,4& &y_min=0& &y_max=20& &line=2,#9933CC,Page Views,10& &values=15,15,18,18,17,15,14,14,18,19,15,16,14,14,14,16,18,16,16,14,19,18,15,16,16,19,15 8,16,18,18,16,19,18,16,14,17,17,14,15,18,15,19,15,14,14,19,17,16,15,17,19,14,15,16,16,18 9,16,15,16,17,19,18,15,14,14,14,19,19,18,16,19,18,16,15,16,19,18,14,18,18,19,16,18,17,14 5,16,19,18,14,18,19,14,15,15,17,15,17,18,17,16,14,18,14,14,19,17,18,14,19,17,18,17,18,17 5,17,15,14,15,16,15,14,15,17,17,17,14,17,17,17,16,14,18,18,15,17,15,19,19,16,19,17,19,19 8,18,14,19,19,19,16,14,18,17,16,14,16,16,17,17,15,16,14,15,16,14,17,16,15,16,18,18,17,16 4,16,15,14,17,18,16,17,19,19,18,19,17,17,15,19,14,14,15,17,15,15,17,15,16,18,17,14,16,18 5,14,14,18,14,16,19,16,16,18,16,19,14,14,15,14,16,19,18,16,15,17,17,19,17,14,14,16,18,14 6,18,14,15,17,19,14,15,14,19,19,19,15,17,16,16,16,17,19,16,17,14,15,19,14,19,16,18,19,16 9,14,14,18,14,15,18,17,19,17,17,19,14,18,17,15,19,19,14,17,15,16,14,14,18,19,15,15,19,16 6,17,17,15,14,16,18,17,15,14,15,17,18,19,16,16,18,19,14,18,15,16,16,17,19,15,15,17,16,15 8,17,18,14,19,18,17,19,18,19,15,17,18,19,19,16,18,17,16,15,18,16,18,18,17,17,18,18,19,15 8,19,16,14,18,17,14,16,15,15,14,15,16,18,19,17,17,17,14,14,16,14,18,14,17,16,18,19,17,19 7,19,19,19,14,18,18,19,15,18,17,15,19,17,14,18,15,14,18,15,19,15,16,18,17,15,19,15,19,14 8,19,14,16,14,18,18,14,15,15,17,16,15,18,14,18,14,18,16,16,16,17,18,14,15,16,17,18,18,16 9,17,16,18,14,16,19,15,15,16,18,15,14,14,18,15,14,19,18,16,15,17,17,19,16,17,19,17,18,19 5,15,15,17,14,18,17,15,18,15,19,16,14,18,17,18,17,18,16,15,18,14,19,17,14,19,15,16,14,19 5,14,17,19,19,15,14,14,19,19,16,19,15,14,17,18,15,18,18,19,14,14,17,18,14,16,16,19,18,16 8,14,16,18,19,14,14,17,18,17,17,15,14,15,16,18,14,14,19,18,17,15,14,15,14,19,15,17,19,14 7,14,17,14,19,14,16,18,17,19,17,18,18,18,16,19,14,17,14,15,16,16,19,17,14,19,18,18,17,14 6,15,18,16,19,18,17,15,15,15,14,19,14,17,15,18,15,16,15,17,18,17,17,17,17,14,18,18,18,17 5,19,17,16,17,16,16,18,14,15,18,14,14,16,17,19,19,16,14,15,14,17,15,17,19,14,16,17,15,17 Any ideas?
      That's what you want to see :) Just write that to a data file (or serve it dynamically) to a file linked to by the OFC Flash object.