A5.chart.guides.annotationDefinition Legend Object
Description
The definition of a legend annotation.
Discussion
The "legend" annotation can be used to add legend to the chart. A legend label will be drawn for each group in the chart (see A5.chart Definition Map Object), and will consist of a marker and label. The default label HTML will be the group name. A marker will be drawn that uses the color assigned to the group. See A5.chart Rect Layer Object, A5.chart Polar Layer Object, A5.chart Linear Layer Object and A5.chart Radial Layer Object "colors" setting for details.
Properties
- locationstringobject
The location of the legend. See A5.chart Definition Location Object.
- alignstring
How to align the legend relative to the location. Values can be "center", "above", "below", "before", "after", "adj-above", "adj-below", "adj-before" and "adj-after". Multiple alignments can be applied by combining values using spaces (for example "above after"). The "adj" prefix will make the given alignment occur after the rotation (if any) has been applied.
- rotatenumber
The rotation (in degrees) to apply to the text.
- offsetobject
The offset of the legend.
- majornumber
The major offset relative to the alignment. The default value is 0.
- minornumber
The minor offset relative to the alignment. The default value is 0.
- flowstring
The "flow" of the labels inside of the legend. Values can be "ltr" (the default), "rtl", "ttb" and "btt".
- classNamestringfunction(data,temp)
The class name to add to the legend element. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the class name.
- stylestringfunction(data,temp)
The style to add to the legend element. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the style.
- htmlstringfunction(data,temp)
The HTML text to display in the legend label. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the HTML.
- classNamestringfunction(data,temp)
The class name to add to the legend label element. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the class name.
- stylestringfunction(data,temp)
The style to add to the legend label element. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the style.
- attrsstringfunction(data,temp)
The attributes to add to the legend label element. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the attributes.
- tipstringfunction(data,temp)
The mouseover tip to add to the legend label element. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the tip.
- locationstring
The location of the marker relative to the label text. Values can be "before" (the default) or "after".
- shapestringfunction(data,temp)
The shape of the marker. Values can be "dot", "bar-v", "bar-h", "bar-bltr", "bar-tlbr", "diamond", "square" (the default), "square-round", "x", "cross", "tri-b", "tri-t", "tri-r" and "tri-l". A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the shape.
- sizenumberfunction(data,temp)
The size of the marker. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the size.
- lineobject
The marker line definition. See A5.chart Definition Line Object.
- fillobject
The marker fill definition. See A5.chart Definition Fill Object.
- labelobject
The marker label. See A5.chart Definition Label Object.
- attrsstringfunction(data,temp)
The attributes to add to the marker element. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the attributes.
- tipstringfunction(data,temp)
The mouseover tip to add to the marker element. A function called with "data" (see A5.chart Render Data Object) and "temp" can be used to dynamically calculate the tip.