Best practices on tooltips position

I'm building a UI Kit and I'm trying to define the best position for tooltips to be displayed.

Some thoughts: On charts, I believe the tooltip should be displayed on the top of the pointer; On touch devices, the tooltip should be displayed on top because if you are pointing up it's probable that your finger will hide what's on the bottom;

Do you have any recommendations about this?