Browse files

move pie & candlestick

  • Loading branch information...
1 parent 5e82ba7 commit befde56bff25c0e7cba1253cf5e1fe80ed89e070 @gphat committed Nov 26, 2009
Showing with 6 additions and 22 deletions.
  1. 0 { → candlestick}/candlestick.pl
  2. +6 −22 { → pie}/pie.pl
  3. BIN pie/pie.png
View
0 candlestick.pl → candlestick/candlestick.pl
File renamed without changes.
View
28 pie.pl → pie/pie.pl
@@ -10,7 +10,7 @@
use Geometry::Primitive::Rectangle;
use Graphics::Color::RGB;
-my $cc = Chart::Clicker->new(width => 500, height => 400, format => 'pdf');
+my $cc = Chart::Clicker->new(width => 300, height => 250, format => 'png');
my $series1 = Chart::Clicker::Data::Series->new(
keys => [ 1, 2, 3 ],
@@ -24,37 +24,21 @@
keys => [ 1, 2, 3],
values => [ 1, 1, 0 ],
);
-$cc->background_color(
- Graphics::Color::RGB->new(red => .95, green => .94, blue => .92)
-);
-
-$cc->border->width(0);
-my $grey = Graphics::Color::RGB->new(
- red => .36, green => .36, blue => .36, alpha => 1
-);
-my $moregrey = Graphics::Color::RGB->new(
- red => .71, green => .71, blue => .71, alpha => 1
-);
-my $orange = Graphics::Color::RGB->new(
- red => .88, green => .48, blue => .09, alpha => 1
-);
-$cc->color_allocator->colors([ $grey, $moregrey, $orange ]);
-$cc->legend->font->family('Hoefler Text');
+$cc->title->text('Pie');
+$cc->title->padding->bottom(5);
my $ds = Chart::Clicker::Data::DataSet->new(series => [ $series1, $series2, $series3 ]);
$cc->add_to_datasets($ds);
my $defctx = $cc->get_context('default');
my $pie = Chart::Clicker::Renderer::Pie->new;
-$pie->brush->width(6);
-$pie->border_color(Graphics::Color::RGB->new(red => .95, green => .94, blue => .92));
+$pie->brush->width(3);
+$pie->border_color(Graphics::Color::RGB->new(red => 1, green => 1, blue => 1));
$defctx->renderer($pie);
$defctx->domain_axis->hidden(1);
$defctx->range_axis->hidden(1);
$cc->plot->grid->visible(0);
-$cc->legend->font->size(16);
-$cc->draw;
-$cc->write('foo.pdf');
+$cc->write_output('pie.png');
View
BIN pie/pie.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit befde56

Please sign in to comment.