Skip to content

Instantly share code, notes, and snippets.

@carmoreira
Last active August 27, 2018 13:42
Show Gist options
  • Save carmoreira/aca2fc777aaa90603158751ef552b312 to your computer and use it in GitHub Desktop.
Save carmoreira/aca2fc777aaa90603158751ef552b312 to your computer and use it in GitHub Desktop.
Hide Empty Tooltips Geochart API - Interactive World Maps WordPress Plugin
/*
INSTRUCTIONS:
1. replace _1 with the ID of your map.
2. use the 'tooltip' field to add your information. The 'title' field will not display.
*/
/* this will hide an empty div the tooltip has, which may cause some white space */
.iwm_map_canvas #map_canvas_1 li.google-visualization-tooltip-item:first-child { display:none; box-shadow:none; }
/* this will hide the element in case it is empty */
.iwm_map_canvas #map_canvas_1 li.google-visualization-tooltip-item:empty { display:none; box-shadow:none; }
/*this will add a background only to the content itself, with a small padding */
.iwm_map_canvas #map_canvas_1 li.google-visualization-tooltip-item { background:#FFF; padding:13px !important; box-shadow:none; }
/* this should hide the default white background of the tooltip container. Added some margins to adjust position */
.iwm_map_canvas #map_canvas_1 .google-visualization-tooltip { background:none; border:none; margin-top:20px; margin-left:20px; box-shadow:none !important; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment