in reply to How to use Perl to assign different fill colors to columns in the same series of an Excel chart?
my @colors = ('#ED7D31', '#4472C4', '#00B050'); for my $series (1 .. 3) { my $from = 12 * $series - 10; my $to = $series * 12 + 1; $chart->add_series( name => '=C!$B$1', # Not sure about this one. categories => '=C!$A$' . $from . ':$A$' . $to, values => '=C!$B$' . $from . ':$B$' . $to, fill => {color => $colors[ $series - 1 ]}, data_labels => {value => 1}, gap => 40, ); }
|
---|