diff --git a/lib/Excel/Writer/XLSX/Chart.pm b/lib/Excel/Writer/XLSX/Chart.pm index 14c7e3d57..68021069c 100644 --- a/lib/Excel/Writer/XLSX/Chart.pm +++ b/lib/Excel/Writer/XLSX/Chart.pm @@ -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. @@ -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' ); } diff --git a/lib/Excel/Writer/XLSX/Chart/Bar.pm b/lib/Excel/Writer/XLSX/Chart/Bar.pm index 46464a87c..770b94b1b 100644 --- a/lib/Excel/Writer/XLSX/Chart/Bar.pm +++ b/lib/Excel/Writer/XLSX/Chart/Bar.pm @@ -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; }