add class Legend, refactor projection part of class Axis