'Tooltips/Hover over shows ??? - when missing value - how to suppress the ??? and leave it blank or '-'
I am plotting geo location of some events, if there is location with only one event the second one appears as ???. How to suppress the ??? or change to '-' if there is missing value? Or if the event happens more than one time under same location, how to display once?
Here is example of the output:
And here is the graph code:
tile_provider = get_provider(CARTODBPOSITRON)
output_file('Geological_Disasters.html')
curdoc().theme = 'dark_minimal'
tooltips = [('Volcano Location', '@{Volcano Name}'),
('Earthquake Location', '@place'),
]
p = figure(plot_width=800, plot_height=600,
x_range=(world_lon1, world_lon2), y_range=(world_lat1, world_lat2),
x_axis_type="mercator", y_axis_type="mercator",
tools="pan, box_select, zoom_in, zoom_out, save, reset, hover, box_zoom",
tooltips=tooltips,
title='Geological Disasters')
p.add_tile(tile_provider)
# 1
p.circle(x="MercatorX", y="MercatorY",size=12,fill_color="dodgerblue",
line_color="dodgerblue",
source=volcano19_20)
#2
p.circle(x="MercatorX", y="MercatorY", size=3,fill_color="red", line_color="red",
line_alpha=0.1,fill_alpha=0.1,source=earthquakes19_20)
show(p)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

