Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/perl -w
- use strict;
- use Chart::Clicker;
- use Chart::Clicker::Axis::DateTime;
- use Chart::Clicker::Data::Series;
- use Chart::Clicker::Data::DataSet;
- use Chart::Clicker::Renderer::Point;
- my $cc = Chart::Clicker->new;
- my $series = Chart::Clicker::Data::Series->new(
- keys => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ],
- values => [ 42, 25, 86, 23, 2, 19, 103, 12, 54, 9 ],
- );
- my $ctx = $cc->get_context('default');
- $ctx->domain_axis(Chart::Clicker::Axis::DateTime->new(position => 'bottom', orientation => 'horizontal'));
- my $ds = Chart::Clicker::Data::DataSet->new(series => [ $series ]);
- $cc->add_to_datasets($ds);
- $cc->prepare();
- $cc->draw();
- $cc->write('foo.png');
Add Comment
Please, Sign In to add comment