function field(
  data,
  {
    id = accessors.id,
    key = accessors.key,
    min = accessors.min,
    max = accessors.max,
    type = accessors.type,
    tags = accessors.tags,
    title = accessors.title,
    values = accessors.values,
    value = accessors.value,
    label = accessors.label,
    formatter = accessors.formatter,
  } = {}
) {
  /**
   * @alias Field
   */
  const f = {
    /**
     * Returns this field's id
     * @returns {string}
     */
    id: () => id(data),

    /**
     * Returns this field's key
     * @returns {string}
     */
    key: () => key(data),

    /**
     * Returns the input data
     * @returns {any}
     */
    raw: () => data,
    /**
     * Returns the tags.
     * @return {Array<string>}
     */
    tags: () => tags(data),

    /**
     * Returns this field's type: 'dimension' or 'measure'.
     * @return {string}
     */
    type: () => type(data),

    /**
     * Returns the min value of this field.
     * @return {number}
     */
    min: () => min(data),

    /**
     * Returns the max value of this field.
     * @return {number}
     */
    max: () => max(data),

    /**
     * Returns this field's title.
     * @return {string}
     */
    title: () => title(data),

    /**
     * Returns the values of this field.
     * @return {Array<DatumExtract>}
     */
    items: () => values(data),

    /**
     * Returns a formatter adapted to the content of this field.
     */
    formatter: () => formatter(data),

    value,
    label,
  };

  return f;
}
/**
 * Create a new field with default settings
 * @ignore
 * @return {Field} Data field
 */
Create a new field with default settings
@ignore
@return {Field} Data field
Create a new field with default settings @ignore @return { Field } Data field
function field(
  data,
  {
    id = accessors.id,
    key = accessors.key,
    min = accessors.min,
    max = accessors.max,
    type = accessors.type,
    tags = accessors.tags,
    title = accessors.title,
    values = accessors.values,
    value = accessors.value,
    label = accessors.label,
    formatter = accessors.formatter,
  } = {}
) {
  const f = {
    id: () => id(data),
    key: () => key(data),
    raw: () => data,
    tags: () => tags(data),
    type: () => type(data),
    min: () => min(data),
    max: () => max(data),
    title: () => title(data),
    items: () => values(data),
    formatter: () => formatter(data),
    value,
    label,
  };
  return f;
}
function field ( data , { id = accessors . id , key = accessors . key , min = accessors . min , max = accessors . max , type = accessors . type , tags = accessors . tags , title = accessors . title , values = accessors . values , value = accessors . value , label = accessors . label , formatter = accessors . formatter , } = { } ) { const f = { id : ( ) => id ( data ) , key : ( ) => key ( data ) , raw : ( ) => data , tags : ( ) => tags ( data ) , type : ( ) => type ( data ) , min : ( ) => min ( data ) , max : ( ) => max ( data ) , title : ( ) => title ( data ) , items : ( ) => values ( data ) , formatter : ( ) => formatter ( data ) , value , label , } ; return f ; }
Create a new field with default settings
 @ignore
 @return {Field} Data field
Create a new field with default settings @ignore @return { Field } Data field
/**
   * @alias Field
   */ /**
     * Returns this field's id
     * @returns {string}
     */ /**
     * Returns this field's key
     * @returns {string}
     */ /**
     * Returns the input data
     * @returns {any}
     */ /**
     * Returns the tags.
     * @return {Array<string>}
     */ /**
     * Returns this field's type: 'dimension' or 'measure'.
     * @return {string}
     */ /**
     * Returns the min value of this field.
     * @return {number}
     */ /**
     * Returns the max value of this field.
     * @return {number}
     */ /**
     * Returns this field's title.
     * @return {string}
     */ /**
     * Returns the values of this field.
     * @return {Array<DatumExtract>}
     */ /**
     * Returns a formatter adapted to the content of this field.
     */