function _createScaleObjectForValue(attr, value, type, accessor, accessor0) {
  if (type === LITERAL_SCALE_TYPE) {
    return {
      type: LITERAL_SCALE_TYPE,
      domain: [],
      range: [value],
      distance: 0,
      attr,
      baseValue: undefined,
      isValue: true,
      accessor,
      accessor0
    };
  }
  if (typeof value === 'undefined') {
    return null;
  }
  return {
    type: CATEGORY_SCALE_TYPE,
    range: [value],
    domain: [],
    distance: 0,
    attr,
    baseValue: undefined,
    isValue: true,
    accessor,
    accessor0
  };
}
Create custom scale object from the value. When the scale is created from
this object, it should return the same value all time.
@param {string} attr Attribute.
@param {*} value Value.
@param {string} type - the type of scale being used
@param {function} accessor - the accessor function
@param {function} accessor0 - the accessor function for the potential naught value
@returns {Object} Custom scale object.
@private