lib/Models/LegendHelper.js
function getFractionalValue(legendHelper, value) {
  var extremes = getExtremes(
    legendHelper.tableColumn,
    legendHelper.tableColumnStyle
  );
  var f =
    extremes.maximum === extremes.minimum
      ? 0
      : (value - extremes.minimum) / (extremes.maximum - extremes.minimum);
  if (legendHelper.tableColumnStyle.clampDisplayValue) {
    f = Math.max(0.0, Math.min(1.0, f));
  }
  return f;
}
function getFractionalValue(legendHelper, value) {
  var extremes = getExtremes(
    legendHelper.tableColumn,
    legendHelper.tableColumnStyle
  );
  var f =
    extremes.maximum === extremes.minimum
      ? 0
      : (value - extremes.minimum) / (extremes.maximum - extremes.minimum);
  if (legendHelper.tableColumnStyle.clampDisplayValue) {
    f = Math.max(0.0, Math.min(1.0, f));
  }
  return f;
}
function getFractionalValue ( legendHelper , value ) { var extremes = getExtremes ( legendHelper . tableColumn , legendHelper . tableColumnStyle ) ; var f = extremes . maximum === extremes . minimum ? 0 : ( value - extremes . minimum ) / ( extremes . maximum - extremes . minimum ) ; if ( legendHelper . tableColumnStyle . clampDisplayValue ) { f = Math . max ( 0.0 , Math . min ( 1.0 , f ) ) ; } return f ; }
Convert a value to a fractional value, eg. in a column that ranges from 0 to 100, 20 -> 0.2.
TableStyle can override the minimum and maximum of the range.
@private
@param  {Number} value The value.
@return {Number} The fractional value.
Convert a value to a fractional value eg . in a column that ranges from 0 to 100 20 - > 0 . 2 . TableStyle can override the minimum and maximum of the range .