code: function(tableColumn, tableStyle, regionProvider, name) {
    this.tableColumn = tableColumn;
    this.tableStyle = defined(tableStyle) ? tableStyle : new TableStyle(); // instead of defaultValue, so new object only created if needed.
    this.tableColumnStyle = getTableColumnStyle(tableColumn, this.tableStyle);
    this.name = name;
    var noColumnIndex =
      hashFromString(name || "") % defaultNoColumnColorCodes.length;
    this._noColumnColorArray = getColorArrayFromCssColorString(
      defaultNoColumnColorCodes[noColumnIndex],
      defaultNoColumnColorAlpha
    );
    this._legend = undefined; // We could make a getter for this if it is ever needed.
    this._colorGradient = undefined;
    this._binColors = undefined; // An array of objects with upperBound and colorArray properties.
    this._regionProvider = regionProvider;
    if (defined(this.tableColumnStyle.nullColor)) {
      this._nullColorArray = getColorArrayFromCssColorString(
        this.tableColumnStyle.nullColor
      );
    } else {
      this._nullColorArray = defined(regionProvider)
        ? noColorArray
        : defaultColorArray;
    }
    this._cycleEnumValues = false;
    this._cycleColors = undefined; // Array of colors used for the cycle method
  
    this.tableColumnStyle.legendTicks = defaultValue(
      this.tableColumnStyle.legendTicks,
      0
    );
    this.tableColumnStyle.scale = defaultValue(this.tableColumnStyle.scale, 1);
  }
docs: Legends for table columns depend on both the table style and the selected column.
  This class brings the two together to generate a legend.
  Its key output is legendUrl.
  
  @alias LegendHelper
  @constructor
  
  @param {TableColumn} tableColumn The column whose values inform the legend.
  @param {TableStyle} [tableStyle] The styling for the table.
  @param {RegionProvider} [regionProvider] The region provider, if region mapped. Used if no table column set.
  @param {String} [name] A name used in the legend if no active column is selected.