Package com.smartgwt.client.widgets.chart

# Interface ColorMapper

public interface ColorMapper

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getColor(int index, Object facetValueId, String purpose)`
  Returns the color to be used for the specified chart data - must return a color in the format of of a leading hash (#) plus 6 hexadecimal digits as mentioned in the docs for `CSSColor`.

- ## Method Details

  - ### getColor

    String getColor(int index, Object facetValueId, String purpose)
    Returns the color to be used for the specified chart data - must return a color in the format of of a leading hash (#) plus 6 hexadecimal digits as mentioned in the docs for `CSSColor`.
    Parameters:
      `index` - index of the legend facet value to be rendered
      `facetValueId` - id of the legend facet value to be rendered
      `purpose` - purpose for the requested gradient - such as "legend", "line", "area", "points", etc.
    Returns:
      color
    See Also:
      - `FacetChart.setDataColorMapper(com.smartgwt.client.widgets.chart.ColorMapper)`
      - `FacetChart.setDataLineColorMapper(com.smartgwt.client.widgets.chart.ColorMapper)`
      - `MetricSettings.setDataColorMapper(com.smartgwt.client.widgets.chart.ColorMapper)`
      - `MetricSettings.setDataLineColorMapper(com.smartgwt.client.widgets.chart.ColorMapper)`