- All Known Implementing Classes:
StandardCategoryColorSource
public interface CategoryColorSource
A color source that can supply the colors for category plots. This is the
interface through which the renderer will obtain colors for each data item
in the chart. A default implementation
(
StandardCategoryColorSource
) is provided and you can customise
the rendering colors by providing an alternate implementation.-
Method Summary
Modifier and TypeMethodDescriptiongetColor
(int series, int row, int column) Returns the color for one data item in the chart.getLegendColor
(int series) Returns the color to be used in the legend to represent the specified series.void
Restyles the source using the specified colors.
-
Method Details
-
getColor
Returns the color for one data item in the chart. We return aColor
rather than a paint, because some manipulations are done for the shading during the 3D rendering.- Parameters:
series
- the series index.row
- the row index.column
- the column index.- Returns:
- The color.
-
getLegendColor
Returns the color to be used in the legend to represent the specified series.- Parameters:
series
- the series index.- Returns:
- The color.
-
style
Restyles the source using the specified colors. Refer to the implementing class to confirm the precise behaviour (typically all existing color settings are cleared and the specified colors are installed as the new defaults).- Parameters:
colors
- the colors.- Since:
- 1.2
-