Create a tooltip property
use_tooltip(html, style, ...)
The innerHTML
of the element.
A cssText
string that will modefiy the default style of the element.
not used
The tooltip string is a mustache template in which variable names are identified
by the double curly brackets (mustache tags) that surround them. The variable names available to the
template are given by deck.gl’s pickingInfo.object
and vary by layer.
mustache for a complete syntax overwiew.
data("bart_segments")
props <- list(
tooltip = use_tooltip(
html = "{{from_name}} to {{to_name}}",
style = "background: steelBlue; border-radius: 5px;"
)
)
# The picking object of the hexagon layer offers
# a property that contains the list of points of the hexagon.
# You can iterate over this list as shown below.
data("sf_bike_parking")
html = "
<p>{{position.0}}, {{position.1}}<p>
<p>Count: {{points.length}}</p>
<p>{{#points}}<div>{{address}}</div>{{/points}}</p>
"