libxlsxwriter
Data Fields
lxw_chart_layout Struct Reference

Struct to represent Excel chart element layout dimensions. More...

Detailed Description

Excel supports manual positioning of elements such as the chart axis labels, the chart legend, the chart plot area and the chart title. The lxw_chart_layout struct represents the layout dimension for these elements.

The layout units used by Excel are relative units expressed as a percentage of the chart dimensions and are double values in the range 0.0 < x <= 1.0. Excel calculates these dimensions as shown below:

chart_layout.png

With reference to the above figure the layout units are calculated as follows:

Data Fields

double x
 
double y
 
double width
 
double height
 

Field Documentation

double lxw_chart_layout::x

The x offset in the range 0.0 < x <= 1.0

double lxw_chart_layout::y

The y offset in the range 0.0 < y <= 1.0

double lxw_chart_layout::width

The width of the plotarea or legend in the range 0.0 < x <= 1.0

double lxw_chart_layout::height

The height of the plotarea or legend in the range 0.0 < x <= 1.0