{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import holoviews as hv\n", "\n", "hv.extension(\"bokeh\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This demo demonstrates how to build custom hover tooltips using HTML. The\n", "tooltips are displayed when the user hovers over a point in the plot." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Declare data" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df = pd.DataFrame(\n", " dict(\n", " x=[1, 2, 3, 4, 5],\n", " y=[2, 5, 8, 2, 7],\n", " desc=[\"A\", \"b\", \"C\", \"d\", \"E\"],\n", " imgs=[\n", " \"https://docs.bokeh.org/static/snake.jpg\",\n", " \"https://docs.bokeh.org/static/snake2.png\",\n", " \"https://docs.bokeh.org/static/snake3D.png\",\n", " \"https://docs.bokeh.org/static/snake4_TheRevenge.png\",\n", " \"https://docs.bokeh.org/static/snakebite.jpg\",\n", " ],\n", " fonts=[\n", " \"italics\",\n", " \"
pre\",\n", " \"bold\",\n", " \"small\",\n", " \"