# Ability to handle the placement of the tooltip of x-axis labels

**URL:** <https://forums.losant.com/t/ability-to-handle-the-placement-of-the-tooltip-of-x-axis-labels/5797>\
**Category:** Help\
**Tags:** experience\
**Created:** [March 4, 2025, 9:01pm UTC](https://forums.losant.com/t/ability-to-handle-the-placement-of-the-tooltip-of-x-axis-labels/5797 "2025-03-04T21:01:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rishabh\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@Rishabh\_Gupta](https://forums.losant.com/u/Rishabh_Gupta)\
**Post date:** [March 4, 2025, 9:01pm UTC](https://forums.losant.com/t/ability-to-handle-the-placement-of-the-tooltip-of-x-axis-labels/5797/1 "2025-03-04T21:01:52Z")

</div>

Hi All,

I am working with vega charts and want to achieve a tool-tip on hover over the labels of x-axis of the chart, which I achieved using encode property.  
For reference you can see the below code in screenshot and the corresponding output in vega editor.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/6/603cc4dfb4ceb76854a8fbd443656874485f4a44.png)

The problem here I am facing is with the placement of the tool-tip. My requirement here is that I want to show the tool-tip container above the x-axis label.

So basically is there a way to handle the placement of the tool-tip (i.e., top, right, left, bottom)?

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [March 5, 2025, 4:43pm UTC](https://forums.losant.com/t/ability-to-handle-the-placement-of-the-tooltip-of-x-axis-labels/5797/2 "2025-03-05T16:43:51Z")

</div>

Hey @Rishabh_Gupta!

Since this question isn’t specifically related to Losant, and we’re not particularly Vega experts, I would recommend seeking help in a community more specific to Vega.

Here is the Github repo for the Vega Tooltip project. Looks like they have some examples that hopefully point you in the right direction:

> **[GitHub - vega/vega-tooltip: Tooltip Plugin for Vega-Lite](https://github.com/vega/vega-tooltip)**
>
> Tooltip Plugin for Vega-Lite
