packages/victory-core/src/victory-util/data.js
function addEventKeys(props, data) {
  const hasEventKeyAccessor = !!props.eventKey;
  const eventKeyAccessor = getEventKey(props.eventKey);
  return data.map((datum) => {
    if (datum.eventKey !== undefined) {
      return datum;
    } else if (hasEventKeyAccessor) {
      const eventKey = eventKeyAccessor(datum);
      return eventKey !== undefined ? assign({ eventKey }, datum) : datum;
    } else {
      return datum;
    }
  });
}
function addEventKeys(props, data) {
  const hasEventKeyAccessor = !!props.eventKey;
  const eventKeyAccessor = getEventKey(props.eventKey);
  return data.map((datum) => {
    if (datum.eventKey !== undefined) {
      return datum;
    } else if (hasEventKeyAccessor) {
      const eventKey = eventKeyAccessor(datum);
      return eventKey !== undefined ? assign({ eventKey }, datum) : datum;
    } else {
      return datum;
    }
  });
}
Returns data with an eventKey prop added to each datum