API: Mini-tooltip

Mini Tooltip Component reusable API class that renders a simple and configurable tooltip element for Britechart's bar and step chart.

(require("Mini-tooltip"))(_selection)

This function creates the graph using the selection as container
Parameters:
Name Type Description
_selection D3Selection A d3 selection that represents the container(s) where the chart(s) will be rendered
Source:

Requires

  • module:d3

Methods


module:Mini-tooltip(_selection)

This function creates the graph using the selection as container
Parameters:
Name Type Description
_selection D3Selection A d3 selection that represents the container(s) where the chart(s) will be rendered
Source:

<static> hide()

Hides the tooltip
Source:
Returns:
Tooltip module to chain calls
Type
Module

<static> nameLabel(_x)

Gets or Sets data's nameLabel
Parameters:
Name Type Description
_x text Desired nameLabel
Source:
Returns:
nameLabel or Step Chart module to chain calls
Type
text | module

<static> show()

Shows the tooltip
Source:
Returns:
Tooltip module to chain calls
Type
Module

<static> title(_x)

Gets or Sets the title of the tooltip
Parameters:
Name Type Description
_x string Desired title
Source:
Returns:
Current title or module to chain calls
Type
string | module

<static> update(dataPoint, mousePosition, chartSize)

Updates the position and content of the tooltip
Parameters:
Name Type Description
dataPoint Object Datapoint of the hovered element
mousePosition Array Mouse position relative to the parent chart [x, y]
chartSize Array Parent chart size [x, y]
Source:
Returns:
Current component
Type
module