]> git.imager.perl.org - imager-graph.git/commitdiff
- round the pie radius down to avoid running over the edge of the
authorTony Cook <tony@develop-help.com>
Mon, 21 Apr 2008 08:57:27 +0000 (08:57 +0000)
committerTony Cook <tony@develop-help.com>
Mon, 21 Apr 2008 08:57:27 +0000 (08:57 +0000)
   image

 - changed the pie maxsegments default to 0.01 from 0.05

 - removed the obsolete pie blur style information

 - documented some of the pie chart specific style settings

 - changed the default drop shadow style to a translucent fill so the
   background can show through.

Changes
Graph.pm
lib/Imager/Graph/Pie.pm
testimg/t10_hlegend.png
testimg/t10_lin_fount.png

diff --git a/Changes b/Changes
index 0965c96923dc9b02f67e606936cc2ad30c556d9d..26a3870fdc09a5ad068747839b438bb47cb83e07 100644 (file)
--- a/Changes
+++ b/Changes
@@ -21,6 +21,15 @@ Imager-Graph 0.06 - unreleased
  - round the pie radius down to avoid running over the edge of the
    image
 
+ - changed the pie maxsegments default to 0.01 from 0.05
+
+ - removed the obsolete pie blur style information
+
+ - documented some of the pie chart specific style settings
+
+ - changed the default drop shadow style to a translucent fill so the
+   background can show through.
+
 Imager-Graph 0.05 - 17 December 2007
 =================
 
index 68d938a2df391e3623f8bb8d198fd10e47ccfe15..2aa2c77c18b23677c60e576035ed0ab38380fe39 100644 (file)
--- a/Graph.pm
+++ b/Graph.pm
@@ -657,7 +657,7 @@ my %style_defs =
              pconlyformat  => sub { sprintf "%.1f%%", $_[0] },
             },
    dropshadow => {
-                  fill    => '404040',
+                  fill    => { solid => Imager::Color->new(0, 0, 0, 96) },
                   off     => 'scale(0.4,text.size)',
                   offx    => 'lookup(dropshadow.off)',
                   offy    => 'lookup(dropshadow.off)',
index 72c832207b07abe8846d09dfb59d7f9db4928607..b9aa3dbd1fe14aa9f4a2b119f89c517aaeb4c307 100644 (file)
@@ -87,6 +87,59 @@ the pie is given a drop shadow.
 
 =back
 
+=head1 PIE CHART STYLES
+
+The following style values are specific to pie charts:
+
+Controlling callouts, the C<callout> option:
+
+=over
+
+=item *
+
+color - the color of the callout line and the callout text.
+
+=item *
+
+font, size - font and size of the callout text
+
+=item *
+
+outside - the distance the radial callout line goes outside the pie
+
+=item *
+
+leadlen - the length of the horizontal callout line from the end of
+the radial line.
+
+=item *
+
+gap - the distance between the end of the horizontal callout line and
+the label.
+
+=item *
+
+inside - the length of the radial callout line within the pie.
+
+=back
+
+The outline, line option controls the color of the pie segment
+outlines, if enabled with the C<outline> feature.
+
+Under C<pie>:
+
+=over
+
+=item *
+
+maxsegment - any segment below this fraction of the total of the
+segments will be put into the "others" segment.  Default: 0.01
+
+=back
+
+The top level C<otherlabel> setting controls the label for the
+"others" segment, default "(others)".
+
 =head1 EXAMPLES
 
 Assuming:
@@ -481,16 +534,11 @@ sub _style_defs {
 
   my %work = %{$self->SUPER::_style_defs()};
   $work{otherlabel} = "(others)";
-  $work{features}{pieblur} = 1;
   $work{pie} = 
     {
-     blur => { 
-              type=>'conv',
-              coef=>[0.05, 0.1, 0.3, 1, 0.3, 0.1, 0.05]
-             },
      guessfactor=>0.6,
      size=>0.8,
-     maxsegment=> 0.05,
+     maxsegment=> 0.01,
     };
 
   \%work;
index 7844d2f937c9047ffcb66822ab30f380261584b5..e0789bce429f87fe75ddb4d4366f3ec5f9e6dc35 100644 (file)
Binary files a/testimg/t10_hlegend.png and b/testimg/t10_hlegend.png differ
index b93620d320150369993572bcfb6b2e2ded5575f7..80d1b99aa838ea7f77e07a055bf3a725b01ad609 100644 (file)
Binary files a/testimg/t10_lin_fount.png and b/testimg/t10_lin_fount.png differ