adjusted distributioncharts to process the max value