Class pvc.options.Tooltip
Constructor Attributes | Constructor Name and Description |
---|---|
The options documentation class of the tooltip.
|
Field Attributes | Field Name and Description |
---|---|
The duration for the tooltip move animation, in milliseconds.
|
|
Indicates if the tooltip shows an arrow
pointing to the
visual element's anchor point.
|
|
A custom class to mark the root tooltip element.
|
|
The delay for the tooltip to show, in milliseconds.
|
|
The delay for the tooltip to hide, in milliseconds.
|
|
Indicates if the tooltip is enabled.
|
|
Indicates if the tooltip fades in and out,
after the corresponding delay has expired.
|
|
Indicates if the
visual element's anchor point
should be the current mouse position.
|
|
The preferred tooltip gravity.
|
|
Indicates if the tooltip text
that the format function builds
is in HTML format.
|
|
The distance of the closest tooltip edge or corner
to the visual element's tooltip anchor point, in pixel units.
|
|
The opacity level of the tooltip box (range from 0, completely transparent, to 1).
|
|
Indicates if the collateral tooltip gravities should be
aligned with corners.
|
Method Attributes | Method Name and Description |
---|---|
format(scene)
A callback function that is called
to build the tooltip of a visual element.
|
A value of 0 disables the move animation.
The default value depends on the value of Tooltip#followMouse. When false, the default value is 400 ms. Otherwise, it is 0, resulting in no animation.
Most chart types use a default value of true.
The root tooltip element is always marked with the class tipsy. This option allows you to specify an additional class to style the tooltip differently for a single chart or group of charts.
- Default Value:
- ''
- Default Value:
- 200
- Default Value:
- 80
- Default Value:
- true
- Default Value:
- true
- Default Value:
- false
The default value depends on the chart type. Most use the varia.TooltipGravity#South gravity, but others, like the Pie chart, calculate an adequate gravity per visual element.
When using the preferred gravity causes the tooltip to be placed off the browser window, a more suitable gravity may be automatically chosen.
- Default Value:
- true
The default value depends on the chart type.
- Default Value:
- 0.9
Most chart types use a default value of false.
If #html is true, the resulting text must be valid HTML, otherwise, it is considered plain text.
- Context:
- {pvc.visual.Context}
- Arguments:
- {pvc.visual.Scene} scene
- The scene whose tooltip is to be built.
Use the data contained in the scene object to build the tooltip.
- Returns:
- {string} The tooltip text.