Skip to content

Commit

Permalink
Improvements to charts to allow prettier waterfall charts; not well d…
Browse files Browse the repository at this point in the history
…ocumented or tested.
  • Loading branch information
f20 committed Nov 24, 2020
1 parent 0c8eea7 commit cb1cf2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/Excel/Writer/XLSX/Chart.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,9 @@ sub _get_gradient_properties {

$gradient->{_colors} = $args->{colors};

# Addition of gradient transparency by Franck.
$gradient->{_transparency} = $args->{transparency};

if ( $args->{positions} ) {

# Check the positions array has the right number of entries.
Expand Down Expand Up @@ -6620,7 +6623,10 @@ sub _write_a_gs_lst {

# Write the a:srgbClr element.
# TODO: Wait for a feature request to support transparency.
$self->_write_a_srgb_clr( $color );
$self->_write_a_srgb_clr( $color,
# Addition of gradient transparency by Franck.
$gradient->{_transparency} ? $gradient->{_transparency}[$i] : ()
);

$self->xml_end_tag( 'a:gs' );
}
Expand Down
3 changes: 2 additions & 1 deletion lib/Excel/Writer/XLSX/Chart/Bar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ sub combine {
my $self = shift;
my $chart = shift;

if (!$chart->{_is_secondary}) {
# Condition switched off by Franck
if ( 0 && !$chart->{_is_secondary}) {
carp 'Charts combined with Bar charts must be on a secondary axis';
return;
}
Expand Down

0 comments on commit cb1cf2d

Please sign in to comment.