Guest User

Untitled

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