fix and refactor chart tooltip
simplify tooltip initialization