add tooltip and legend