AmLegend is the class that displays legend of the chart. Legend to the chart should be added using chart.addLegend(legend) method.
Alignment of legend entries. Possible values are: "left", "center", "right". left
Used if chart is Serial or XY. In case true, margins of the legend are adjusted and made equal to chart's margins.
Opacity of legend's background. Value range is 0 - 1
Background color. You should set backgroundAlpha to >0 vallue in order background to be visible. #FFFFFF
Opacity of chart's border. Value range is 0 - 1.
Color of legend's border. You should set borderAlpha >0 in order border to be visible. #000000
In case legend position is set to "absolute", you can set distance from bottom of the chart, in pixels.
Text color. Will use chart's color if not set.
This can be used by AmMap only. You can pass array of objects with title, color, markerType values, for example: [{title: "One", color: "#3366CC"},{title: "Two", color: "#FFCC33"}]
Specifies if each of legend entry should be equal to the most wide entry. Won't look good if legend has more than one line.
Font size. Will use chart's font size if not set.
Horizontal space between legend item and left/right border.
The text which will be displayed in the legend. Tag title will be replaced with the title of the graph. title
In case legend position is set to "absolute", you can set distance from left side of the chart, in pixels.
Bottom margin.
Left margin. This property will be ignored if chart is Serial or XY and autoMargins property of the legend is true (default).
Right margin. This property will be ignored if chart is Serial or XY and autoMargins property of the legend is true (default).
Top margin.
Marker border opacity 1.
Marker border color. If not set, will use the same color as marker.
Thickness of the legend border. The default value (0) means the line will be a "hairline" (1 px). In case marker type is line, this style will be used for line thickness.
The color of the disabled marker (when the graph is hidden). #AAB3B3
Space between legend marker and legend text, in pixels.
Size of the legend marker (key).
Shape of the legend marker (key). Possible values are: "square", "circle", "line", "dashedLine", "triangleUp", "triangleDown", "bubble", "none". square
Maximum number of columns in the legend. If Legend's position is set to "right" or "left", maxColumns is automatically set to 1.
Position of a legend. Possible values are: "bottom", "top", "left", "right" and "absolute". In case "absolute", you should set left and top properties too. (this setting is ignored in Stock charts). In case legend is used with AmMap, position is set to "absolute" automatically. bottom
Specifies whether legend entries should be placed in reversed order.
In case legend position is set to "absolute", you can set distance from right side of the chart, in pixels.
Legend item text color on roll-over. #CC0000
When you roll-over the legend entry, all other graphs can reduce their opacity, so that the graph you rolled-over would be distinguished. This style specifies the opacity of the graphs.
You can use this property to turn all the legend entries off.
Horizontal space between legend items, in pixels.
Legend switch color. #FFFFFF
Legend switch type (in case the legend is switchable). Possible values are "x" and "v". x
Whether showing/hiding of graphs by clicking on the legend marker is enabled or not. In case legend is used with AmMap, this is set to false automatically.
If true, clicking on the text will show/hide balloon of the graph. Otherwise it will show/hide graph/slice, if switchable is set to true.
In case legend position is set to "absolute", you can set distance from top of the chart, in pixels.
Specifies if legend labels should be use same color as corresponding markers.
Alignment of the value text. Possible values are "left" and "right". right
The text which will be displayed in the value portion of the legend. You can use tags like value, [[open]], [[high]], [[low]], [[close]], percents, description. value
Width of the value text.
Vertical space between legend items also between legend border and first and last legend row. 10
Adds event listener of the type "showItem" to the object.
Always "showItem".
any
Removes event listener from chart object.
any