From Apache OpenOffice Wiki
Jump to: navigation, search


Specify the positioning of the plot area more precisely by allowing charts to be positioned within a defined rectangle ignoring the labels of the axes.


Use cases

ODF 1.2 defines a positioning rectangle for the <chart:plot-area> element with attributes svg:x, svg:y, svg:width and svg:height. The plot area is the coordinate system within a chart. The ODF specifications so far does not specify which parts of the coordinate system have to be within this rectangle and which not. So it is not exactly clear whether axis labels or axis titles or data point labels should be included or not. This uncertainty can cause interoperability problems.

As axis titles have their own positioning attributes they can be moved around independently and it makes not much sense to include them into the given rectangle for the coordinate systems. Same for data point labels. Different for the axis labels. At least two implementations of ODF do include the axis labels into the given positioning rectangle. It seems to make sense to specify this behavior for compatibility reasons.

But still axis labels have a great amount of uncertainty regarding their consumed space. There are several automatisms that allow for implementation dependent behavior and thus for different space consumption. There is demand for a more reliable positioning of the coordinate system for at least two use cases:

1) With proposal drawing_objects_in_charts additional drawing objects can be added to charts. It is desirable that the coordinate system can be placed at a defined fixed position thus it does not move in relation to those objects.

2) If multiple coordinate systems should be aligned with each other the user should be able to specify this once without the need to correct the alignment after each value change or font size change.

Alternatives considered

Proposed changes to the ODF Standard

Text changes/additions

Add a new section 11.x <chart:coordinate-region>:

 11.x <chart:coordinate-region>
 The <chart:coordinate-region> element defines the positioning rectangle of a coordinate system excluding axis labels,
 tick marks, titles and data labels that may lap out of the pure coordinate region.
 For pie and donut charts it defines the smallest bounding rectangle that can be drawn around the pie or donut ignoring all labels.   
 Where single data points have a chart:pie-offset greater zero those offset shall not contribute to an expansion of the
 coordinate-region; thus a pulled out pie segment is allowed to poke out of the coordinate region. A chart:pie-offset at the
 series element in contrast shall contribute to the coordinate region.
 The <chart:coordinate-region> element is usable with the following element: <chart:plot-area> 11.1.
 The <chart:coordinate-region> element has the following attributes: svg:height 19.541.2, svg:width 19.573.3,
 svg:x 19.575.1 and  svg:y 19.579.1.

Section 11.4 <chart:plot-area>: add the following paragraph to the description:

 The positioning attributes svg:x, svg:y, svg:width and svg:height at element <chart:plot-area> describe a rectangle
 that includes the axis labels but excludes axis titles and data labels.
 If an element <chart:coordinate-region> is present, the attributes svg:x, svg:y, svg:width and svg:height
 at the element <chart:plot-area> shall be ignored.
 If the attributes chart:auto-position and chart:auto-size within a chart style applied to the chart:plot-area have the value true,
 all positioning attributes including those within child element <chart:coordinate-region> shall be ignored.

and add new element <chart:coordinate-region> to the list of child elements.

Schema changes/additions

Add the new optional element <chart:coordinate-region> to <chart:plot-area>:

  <define name="chart-plot-area">
    <element name="chart:plot-area">
        <ref name="chart-plot-area-attlist"/>
            <ref name="chart-coordinate-region"/>
            <ref name="dr3d-light"/>
            <ref name="chart-axis"/>
            <ref name="chart-series"/>
            <ref name="chart-stock-gain-marker"/>
            <ref name="chart-stock-loss-marker"/>
            <ref name="chart-stock-range-line"/>
            <ref name="chart-wall"/>
            <ref name="chart-floor"/>

Add the define for the new element <chart:coordinate-region> and its attributes:

  <define name="chart-coordinate-region">
    <element name="chart:coordinate-region">
        <ref name="chart-coordinate-region-attlist"/>
  <define name="chart-coordinate-region-attlist" combine="interleave">
    <ref name="common-draw-position-attlist"/>
    <ref name="common-draw-size-attlist"/>



No impact.

Backwards compatibility

See description.

Accessibility impact

No impact.

Personal tools