Table of Contents
An important part of creating visually clear graphs is the use of appropriate colors. In order to simplify color handling JpGraph supports several ways to adjust and manipulate color both by value and by name.
Almost all color setting methods (with basically only one exception) for all objects in the graph has one of two names
SetColor()
, Sets the outline color or if the object only have
one color (e.g. a font) it sets this color
SetFillColor()
, Specifies the area fill color for objects
which has a concept of an area.
Both variants of methods take one argument which identifies the color by one of the available color specification methods as described below.
There are a number of "standard colors" known by (more or less) illustrative names. A list of all color names that can be used as well as actual color can be found in Appendix D. Named color list.
For example:
SetColor('white');
SetFillColor('orange');
Always use single quotes for strings when you do not need variable substitution since this is faster.