# Custom tooltip for multi Curve plot

**URL:** <https://discourse.holoviz.org/t/custom-tooltip-for-multi-curve-plot/4716>\
**Category:** Datashader\
**Tags:** bokeh, holoviews, hvplot\
**Created:** [December 15, 2022, 12:21am UTC](https://discourse.holoviz.org/t/custom-tooltip-for-multi-curve-plot/4716 "2022-12-15T00:21:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jon\_tron](https://discourse.holoviz.org/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@jon\_tron](https://discourse.holoviz.org/u/jon_tron)\
**Post date:** [December 15, 2022, 12:21am UTC](https://discourse.holoviz.org/t/custom-tooltip-for-multi-curve-plot/4716/1 "2022-12-15T00:21:59Z")

</div>

I’ve seen similar questions being posted here but none quite answer what I’m looking for. I have a plot with multiple curves: [20+ million data points | Kaggle](https://www.kaggle.com/code/jonathanorozco/20-million-data-points?scriptVersionId=113853535)

> [@Overlay 15+ line charts with 1.5 million data points each](https://discourse.holoviz.org/t/overlay-15-line-charts-with-1-5-million-data-points-each/4677/4):
>
> I found the answer to my own question. When dealing with millions of data points, you want to avoid letting the front-end doing the color mapping and instead allow datashader to perform this task. What I struggled with, was getting each curve to plot with separate colors while also displaying a legend for each curve. You can use datashader’s categorical colormapping to handle applying individual colors to each curve. You first have to set the parameter column to type category and then use an ag…

The default hover tool displays the x, y coordinates, I was hoping to extend this hover tool to display the parameter in addition to the x,y coordinates. If it’s possible, ideally would like to have the hover tool be sticky to the lines when hovering over them.

![Screen Shot 2022-12-14 at 4.17.16 PM](https://discourse.holoviz.org/uploads/default/original/2X/4/4bba0ee30eb0dcc59bb22cf223d558316b1dc486.png)

```auto
Object 'curve' has kdims [Dimension('time')] and vdims [Dimension('value'), Dimension('parameter')]

                           time value parameter
0 2022-10-20 11:17:13.718341888 -4.677184 a
1 2022-10-20 11:17:13.917509632 -3.540468 a
2 2022-10-20 11:17:14.116676864 0.831614 a
3 2022-10-20 11:17:14.314843136 5.824959 a
4 2022-10-20 11:17:14.514009600 3.769655 a

```

```auto
custom_tooltips = [
    ("(x,y)", "($x, $y)"),
    ("(time,value)", "(@time,@value)"),
    ("parameter", "@parameter"),
]
custom_hover = bk.models.HoverTool(tooltips=custom_tooltips)

```
