function statsForSingleAthleteChart(data) {
  const output = [];
  const { min, max } = getMinMaxYears(Object.keys(data));

  for (let year = min; year <= max; year += 1) {
    output.push({
      year,
      value: data[year] ? data[year].total : 0,
    });
  }

  return output;
}
/**
 * Transform rider page stats object for single athlete years chart
 * including any missing years
 *
 * @param {Object} data
 * @return {Array}
 */
Transform rider page stats object for single athlete years chart
including any missing years

@param {Object} data
@return {Array}
Transform rider page stats object for single athlete years chart including any missing years @param { Object } data @return { Array }
function statsForSingleAthleteChart(data) {
  const output = [];
  const { min, max } = getMinMaxYears(Object.keys(data));
  for (let year = min; year <= max; year += 1) {
    output.push({
      year,
      value: data[year] ? data[year].total : 0,
    });
  }
  return output;
}
function statsForSingleAthleteChart ( data ) { const output = [ ] ; const { min , max } = getMinMaxYears ( Object . keys ( data ) ) ; for ( let year = min ; year <= max ; year += 1 ) { output . push ( { year , value : data [ year ] ? data [ year ] . total : 0 , } ) ; } return output ; }
Transform rider page stats object for single athlete years chart
 including any missing years
Transform rider page stats object for single athlete years chart including any missing years