1. set x label orientation;
2. minor refactoring;