Class Label

All Implemented Interfaces:
Serializable

public class Label extends AbstractChartObject
Creates a label on the chart which can be placed anywhere, multiple can be assigned.
See documentation for properties of Label JS Object.
http://docs.amcharts.com/3/javascriptcharts/Label
See Also:
  • Constructor Details

    • Label

      public Label()
  • Method Details

    • getAlign

      public Align getAlign()
      Returns:
      align
    • setAlign

      @StudioProperty(type=ENUMERATION, defaultValue="LEFT") public Label setAlign(Align align)
      Sets align to the label. If not set the default value is LEFT.
      Parameters:
      align - align
      Returns:
      label
    • getAlpha

      public Double getAlpha()
      Returns:
      opacity of the label
    • setAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) Label setAlpha(Double alpha)
      Sets opacity of the label. If not set the default value is 1.
      Parameters:
      alpha - opacity
      Returns:
      label
    • getBold

      public Boolean getBold()
      Returns:
      true if label is bold
    • setBold

      @StudioProperty(defaultValue="false") public Label setBold(Boolean bold)
      Set bold to true if label should be bold. If not set the default value is false.
      Parameters:
      bold - bold option
      Returns:
      label
    • getColor

      public Color getColor()
      Returns:
      color of a label
    • setColor

      @StudioProperty(type=OPTIONS) public Label setColor(Color color)
      Sets color of a label.
      Parameters:
      color - color
      Returns:
      label
    • getRotation

      public Integer getRotation()
      Returns:
      rotation angle
    • setRotation

      @StudioProperty(defaultValue="0") public Label setRotation(Integer rotation)
      Sets rotation angle. If not set the default value is 0.
      Parameters:
      rotation - angle
      Returns:
      label
    • getSize

      public Integer getSize()
      Returns:
      text size
    • setSize

      @StudioProperty public Label setSize(Integer size)
      Sets text size.
      Parameters:
      size - size
      Returns:
      label
    • getText

      public String getText()
      Returns:
      text of the label
    • setText

      @StudioProperty public Label setText(String text)
      Sets text of the label.
      Parameters:
      text - text
      Returns:
      label
    • getUrl

      public String getUrl()
      Returns:
      the URL
    • setUrl

      @StudioProperty public Label setUrl(String url)
      Sets the URL which will be access if user clicks on a label.
      Parameters:
      url - the URL
      Returns:
      label
    • getX

      public String getX()
      Gets the X position of the label.
      Returns:
      string with double or double with "%"
    • setX

      @StudioProperty public Label setX(String x)
      Sets the X position of the label. You can set x coordinate in percentage or in pixels format. For instance, 50% - position with percentage, 50 - position in pixels.
      Parameters:
      x - double or double with "%"
      Returns:
      label
    • getY

      public String getY()
      Gets the Y position of the label.
      Returns:
      string with double or double with "%"
    • setY

      @StudioProperty public Label setY(String y)
      Sets the Y position of the label. You can set x coordinate in percentage or in pixels format. For instance, 50% - position with percentage, 50 - position in pixels.
      Parameters:
      y - double or double with "%"
      Returns:
      label
    • getId

      public String getId()
      Returns:
      unique id of the label
    • setId

      @StudioProperty public Label setId(String id)
      Sets unique id of the label.
      Parameters:
      id - id
      Returns:
      label
    • getTabIndex

      public Integer getTabIndex()
      Returns:
      tab index
    • setTabIndex

      @StudioProperty public Label setTabIndex(Integer tabIndex)
      Sets tab index. In case you set it to some number, the chart will set focus on the label when user clicks tab key. When a focus is set, screen readers like NVDA screen reader will read the title. Note, not all browsers and readers support this.
      Parameters:
      tabIndex - tab index
      Returns:
      label
    • checkCorrectInputFormat

      protected void checkCorrectInputFormat(String value)