Improve BaseDataAccess in order to help to make legends