charts now shw correct number of days
refactored chart building