Interface ChartTooltipRenderer


public interface ChartTooltipRenderer
Unique tooltip renderer interface.
Since:
4.0
Author:
JBStrap
  • Method Summary

    Modifier and Type
    Method
    Description
    Unique tooltip renderer method.
  • Method Details

    • onRendering

      Component<?> onRendering()

      Unique tooltip renderer method.

      The method returns a component that contains the tooltip to be displayed on the chart. The returned component is always one single component. If you want to render a complex component made up of several different components, you have to enclose them in a container component. It is recommended that you use the Div component for this purpose.

      If you want to use the data points which the user hovered over with his mouse, you have to add special unique components. You cannot add further components to these, but this component can be added to any other component. Components rendered using this method are automatically replaced with the corresponding value on the charts.

      Available components representing chart values are the following:

      • SeriesTitle - This component is replaced with a series title that contains the data point the user has hovered over with the mouse pointer
      • xData - This component is replaced on the tooltip with the X value of the data point
      • yData - This component is replaced on the tooltip with the Y value of the data point
      • zData - This component is only applicable for bubble charts. Instead of the component, its weight is displayed. If this component is not placed on a bubble chart’s tooltip, the data value is displayed as “undefined”.

      Returns:
      The rendered chart tooltip component