Class ItemLabelPosition

    • Constructor Detail

      • ItemLabelPosition

        public ItemLabelPosition()
        Creates a new position record with default settings.
      • ItemLabelPosition

        public ItemLabelPosition​(ItemLabelAnchor itemLabelAnchor,
                                 TextAnchor textAnchor)
        Creates a new position record (with zero rotation).
        Parameters:
        itemLabelAnchor - the item label anchor (null not permitted).
        textAnchor - the text anchor (null not permitted).
      • ItemLabelPosition

        public ItemLabelPosition​(ItemLabelAnchor itemLabelAnchor,
                                 TextAnchor textAnchor,
                                 TextAnchor rotationAnchor,
                                 double angle)
        Creates a new position record. The item label anchor is a point relative to the data item (dot, bar or other visual item) on a chart. The item label is aligned by aligning the text anchor with the item label anchor.
        Parameters:
        itemLabelAnchor - the item label anchor (null not permitted).
        textAnchor - the text anchor (null not permitted).
        rotationAnchor - the rotation anchor (null not permitted).
        angle - the rotation angle (in radians).
    • Method Detail

      • getTextAnchor

        public TextAnchor getTextAnchor()
        Returns the text anchor.
        Returns:
        The text anchor (never null).
      • getRotationAnchor

        public TextAnchor getRotationAnchor()
        Returns the rotation anchor point.
        Returns:
        The rotation anchor point (never null).
      • getAngle

        public double getAngle()
        Returns the angle of rotation for the label.
        Returns:
        The angle (in radians).
      • equals

        public boolean equals​(Object obj)
        Tests this object for equality with an arbitrary object.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.