Colors |
|
The colors used to display individual datasets within a chart can be controlled in several ways. They can be:
These methods are described below.
Method |
Description | |||||||||||||||||||||
Presets |
Colors of individual datasets can be defined in the chart definition Presets by setting the Data Set number and setting the Property to TextColour. Note: | |||||||||||||||||||||
Program |
Programmatically set the dataset colors by setting the 'CurrentSet property to the Data Set number and setting the 'TextColour$ property to the desired color. | |||||||||||||||||||||
Themes and Visual Classes |
Use the Chart Colors property in the Themes Maintenance and Visual Classes Maintenance utilities to select the colors to apply when plotting the different datasets of a chart. Click the dotted Query button or double click inside the cell to display the Chart Colors window, which provides a grid for assigning the colors:
This window consists of the following:
(The Chart Colors property in Themes Maintenance and Visual Classes Maintenance was added in PxPlus 2020.) | |||||||||||||||||||||
Template File |
The template file is a text file consisting of a list of colors (one per line). The file name must be chart_clrs.txt and be located in a sub-directory of *plus/inomads/templates. For example, the default colors used for the Google charts are defined in *plus/inomads/templates/default/chart_clrs.txt. Note: | |||||||||||||||||||||
NOMADS Global Variable |
(NOMADS Only) Create a string consisting of color names (the last character in the string will be used as the separator) and assign it to the global variable
%NOMAD_Chart_Colors$. |
Colors can be specified using standard PxPlus colors (e.g. Light Red, Dark Blue, etc.), User-Defined colors (e.g. COLOR16), and RGB settings (e.g. RGB:192 255 192). Expressions may also be used in Theme and Visual Class settings for charts. If there are more datasets than colors specified, the colors will repeat.
Color precedence is:
1. Programmed colors
2. Preset colors
3. Visual Class settings
4. Theme settings
5. Colors specified in the %NOMAD_Chart_Colors$ variable
6. Template colors