plot_area layout is not written to resulting chart.xml
Hello run the following code, which I borrowed from issue 523:
from openpyxl import Workbook, load_workbook`
from openpyxl import chart
wb = Workbook()
ws = wb.active
rows = [
['Size', 'Batch 1', 'Batch 2'],
[2, 40, 30],
[3, 40, 25],
[4, 50, 30],
[5, 30, 25],
[6, 25, 35],
[7, 20, 40],
]
for row in rows:
ws.append(row)
ch = chart.ScatterChart()
ch.scatterStyle = "marker"
ch.title = "Scatter Chart"
ch.style = 13
ch.x_axis.title = 'Size'
ch.y_axis.title = 'Percentage'
xvalues = chart.Reference(ws, min_col=1, min_row=2, max_row=7)
for i in range(2, 4):
values = chart.Reference(ws, min_col=i, min_row=1, max_row=7)
series = chart.Series(values, xvalues, title_from_data=True)
ch.series.append(series)
ch.legend.layout=chart.layout.Layout(manualLayout=chart.layout.ManualLayout(yMode='edge', xMode='edge',x=0.1,y=1, h=0.2, w=0.2))
ch.plot_area.layout=chart.layout.Layout(manualLayout=chart.layout.ManualLayout(yMode='edge', xMode='edge',x=0.1,y=0.1, h=0.65, w=0.85))
ws.add_chart(ch, "A10")
wb.save("scatter.xlsx")
After running this code, change scatter.xlsx to scatter.zip. Then inspect the chart1.xml. You'll see that there is no layout specified for the plotarea.
Is this correct way to specify the layout for the plotarea? One thing that I did notice is that the layout for the legend is written to chart1.xml.