'JavaScript tooltip generator in Apache Superset is not showing the data

I am new to Apache superset and I am trying to add a JavaScript tooltip to a geo map visualization.

I am using this piece of code in the "JavaScript tooltip generator":

d => "<div>field: <strong> ${d.object.props.ColumnName_Test} </strong></div>"

enter image description here

The value of the column name is not visible on the tooltip, but the hardcoded column name is visible: enter image description here

I have googled a lot, but there is no documentation about how to use the JavaScript tooltip generator in Apache Superset.

Does someone know what I need to change in this piece of code to show the value of the column, instead of the column name?



Solution 1:[1]

Did you first add ColumnName_Test variable to the "Extra data for JS"?

Check also this link

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mona-mk