Module ipv4_heatmap::annotations
source · [−]Expand description
CIDR block annotations
There are four types of annotations supported:
- shade: fill a CIDR block with a specified color
- border: outline a CIDR block with a specified color
- label: fit a text label into a CIDR block
- prefix: add CIDR prefix text to a CIDR block
Annotations are stored in a single JSON file that is an array of annotation objects with the following structure:
{
"cidr": "4.0.0.0/8",
"label-color": "#FFFFFFFF",
"label": "Level3",
"label-font": "extras/Lato-Black.ttf",
"border-color": "#FFFFFFFF",
"fill-color": "#FF00FF22",
"display-prefix": true
}
Not all fields are required, but if present:
fill-color
will overlay the specified color on the CIDR regionborder-color
will draw a border around the specified color on the CIDR regionlabel
,label-color
, andlabel-font
(which is optional) will draw the specified label text to fit the CIDR regiondisplay-prefix
will display the CIDR in Inconsolata at the CIDR bottom center w/alpha’d white (if present andtrue
).
in that order.
Structs
Deserialization structure for the annotation JSON object
Annotations on top of the heatmap can be outlines, shades, labels, or the CIDR text. This structure holds all specified annotations.
An annotation describing the CIDR label text & style
An annotation describing the CIDR outline style
An annotation that says to tag each CIDR block with the CIDR text
An annotation describing the CIDR fill style
Functions
Open and read the spefified annotations JSON file.