From Apache OpenOffice Wiki
< Chart2
Revision as of 20:04, 7 February 2011 by Iha (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Specification Chart Legend

Specification Status
Author Ingrid Halama
Last Change 7. February 2011
Status (Help) Preliminary


The legend within charts can be resized now. The label text for trend lines was modified. A mean value will now be listed in the legend also. The symbol sizes have been adapted.


Reference Document Check Location (URL)
Prerequisites [passed/failed] n/a
Product Requirement, RFE, Issue ID (required) [available] i28670, i89539, i68029, i82802
Accessibility Check (required) See accessibility section for check list
Test case specification (required) [available/not available] <PLEASE ENTER LOCATION HERE>
IDL Specification [available/not available] <PLEASE ENTER LOCATION HERE>
Software Specification Rules n/a n/a


Role Name E-Mail Address
Developer Ingrid Halama iha at
Developer and Quality Assurance Regina Henschel regina at
Quality Assurance Thomas Klarhöfer kla at
Documentation Uwe Fischer ufi at
User Experience Frank Loehmann fl at

Acronyms and Abbreviations

Acronym / Abbreviation Definition
<WYSIWYG> <What You See Is What You Get>

Detailed Specification

Resizing the Legend

The legend within charts can be resized via the following standard ways. The standard 'Position and Size' dialog is available in the 'Format' menu and in the context menu of the selected legend. The controls in section 'Size' have been enabled. It is also possible to resize the legend with the mouse while holding the selection handles. If a legend entry does not fit into the resulting size it isn't shown at all. If there is space left it is equally spread between the different entries. The legend size is not allowed to exceed the chart size.

When the legend is resized or moved around via mouse or with the position and size dialog the following API properties are changed: Expansion is set to ::com::sun::star::chart::ChartLegendExpansion_CUSTOM and Alignment is set to ::com::sun::star::chart::ChartLegendPosition_NONE. When the automatic position of the legend is set to left or right the property Expansion is set to ::com::sun::star::chart::ChartLegendExpansion_HIGH. So the size will be determined automatically again. Similar when the automatic position of the legend is set to top or bottom the property Expansion is set to ::com::sun::star::chart::ChartLegendExpansion_WIDE.

Legend Keys

Legend keys representing areas are displayed by a rectangle. The size depends on the font height. If no lines are listed in the legend it is a square of 60% font height. If lines are displayed the rectangle is as wide as the legend keys representing the lines. Legend keys representing lines are at least 8mm wide, if 60% of the font height is wider, that size is taken. If dashed lines are displayed the keys are at least 1,6cm wide. Trend lines, mean values lines and stock chart lines are represented by a horizontal line in the legend.

Label Texts

Following strings are used within the legend to name trend lines and mean values:

Property Label Comment
Label for mean value lines: Mean (%SERIESNAME) The vaiable %SERIESNAME will be replaced by the series name.
Label for trend lines of linear regression type: Linear (%SERIESNAME) The vaiable %SERIESNAME will be replaced by the series name.
Label for trend lines of logarithmic regression type: Logarithmic (%SERIESNAME) The vaiable %SERIESNAME will be replaced by the series name.
Label for trend lines of exponential regression type: Exponential (%SERIESNAME) The vaiable %SERIESNAME will be replaced by the series name.
Label for trend lines of power regression type: Power (%SERIESNAME) The vaiable %SERIESNAME will be replaced by the series name.

Help | User Interface Element Templates | Example Spec


Accessibility is the responsibility of the I-Team, beginning with UX, DEV and QA, to ensure that the following requirements are fulfilled:

  1. Is the feature fully keyboard accessible?
    yes, via dilaog
  2. Have I specified visual alternatives for the case that the specified feature includes audio as output?
    does not apply
  3. Are text alternatives for all icons and graphics available?
    does not apply
  4. Don't provide important information in colors alone
    (Ex: marking important information hard coded in red)

    does not apply
  5. Does the specified feature respect system settings for font, size, and color for all windows and user interface elements?
    does not apply
  6. Have I ensured that flash rates do not exceed 2 hertz for blinking text, objects, or other elements? In any case, try to avoid flashing UI elements
    does not apply
  7. Ensure that assistive technology (AT) (like ZoomText or Orca) is able to read everything.


If you need help while designing, implementing or testing the accessibility of the UI, ask/visit:

  1. The accessibility check list at the Wiki
  2. (The accessibility mailing lists, preferred)
  3. For specific implementation details, architecture: (Malte Timmermann)
  4. For specific UX and testing questions: (Éric Savary)


No migration necessary.


No configuration involved.

Help | Configuration Table Template

File Format

Goal is to add attributes svg::width and svg::height to the element chart:legend together with attribute style:legend-expansion="custom". A change proposal will be send to OASIS.
As long as the new attributes are not available in the standard they are saved in a separate namespace as extended attribtues ooochart::width and ooochart::height. The feature is only exported with 'ODF Format version' set to '1.2 Extended'.

Help | File Format Table Template

Open Issues

  • Do not set the Alignment to set to ::com::sun::star::chart::ChartLegendPosition_NONE if only the position is changed.
  • When saving to ODf 1.0 choose a more suiteable ChartLegendPosition than ChartLegendPosition_NONE
  • maybe introduce a signal for the case that not all entries are shown in the legend?
  • Offer the properties legend expansion and alignment in the user interface - those are currently implicit set while setting the position
  • Think about redesign of the positioning page and dialog. Currently there are two different places for the legend placement - the positioning tab page in the legend properties and the position and size dialog.
Personal tools