Legend

Note The Waterfall chart has no legend.
<legend visible="Boolean" mode="string">
    <style>
    <title>
    <layout>
    <extraInfo>
Attribute Type or Value Description
visible Boolean Specifies whether the legend is displayed in the chart
mode Color|Size|ColorAndSize Only used in Bubble charts
Element Description
<style> The style of a legend has the following properties:
  • <border>, which defines the border thickness and color
  • <background>, which defines the background color
  • <font>, which defines legend font properties (size, face, italic, bold, strikethrough, underline, and RGB color)
  • <alignment>, which defines the text alignment (horizontal, vertical, and text policy). The text policy can be Wrap, NoWrap or Truncate.
<title> Defines the same properties as a chart title. See Title.
<layout> Attributes:
  • groupByDimension (Boolean)
  • symbolSize, whose value range is [4, 32]
  • location (Top|Bottom|Left|Right)
  • orientation (Auto|Horizontal|Vertical)
  • spacing, whose value range is [0, 8]
  • adjust (Boolean)
If adjust is true, then horizontal and vertical proportionalities can be defined. Their possible types are:
  • Auto. No value has to be set.
  • Fixed, which defines a value in unit
  • Proportional, which defines a ratio whose range is [0.0, 1.0] with a step of 0.01
<extraInfo>
Note For BoxPlot, TreeMap, PieWithDepth, Bubble, PolarBubble, and TagCloud charts only.

The visible Boolean attribute specifies whether additional information is displayed in the legend.

The <font> child element defines font properties of additional information (size, face, italic, bold, strikethrough, underline, and RGB color).

Example

<legend visible="true">
    <style>
        <border thickness="None">
            <color rgb="#000000" alpha="0"/>
        </border>
        <background>
            <color rgb="#000000" alpha="0"/>
        </background>
        <font size="12" face="Helvetica" italic="true" bold="true" strikethrough="false" underline="false" rgb="#00c7ff"/>
        <alignment horizontal="Left" vertical="Center" textPolicy="Wrap"/>
    </style>
    <title visible="true">
        <style>
            <border thickness="None">
                <color rgb="#000000" alpha="255"/>
            </border>
            <background>
                <color rgb="#000000" alpha="0"/>
            </background>
            <font size="6" face="Tahoma" italic="false" bold="true" strikethrough="false" underline="true" rgb="#00ff00"/>
            <alignment horizontal="Left" vertical="Center" textPolicy="Truncate"/>
        </style>
        <label dataType="String">="Legend Title"</label>
        <layout orientation="Auto" spacing="2"/>
    </title>
    <layout groupByDimension="false" symbolSize="7" location="Right" orientation="Auto" spacing="4" adjust="true">
        <horizontalProportionality type="Fixed">3.25</horizontalProportionality>
        <verticalProportionality type="Proportional">0.33</verticalProportionality>
    </layout>
    <extraInfo visible="true"> 
        <font size="8" face="Arial" italic="false" bold="true" strikethrough="false" underline="false" rgb="#707070"/> 
    </extraInfo>
</legend>