Graph ColorSequence

Revision as of 21:18, 29 April 2026 by Lchrisman (talk | contribs) (16432 added this sysvar)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


New to Analytica 7.1

SysVar Graph_ColorSequence

This system variable specifies the sequence of colors used for lines, symbols, or bars in graphs. (If the variable is not set, Analytica uses an internal default color sequence.) Each color is specified by color integer in which each color is specified as 0xaarrggbb (in hex notation) or 0x00rrggbb for fully opaque colors.

You can modify the color sequence using "'Change series colors... on the right-mouse context menu for a key or sequence on a graph (i.e., right-click on a key symbol or a curve for the context menu).

In your own code, you could modify the value by assigning to it a list of hex numbers and color names. E.g.,:

Graph_ColorSequence := [ 'blue', 0x0077F010, 'pink', 'green', 0x80C0C0FF, 'magenta',0x00000000 ]

This example specifies only 7 colors. A graph needing more than 7 colors will repeat after the first 7.

The colors in system variable, Graph_ColorSequence are the global default for all graphs. You can override these colors for a single variable by assigning colors to Graph_ColorSequence in the GraphSetup attribute of the variable -- for variable X, for example:

(GraphSetup of X := (GraphSetup of X) & chr(13)
& "Graph_ColorSequence := [0x00FF0000, 0x0000FF00, 0x000000FF, 0x00FFFF00, 0x0000FFFF, 0x00FF00FF, 0x00000000]"

You can also specify the color sequence for a graph template by adding the assignment in the GraphSetup attribute of the template, which will control the color sequence for every graph using that template -- for example for template T:

(GraphSetup of T := (GraphSetup of T) & chr(13)
& "Graph_ColorSequence := [0x00FF0000, 0x0000FF00, 0x000000FF, 0x00FFFF00, 0x0000FFFF, 0x00FF00FF, 0x00000000]")

See Also

Comments


You are not allowed to post comments.