Class: LegendOptions

LegendOptions()

new LegendOptions()

The LegendOptions object defines the configuration options to display the view's legend (the legend helps you choose which series to show or hide at runtime)

For instance, the "visible" option:

legend: { visible: true }
shows the legend

Members

(static) align :LegendAlignEnum

The align field specifies the alignment of the legend's content
Type:
  • LegendAlignEnum

(static) dock :PanelDockEnum

The dock field specifies the edge of the container the legend-window is anchored to
Type:
  • PanelDockEnum

(static) flow :LegendFlowEnum

The flow field determines whether the legend objects are arranged from left to right or top to bottom
Type:
  • LegendFlowEnum

(static) formatText :exontrol.DrawTextFormatEnum

The formatText field specifies the flags the labels use to display on the legend. The exontrol.DrawTextFormatEnum type supports the following flags:
  • exTextAlignTop (0x00), justifies the text to the top of the rectangle
  • exTextAlignLeft (0x00), aligns text to the left
  • exTextAlignCenter (0x01), centers text horizontally in the rectangle
  • exTextAlignRight (0x02), aligns text to the right
  • exTextAlignVCenter (0x04), centers text vertically
  • exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
  • exTextAlignMask (0x0F), specifies the mask for text's alignment.
  • exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
  • exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
  • exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
  • exPlainText (0x80), treats the text as plain text.
  • exTextNoClip (0x0100), draws without clipping.
  • exHTMLTextNoColors (0x0200), ignores the and tags.
  • exTextCalcRect (0x0400), determines the width and height of the text.
  • exHTMLTextNoTags (0x0800), ignores all HTML tags.
  • exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
  • exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
  • exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
Type:
  • exontrol.DrawTextFormatEnum

(static) grid :any

The grid field indicates the number of columns or rows that the legend divides its content into. The grid field can be any of the following:
  • {number}, defines a number that specifies the number of columns to divide the legend
  • {string}, defines a string of "columns x rows" type that defines the number of columns and / or rows to arrange the legend objects. The columns and rows can be omitted.
  • {array}, indicates a two-elements array of [columns,rows] type that specifies the columns and / or rows to arrange the legend objects
Type:
  • any

(static) labelFixedHeight :number

The labelFixedHeight field indicates the fixed-height to display the labels
Type:
  • number

(static) labelFixedWidth :number

The labelFixedWidth field indicates the fixed-width to display the labels
Type:
  • number

(static) locked :boolean

The locked field indicates whether the legend is locked(protected) or unlocked
Type:
  • boolean
Example
false {boolean}, unlocks the legend (can show or hide the serie)
  true {boolean}, locks the legend (can't show or hide the serie)

(static) pad :number|string|array

The pad field defines the legend's padding (space between legend's symbol and label). A value that could be a numeric value, to pad horizontal and vertical size with the same value, or a "x,y" or [x,y] type to specify the padding on h/v size.
Type:
  • number | string | array
Example
null {null}, indicates that the default-padding field is used ([4,4])
 0 {number}, indicates no padding
 2 {number}, indicates a 2-pixels horizontal padding and 2-pixels vertical padding
 "8,4" {string}, indicates 8-pixels horizontal padding and 4-pixels vertical padding
 [8,4] {array}, indicates 8-pixels horizontal padding and 4-pixels vertical padding

(static) reverse :boolean

The reverse field reverses the order of the items within the legend.
Type:
  • boolean

(static) symbolAlign :LegendSymbolAlignmentEnum

The symbolAlign field specifies the alignment of the symbol of the serie relative to the label of the serie. The exTop, exBottom, exLeft and exRight flags can be combined with exStart, exCenter or exEnd flags.
Type:
  • LegendSymbolAlignmentEnum

(static) symbolHeight :number

The symbolHeight field indicates the height to display the symbol
Type:
  • number

(static) symbolWidth :number

The symbolWidth field indicates the width to display the symbol
Type:
  • number

(static) visible :boolean

The visible field shows or hides the legend.
Type:
  • boolean