public final class

ChartPalette

extends Object
java.lang.Object
   ↳ com.artfulbits.aiCharts.Base.ChartPalette

Class Overview

Represents palette class. Palette provides set of colors used to draw each series or each series' segment depending on corresponding chart type.

Summary

Fields
public static final ChartPalette Grayscale Retrieves predefined Grayscale palette initialized with following set of colors: 0xFFA3A3A3, 0xFF7A7A7A, 0xFF282828, 0xFF484848.
public static final ChartPalette MSOffice Retrieves predefined MSOffice palette initialized with following set of colors: 0xFF9999FF, 0xFF993366, 0xFFFFFFCC.
public static final ChartPalette OpenOffice Retrieves predefined OpenOffice palette initialized with following set of colors: 0xFF004586, 0xFFFF420E, 0xFFFFD320, 0xFF579D1C, 0xFF7E0021, 0xFF7E0021.
public static final ChartPalette Rainbow Retrieves predefined Rainbow palette initialized with following set of colors: 0xFFFF0000, 0xFFFFA500, 0xFFFFFF00, 0xFF008000, 0xFF0000FF, 0xFF0000FF, 0xFFEE82EE.
Public Constructors
ChartPalette(int... colors)
Initializes a new instance of ChartPalette class with specified colors.
Public Methods
int getColor(int index)
Gets color at specified index.
int getSize()
Gets number of colors in palette.
int[] getValues()
Gets colors of palette.
static ChartPalette rangePalette(int firstColor, int lastColor, int paletteSize)
Represents range palette builder.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final ChartPalette Grayscale

Retrieves predefined Grayscale palette initialized with following set of colors: 0xFFA3A3A3, 0xFF7A7A7A, 0xFF282828, 0xFF484848.

public static final ChartPalette MSOffice

Retrieves predefined MSOffice palette initialized with following set of colors: 0xFF9999FF, 0xFF993366, 0xFFFFFFCC.

public static final ChartPalette OpenOffice

Retrieves predefined OpenOffice palette initialized with following set of colors: 0xFF004586, 0xFFFF420E, 0xFFFFD320, 0xFF579D1C, 0xFF7E0021, 0xFF7E0021.

public static final ChartPalette Rainbow

Retrieves predefined Rainbow palette initialized with following set of colors: 0xFFFF0000, 0xFFFFA500, 0xFFFFFF00, 0xFF008000, 0xFF0000FF, 0xFF0000FF, 0xFFEE82EE.

Public Constructors

public ChartPalette (int... colors)

Initializes a new instance of ChartPalette class with specified colors.

Parameters
colors color values.

Public Methods

public int getColor (int index)

Gets color at specified index.

Parameters
index index of color.
Returns
  • color value.

public int getSize ()

Gets number of colors in palette.

Returns
  • zero-based quantity of colors in palette.

public int[] getValues ()

Gets colors of palette.

Returns
  • array of color-representing integers.

public static ChartPalette rangePalette (int firstColor, int lastColor, int paletteSize)

Represents range palette builder.

Parameters
firstColor starting palette color.
lastColor ending palette color.
paletteSize size of palette.
Returns