better calculation of mainchart default time to show