private void set_results_text() { List <int> years = GraphStatistics.yearsWithMostPeopleAlive; int amount_of_people_alive = GraphStatistics.mostPeopleAliveAtOnce; string year_string = years.Count == 1 ? years[0].ToString() : get_comma_seperated_year_string(years); string results_string = "In " + year_string + " there was the most people alive with " + amount_of_people_alive + " living"; m_results_text.text = results_string; m_left_side_results_output.text = GraphStatistics.GetStringForAllYears(GraphStatistics.leftColumn, years[0]); m_right_side_results_output.text = GraphStatistics.GetStringForAllYears(GraphStatistics.rightColumn, years[0]); }
public void SetTextForNewSelectedYear(int year) { m_left_side_results_output.text = GraphStatistics.GetStringForAllYears(GraphStatistics.leftColumn, year); m_right_side_results_output.text = GraphStatistics.GetStringForAllYears(GraphStatistics.rightColumn, year); }