Implement improved value formatting for tooltips