function getStringsFromData(props, axis) {
  const isArrayOrIterable = Array.isArray(props.data) || Immutable.isIterable(props.data);
  if (!isArrayOrIterable) {
    return [];
  }

  const key = props[axis] === undefined ? axis : props[axis];
  const accessor = Helpers.createAccessor(key);

  // support immutable data
  const data = props.data.reduce((memo, d) => {
    memo.push(parseDatum(d));
    return memo;
  }, []);

  const sortedData = sortData(data, props.sortKey, props.sortOrder);
  const dataStrings = sortedData
    .reduce((dataArr, datum) => {
      datum = parseDatum(datum);
      dataArr.push(accessor(datum));
      return dataArr;
    }, [])
    .filter((datum) => typeof datum === "string");

  // return a unique set of strings
  return dataStrings.reduce((prev, curr) => {
    if (curr !== undefined && curr !== null && prev.indexOf(curr) === -1) {
      prev.push(curr);
    }
    return prev;
  }, []);
}
function getStringsFromData(props, axis) {
  const isArrayOrIterable = Array.isArray(props.data) || Immutable.isIterable(props.data);
  if (!isArrayOrIterable) {
    return [];
  }

  const key = props[axis] === undefined ? axis : props[axis];
  const accessor = Helpers.createAccessor(key);

  
  const data = props.data.reduce((memo, d) => {
    memo.push(parseDatum(d));
    return memo;
  }, []);

  const sortedData = sortData(data, props.sortKey, props.sortOrder);
  const dataStrings = sortedData
    .reduce((dataArr, datum) => {
      datum = parseDatum(datum);
      dataArr.push(accessor(datum));
      return dataArr;
    }, [])
    .filter((datum) => typeof datum === "string");

  
  return dataStrings.reduce((prev, curr) => {
    if (curr !== undefined && curr !== null && prev.indexOf(curr) === -1) {
      prev.push(curr);
    }
    return prev;
  }, []);
}
function getStringsFromData ( props , axis ) { const isArrayOrIterable = Array . isArray ( props . data ) || Immutable . isIterable ( props . data ) ; if ( ! isArrayOrIterable ) { return [ ] ; } const key = props [ axis ] === undefined ? axis : props [ axis ] ; const accessor = Helpers . createAccessor ( key ) ; // support immutable data const data = props . data . reduce ( ( memo , d ) => { memo . push ( parseDatum ( d ) ) ; return memo ; } , [ ] ) ; const sortedData = sortData ( data , props . sortKey , props . sortOrder ) ; const dataStrings = sortedData . reduce ( ( dataArr , datum ) => { datum = parseDatum ( datum ) ; dataArr . push ( accessor ( datum ) ) ; return dataArr ; } , [ ] ) . filter ( ( datum ) => typeof datum === "string" ) ; // return a unique set of strings return dataStrings . reduce ( ( prev , curr ) => { if ( curr !== undefined && curr !== null && prev . indexOf ( curr ) === - 1 ) { prev . push ( curr ) ; } return prev ; } , [ ] ) ; }
Returns an array of strings from data
@param {Object} props: the props object
@param {String} axis: the current axis
@returns {Array} an array of strings
Returns an array of strings from data