Fixed some bugs in the createChartFromMeasurement() Method