chart.js implement proper max handling