in reply to Spreadsheet::WriteExcel::Chart y-axis behaving not as expected
I don't actually see any substantive difference between the two charts in Excel 2007. I think that you probably want to avoid writing a data series on the chart for the first row of each data array:
... if ($i > 1) { $chart->add_series( 'categories' => xl_range_formula( 'testRight', 1, 1, 1, 13 +), 'values' => xl_range_formula( 'testRight', $i, $i, 1, +13 ), 'name' => $_->[0], ); } ...
In which case the issue is more evident.
Unfortunately, what you are seeing is a results of Excel's automatic axis scaling. There isn't (and probably won't be) any way to override this with Spreadsheet::WriteExcel. It is intended as a feature in Excel::Writer::XLSX but even that is probably a few months off.
Update: Manual scaling is now supported in Excel::Writer::XLSX >= version 0.36.
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Spreadsheet::WriteExcel::Chart y-axis behaving not as expected
by jbrugger (Parson) on Sep 13, 2011 at 10:54 UTC |