add legend translate and tooltip x and y formatting