Charts: Replace 'undefined' by int max