Class TooltipPlotOptions

    • Constructor Detail

      • TooltipPlotOptions

        public TooltipPlotOptions()
    • Method Detail

      • getDateTimeLabelFormats

        public DateTimeLabelFormats getDateTimeLabelFormats()
        Returns the date format in the tooltip's header

        For series on a datetime axes, the date format in the tooltip's header will by default be guessed based on the closest data points. This member gives the default string representations used for each unit. For an overview of the replacement codes, see Charts.setDateFormat(String, Number, boolean).

        Defaults:

         {
             millisecond:"%A, %b %e, %H:%M:%S.%L",
             second:"%A, %b %e, %H:%M:%S",
             minute:"%A, %b %e, %H:%M",
             hour:"%A, %b %e, %H:%M",
             day:"%A, %b %e, %Y",
             week:"Week from %A, %b %e, %Y",
             month:"%B %Y",
             year:"%Y"
         }
         

        Returns:
        dateTimeLabelFormats the date format in the tooltip's header
      • setDateTimeLabelFormats

        public void setDateTimeLabelFormats​(DateTimeLabelFormats dateTimeLabelFormats)
        Sets the date format in the tooltip's header

        For series on a datetime axes, the date format in the tooltip's header will by default be guessed based on the closest data points. This member gives the default string representations used for each unit. For an overview of the replacement codes, see Charts.setDateFormat(String, Number, boolean).

        Parameters:
        dateTimeLabelFormats - the date format in the tooltip's header
      • isFollowPointer

        public boolean isFollowPointer()
        Returns whether the tooltip should follow the mouse as it moves across columns, pie slices and other point types with an extent. By default it behaves this way for scatter, bubble and pie series by override in the plotOptions for those series types.

        For touch moves to behave the same way, setFollowTouchMove(boolean) must be true also.

        Default: false.

      • setFollowPointer

        public void setFollowPointer​(boolean followPointer)
        Sets whether the tooltip should follow the mouse as it moves across columns, pie slices and other point types with an extent. By default it behaves this way for scatter, bubble and pie series by override in the plotOptions for those series types.

        For touch moves to behave the same way, setFollowTouchMove(boolean) must be true also.

      • isFollowTouchMove

        public boolean isFollowTouchMove()
        Returns whether the tooltip should follow the finger as it moves on a touch device. The default value of false causes a touch move to scroll the web page, as is default behaviour on touch devices. Setting it to true may cause the user to be trapped inside the chart and unable to scroll away, so it should be used with care. If Chart.setZoomType(String) is set, it will override setFollowTouchMove(boolean).

        Default: false.

      • setFollowTouchMove

        public void setFollowTouchMove​(boolean followTouchMove)
        Sets whether the tooltip should follow the finger as it moves on a touch device. The default value of false causes a touch move to scroll the web page, as is default behaviour on touch devices. Setting it to true may cause the user to be trapped inside the chart and unable to scroll away, so it should be used with care. If Chart.setZoomType(String) is set, it will override setFollowTouchMove(boolean).
      • getFooterFormat

        public String getFooterFormat()
        Returns a string to append to the tooltip format.

        Default: false.

      • setFooterFormat

        public void setFooterFormat​(String footerFormat)
        Sets a string to append to the tooltip format.
      • getFormat

        public String getFormat()
        Returns a format text of the tooltip.

        Default: null.

      • setFormat

        public void setFormat​(String format)
        Sets a format text of the tooltip.

        Default: null.

      • getHeaderFormat

        public String getHeaderFormat()
        Returns the HTML of the tooltip header line. Variables are enclosed by curly brackets. Available variables are point.key, series.name, series.color and other members from the point and series objects. The point.key variable contains the category name, x value or datetime string depending on the type of axis. For datetime axes, the point.key date format can be set using tooltip.xDateFormat.

        Default: <span style="font-size: 10px">{point.key}</span><br/>

      • setHeaderFormat

        public void setHeaderFormat​(String headerFormat)
        Sets the HTML of the tooltip header line. Variables are enclosed by curly brackets. Available variables are point.key, series.name, series.color and other members from the point and series objects. The point.key variable contains the category name, x value or datetime string depending on the type of axis. For datetime axes, the point.key date format can be set using tooltip.xDateFormat.

      • getHideDelay

        public Number getHideDelay()
        Returns the number of milliseconds to wait until the tooltip is hidden when mouse out from a point or chart.

        Default: 500.

      • setHideDelay

        public void setHideDelay​(Number hideDelay)
        Sets the number of milliseconds to wait until the tooltip is hidden when mouse out from a point or chart.
      • getPointFormat

        public String getPointFormat()
        Returns the HTML of the point's line in the tooltip. Variables are enclosed by curly brackets. Available variables are point.x, point.y, series.name and series.color and other properties on the same form. Furthermore, point.y can be extended by the tooltip.yPrefix and tooltip.ySuffix variables. This can also be overridden for each series, which makes it a good hook for displaying units.

        Default: <span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>

      • setPointFormat

        public void setPointFormat​(String pointFormat)
        Sets the HTML of the point's line in the tooltip. Variables are enclosed by curly brackets. Available variables are point.x, point.y, series.name and series.color and other properties on the same form. Furthermore, point.y can be extended by the tooltip.yPrefix and tooltip.ySuffix variables. This can also be overridden for each series, which makes it a good hook for displaying units.

      • getValueDecimals

        public Number getValueDecimals()
        Returns how many decimals to show in each series' y value. This is overridable in each series' tooltip options object. The default is to preserve all decimals.

        Default: null.

      • setValueDecimals

        public void setValueDecimals​(Number valueDecimals)
        Sets how many decimals to show in each series' y value. This is overridable in each series' tooltip options object. The default is to preserve all decimals.
      • getValuePrefix

        public String getValuePrefix()
        Returns a string to prepend to each series' y value. Overridable in each series' tooltip options object.

        Default: null.

      • setValuePrefix

        public void setValuePrefix​(String valuePrefix)
        Sets a string to prepend to each series' y value. Overridable in each series' tooltip options object.
      • getValueSuffix

        public String getValueSuffix()
        Returns a string to append to each series' y value. Overridable in each series' tooltip options object.

        Default: null.

      • setValueSuffix

        public void setValueSuffix​(String valueSuffix)
        Sets the string to append to each series' y value. Overridable in each series' tooltip options object.
      • getXDateFormat

        public String getXDateFormat()
        Returns the format for the date in the tooltip header if the X axis is a datetime axis. The default is a best guess based on the smallest distance between points in the chart.

        Default: null.

      • setXDateFormat

        public void setXDateFormat​(String xDateFormat)
        Sets the format for the date in the tooltip header if the X axis is a datetime axis. The default is a best guess based on the smallest distance between points in the chart.