private void AddCountryToDataSet(ResultData resultData, IPublishedContent landkosten, string goalCurrency, String localizedYear) { var kostenland = new CountryCost(landkosten, goalCurrency); for (int i = 1; i <= 20; i++) { int jaarTakseInGoalCurrency = kostenland.GetYear(i) ?? default(int); if (jaarTakseInGoalCurrency > resultData.MaxTakse) { resultData.MaxTakse = jaarTakseInGoalCurrency; } resultData.AddDataPoint(i, jaarTakseInGoalCurrency, localizedYear); } string stepWidthString = (resultData.MaxTakse / 10).ToString(); int biggestInt = Convert.ToInt32(stepWidthString[0].ToString()) + 1; string nextBigNumberforStep = biggestInt.ToString(); for (int i = 0; i < stepWidthString.Length - 1; i++) { nextBigNumberforStep += "0"; } int nextBigNumberForStepInt = Convert.ToInt32(nextBigNumberforStep); resultData.StepWidth = nextBigNumberForStepInt; }