Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Is it possible to change the tooltip orientation?

I'm using the power bi tooltips and would like them to appear above my nodes.
When I set the coordinates to the topmost position of my node, the triangle part of the tooltip starts there but goes to the right or left. The tooltip box itself will then overlap with my node.

Is it possible to make the tooltip appear in a certain direction? e.g. from my coordinates the tooltip should be centered above them

Instead of this: 

I want something like this: 


This is the code for showing the tooltip:

const bRect: DOMRect = cellView.el.getBoundingClientRect();
tooltipService.show({
dataItems: dataItem,
identities: [],
coordinates: [bRect.left + bRect.width / 2, bRect.top],
isTouchEvent: false,
});
  • Hi Anonymous,

     

    The main Power BI window currently manages the orientation of the tooltip relative to the supplied coordinates. The current API does not have the functionality to override this, so if you feel particularly strongly about it, you would need to request the feature from MS. This can either be done by creating an issue in the API repo or email them directly - [email protected]

     

    Regards,


    Daniel

2 Replies