Wrong axis used for major/minor unit in _write_cat_val_axis of Excel::Writer::XLSX::Chart

17 views
Skip to first unread message

Carey

unread,
Feb 8, 2012, 5:17:44 PM2/8/12
to Spreadsheet::WriteExcel
John,
_write_cat_val_axis is pulling the y axis major/minor units instead
of those for the x axis. In my scatter graph, where one axis (y) has a
range of 5-10 and the other axis (y) has a range of 0.3-1, this causes
the axis scaling to be completely wrong.

I changed (lines 1746 - 1750):

# Write the c:majorUnit element.
$self->_write_c_major_unit( $y_axis->{_major_unit} );

# Write the c:minorUnit element.
$self->_write_c_minor_unit( $y_axis->{_minor_unit} );

to:

# Write the c:majorUnit element.
$self->_write_c_major_unit( $x_axis->{_major_unit} );

# Write the c:minorUnit element.
$self->_write_c_minor_unit( $x_axis->{_minor_unit} );

to fix the issue in my local copy.

Regards,
Carey

jmcnamara

unread,
Feb 8, 2012, 6:16:36 PM2/8/12
to Spreadsheet::WriteExcel


On Feb 8, 10:17 pm, Carey <carey.dr...@gmail.com> wrote:
> John,
>   _write_cat_val_axis is pulling the y axis major/minor units instead
> of those for the x axis. In my scatter graph, where one axis (y) has a
> range of 5-10 and the other axis (y) has a range of 0.3-1, this causes
> the axis scaling to be completely wrong.

Hi Carey,

That looks like a bug alright. I'll look into it.

Thanks,

John.
--

jmcnamara

unread,
Feb 10, 2012, 4:05:57 AM2/10/12
to Spreadsheet::WriteExcel


On Feb 8, 10:17 pm, Carey <carey.dr...@gmail.com> wrote:
> John,
>   _write_cat_val_axis is pulling the y axis major/minor units instead
> of those for the x axis. In my scatter graph, where one axis (y) has a
> range of 5-10 and the other axis (y) has a range of 0.3-1, this causes
> the axis scaling to be completely wrong.

Hi Carey,

I fixed and tested this in Excel::Writer::XLSX version 0.46.

http://search.cpan.org/~jmcnamara/Excel-Writer-XLSX/

If you encounter any other issues let me know.

Regards,

John.
--


Reply all
Reply to author
Forward
0 new messages