htmlwidgets / sparkline

jQuery Sparkline HTML Widget for R
Other
244 stars 40 forks source link

Passing values to tooltipValueLookups #33

Open kpagacz opened 3 years ago

kpagacz commented 3 years ago

I am currently having issues with passing values to tooltipValueLookups. What should be the format of this argument for it to work?

I call sparkline with the following:

sparkline::sparkline(c(1,2,3), type="bar", tooltipFormat = "{{offset:table}} - {{value}}", chartRangeMax=5, tooltipValueLookups="'table': {0:'a', 1:'b', 2:'c'}")

but the chart still shows tooltips in the format of: offset - value. How can I make the sparkline show {{offset:table}} - {{value}}?