Colours, gradients and patterns
Skip to:
This page describes how to override the default colour list with your own selection of colours, gradients and pattern fills. The same colour formats are used for specifying how to fill the background areas of legends, tooltips, the grid area and the whole graph background area.
From version 3.4 SVGGraph also supports the use of gradients and patterns for stroking lines.
The colour list
In earlier versions of SVGGraph the default colours used for bars, pie slices and markers were picked at random from the list of named colours that SVG supports. In version 2.10, a new default colour scheme was added to make graphs more usable without having to choose your own.
The colours used may be overridden from the default set by passing an array
of SVGGraph colour types to the colours() function:
