Added handling of missing data to getReferenceAverage and recalculateData; Fixed opening of data adding points to wrong charts