Defines one 'span' within the link colour-coding table.
SCALE is used to specify how NODEs and LINKs are colour-coded according to their percent usage. If the percentage usage falls between min and max then the colour specified by red, green and blue is used to colour the link. Colour values are between 0 and 255. Percentages are between 0 and 100, obviously.
In combination with the 'absolute' option of USESCALE, you can also use raw data from TARGET lines. Just use the absolute values for min and max in SCALE lines. In this format, min and max can use the same abbreviations for mega, giga etc as BANDWIDTH and MAXVALUE can.
If you specify two colours on the line (the third and fourth forms above), then the colour chosen for the link will be calculated as a proportion between the two colours. You can avoid specifying many SCALE lines this way.
If you specify the word 'none' instead of a colour, then a transparent colour is used for that range of values.
Without a scalename, the SCALE line will add a definition to the scale named 'DEFAULT'. If you define any other named scales, you can then use the USESCALE directive to specify that a particular NODE or LINK use your new scale.
With any of the formats, you can specify a 'tag' on the end of the line. When the colour is decided for the 'in' and 'out' parts of a NODE or LINK, then a special SET variable is defined called {node:this:inscaletag} (or outscaletag, or link:this...) which contains the tagtext from the SCALE line that matched. You can use this to do things like choose an icon, or change the label of a node or link based on a percentage. There are examples of this (and most other node-related formatting things) in the suite-1.conf map found in the random-bits/ folder of the weathermap distribution.
If you don't add any SCALE lines to a configuration file, then a default set is added for you, but as soon as you add one, you'll need to make enough to cover the whole 0-100 range to get nice colours. Any percentage not matched by SCALE rules is rendered in grey.
You can specify a colour for an exact percentage (e.g. zero) by using that value for both the min and max values. The scale lines are sorted by min then max, and scanned from top to bottom. The first match wins.
To show a legend in the map for a given SCALE, you should use KEYPOS and KEYSTYLE.
You can also apply SCALEs to colorise ICON images. You do this using USEICONSCALE.