Class Labels

    • Constructor Detail

      • Labels

        public Labels()
      • Labels

        public Labels​(Boolean enabled)
    • Method Detail

      • setAlign

        public void setAlign​(HorizontalAlign align)
        What part of the string the given position is anchored to. Can be one of "left", "center" or "right". The exact position also depends on the labels.x setting. Angular gauges and solid gauges defaults to center.

        Defaults to: right

      • setAutoRotation

        public void setAutoRotation​(Number[] autoRotation)
        For horizontal axes, the allowed degrees of label rotation to prevent overlapping labels. If there is enough space, labels are not rotated. As the chart gets narrower, it will start rotating the labels -45 degrees, then remove every second label and try again with rotations 0 and -45 etc. Set it to false to disable rotation, which will cause the labels to word-wrap if possible.

        Defaults to: [-45]

      • setAutoRotationLimit

        public void setAutoRotationLimit​(Number autoRotationLimit)
        When each category width is more than this many pixels, we don't apply auto rotation. Instead, we lay out the axis label with word wrap. A lower limit makes sense when the label contains multiple short words that don't extend the available horizontal space for each label.

        Defaults to: 80

      • setDistance

        public void setDistance​(Number distance)
        Angular gauges and solid gauges only. The label's pixel distance from the perimeter of the plot area.

        Defaults to: -25

      • setEnabled

        public void setEnabled​(Boolean enabled)
        Enable or disable the axis labels.

        Defaults to: true

      • setFormat

        public void setFormat​(String format)
        A format string for the axis label.

        Defaults to: {value}

      • getFormatter

        public String getFormatter()
      • setFormatter

        public void setFormatter​(String _fn_formatter)
      • setPadding

        public void setPadding​(Number padding)
        The pixel padding for axis labels, to ensure white space between them.

        Defaults to: 5

      • setReserveSpace

        public void setReserveSpace​(Boolean reserveSpace)
        Whether to reserve space for the labels. This can be turned off when for example the labels are rendered inside the plot area instead of outside.

        Defaults to: true

      • setStaggerLines

        public void setStaggerLines​(Number staggerLines)
        Horizontal axes only. The number of lines to spread the labels over to make room or tighter labels.
      • setStep

        public void setStep​(Number step)

        To show only every n'th label on the axis, set the step to n. Setting the step to 2 shows every other label.

        By default, the step is calculated automatically to avoid overlap. To prevent this, set it to 1. This usually only happens on a category axis, and is often a sign that you have chosen the wrong axis type. Read more at Axis docs => What axis should I use?

      • setStyle

        public void setStyle​(Style style)

        CSS styles for the label. Use whiteSpace: 'nowrap' to prevent wrapping of category labels. Use textOverflow: 'none' to prevent ellipsis (dots).

        In styled mode, the labels are styled with the .highcharts-axis-labels class.

        Defaults to: { "color": "#666666", "cursor": "default", "fontSize": "11px" }

      • setUseHTML

        public void setUseHTML​(Boolean useHTML)
        Whether to use HTML to render the labels.

        Defaults to: false

      • setX

        public void setX​(Number x)
        The x position offset of the label relative to the tick position on the axis. Defaults to -15 for left axis, 15 for right axis.
      • setY

        public void setY​(Number y)
        The y position offset of the label relative to the tick position on the axis.

        Defaults to: 3

      • setZIndex

        public void setZIndex​(Number zIndex)
        The Z index for the axis labels.

        Defaults to: 7

      • getRotation

        public String getRotation()
      • setRotation

        public void setRotation​(String rotation)
      • setRotation

        public void setRotation​(Number rotation)
      • setRotationPerpendicular

        public void setRotationPerpendicular()