Chart2/ChartLegendResize
From Apache OpenOffice Wiki
< Chart2
Contents
Summary
Allow to customize the size of a legend within a chart.
Rationale
Use cases
Users want to be able to resize the legend within charts.
Alternatives considered
Maybe attribute style:legend-expansion-aspect-ratio should be deprecated or removed. The attribute is superfluous when introducing the size attributes. Only reason to keep it is backwards compatibility.
Proposed changes to the ODF Standard
Text changes/additions
Add a section 19.573.X svg:width - <chart:legend>
19.573.X svg:width - <chart:legend> The svg:width attribute defines the width of a legend.
Add a section 19.541 svg:height - <chart:legend>
19.541 svg:height - <chart:legend> The svg:height attribute defines the height of a legend.
In section 19.492 style:legend-expansion change the description of value custom:
19.492 style:legend-expansion The style:legend-expansion attribute specifies the direction in which a legend expands. The defined values for the style:legend-expansion attribute are: balanced: legend expands horizontally and vertically. custom: the size of the legend is given by attributes svg:width and svg:height. high: legend expands vertically. wide: legend expands horizontally.
Schema changes/additions
Add optional attributes svg:width and svg:height to the <chart:legend> element:
<define name="chart-legend-attlist"> <interleave> <choice> <group> <attribute name="chart:legend-position"> <choice> <value>start</value> <value>end</value> <value>top</value> <value>bottom</value> </choice> </attribute> <optional> <attribute name="chart:legend-align"> <choice> <value>start</value> <value>center</value> <value>end</value> </choice> </attribute> </optional> </group> <attribute name="chart:legend-position"> <choice> <value>top-start</value> <value>bottom-start</value> <value>top-end</value> <value>bottom-end</value> </choice> </attribute> <empty/> </choice> <ref name="common-draw-position-attlist"/> <ref name="common-draw-size-attlist"/> <choice> <attribute name="style:legend-expansion"> <choice> <value>wide</value> <value>high</value> <value>balanced</value> </choice> </attribute> <group> <attribute name="style:legend-expansion"> <value>custom</value> </attribute> <attribute name="style:legend-expansion-aspect-ratio"> <ref name="double"/> </attribute> </group> <empty/> </choice> <optional> <attribute name="chart:style-name"> <ref name="styleNameRef"/> </attribute> </optional> </interleave> </define>
Impacts
Conformance
No impact.
Backwards compatibility
No impact.
Accessibility impact
No impact.