in reply to Chart::Clicker Question
#!/usr/bin/perl use strict; use warnings; use Chart::Clicker; use Chart::Clicker::Context; use Chart::Clicker::Data::DataSet; use Chart::Clicker::Data::Marker; use Chart::Clicker::Data::Series; use Chart::Clicker::Renderer::Bar; use Geometry::Primitive::Rectangle; use Graphics::Color::RGB; my $cc = Chart::Clicker->new(width => 500, height => 250); my $series = Chart::Clicker::Data::Series->new( keys => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], values => [ 4, 5.6, 7.9, 9, 13, 17, 23, 35, 46, 50 ], ); my $ds = Chart::Clicker::Data::DataSet->new(series => [$series]); $cc->add_to_datasets($ds); my $def = $cc->get_context('default'); my $area = Chart::Clicker::Renderer::Bar->new(opacity => .6); $area->brush->width(3); $def->renderer($area); $def->range_axis->tick_values([qw(1 3 5)]); $def->range_axis->label('Scores'); $def->range_axis->format('%d'); $def->domain_axis->tick_values([qw(2 4 6 8 10)]); $def->domain_axis->label('Survey Questions'); $def->domain_axis->format('%d'); $def->domain_axis->fudge_amount(.05); $cc->title->text('Dynamic Charting: Survey 1 - Front En +d '); $cc->title->font->size(20); $cc->title->padding->bottom(10); $cc->write_output('Dynamic Charting: Survey 1.png');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Chart::Clicker Question
by Perobl (Beadle) on Oct 30, 2010 at 14:49 UTC | |
by Khen1950fx (Canon) on Oct 31, 2010 at 00:19 UTC | |
by Perobl (Beadle) on Oct 31, 2010 at 15:17 UTC | |
by Anonymous Monk on Oct 31, 2010 at 15:29 UTC | |
by Perobl (Beadle) on Oct 31, 2010 at 16:41 UTC | |
|