use_tooltip | R Documentation |
Create a tooltip property
use_tooltip(html, style, ...)
html |
The |
style |
A |
... |
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> "
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.