NATS4 Chart Colors
WARNING
THE FOLLOWING ARTICLE IS INTENDED FOR ADVANCED USERS. THIS ARTICLE IS WRITTEN WITH THE IMPLIED UNDERSTANDING THAT THE READER IS KNOWLEDGABLE IN HTML AND PHP, AND IS COMFORTABLE WITH CONFIGURING NATS FROM A UNIX/LINUX CLI.
Chart Colors
Currently the only way to change these colors is to manually edit your config.php file. If you edit this file incorrectly, it can disable your entire NATS install.
TMM Tech Support will NOT be held responsible if you corrupt your config.php in any way, shape, or form.
Please DO NOT attempt to change these settings unless you are comfortable and capable of editing a php script.
We are looking into integrating these settings to the Configuration Admin in a future release of NATS.
NATS currently provides 6 different color palettes that are used for the graphs in NATS 4. Each palette in config.php is represented by an array of possible colors (in hexadecimal format). These are the default palettes as they are set at installation:
$config['CHART_COLORS'] = Array('ff7733', 'ff8833', 'ff9933', 'ffaa33', 'ffbb33', 'ffcc33', 'ffdd33', 'ffee33'); $config['CHART_COLORS_2'] = Array('094786', '1A5591', '2B649D', '3C72A8', '4D80B4', '5F8EBF', '709DCB', '77BBD6'); $config['CHART_COLORS_3'] = Array('00FFFF', '7FFFD4', 'FF0000', 'FFEBCD', '0000FF', '8A2BE2', 'A52A2A', '5F9EA0', '7FFF00', 'D2691E', 'FF7F50', '6495ED', 'DC143C', '00008B', '008B8B', 'B8860B', 'A9A9A9', '006400', '8B008B', 'FF8C00', '8FBC8F', 'FF1493', '2F4F4F', 'FFD700', '808000'); $config['CHART_COLORS_4'] = Array('094786', '25649A', '4081AE', '5C9EC2', '77BBD6'); $config['CHART_COLORS_5'] = Array('FFFFCC', 'FFFF33', 'FFCC33', 'FF9900', 'FF6600'); $config['CHART_COLORS_6'] = Array('FF7733', 'FF9533', 'FFB333', 'FFD033', 'FFEE33');
By default, every template that displays a graph chooses a specific palette for each graph. The exact palette varies from template to template. Please refer to the source code of the template you are editing to see which palette is being used.
Although there are exceptions, these are some general guidelines to follow:
- Palettes 1 and 2 contain 8 colors, and are typically used by pie graphs.
- Palette 3 is typically used by bar graphs that use a large number of colors.
- Palettes 4 and 6 are typically used for demographic breakdowns.