SCALE CLASSES
Classes can automatically determine colors and sizes for objects, based on your KPIs. Easy, simple and fast. The fx-Dialog is structured as follows: Legend Objects Classes |
Classes assign number values (KPIs) to appropriate group values (e.g. a Marker size group) or gradient/course values (e.g. a color gradient) - like each sale a Polygon color or each amount a Marker size.
Instead of using complex formulas to determine relating colors or sizes, it suffices to set a number value (KPI) inside MAP/MARKER/LINES SETTINGS - all settings that end on "%".
Common color assignment by using if-formulas:
& '#Color=' & if(sum(Sales)<100000, 'red',
if(sum(Sales)<200000, 'orange',
if(sum(Sales)<400000, 'yellow', 'green')))
Class based color assignment with Color%:
& '#Color%=' & sum(Sales)
Class based size assignment with Size%:
& '#Size%=' & sum(Sales)
The Classes in this fx‑editor can be used as templates - you can copy and configure them as needed.
|
The Classes |
|||
class type/ |
type = 1 or type = 2 |
type = 3 |
type = 4 |
type = 5 |
description |
Even gradient or uniform course from a minimum size to a maximum size. |
Classification into groups with custom boundaries. |
Classification into groups with automatically even distributed boundaries. |
Classification into groups whose boundaries are set by the use of the Quantile* (also known as Percentile) - partitions the data in percentage groups. * read more about Quantile at wikipedia.org/Quantile |
calculation basis |
The even gradient assigns every object (its number value) to an individual color or size. SIZE: The smallest number is assigned to the first set Marker size, the largest number to the second one. In between the Marker sizes are spread continuously and evenly. COLOR: Based on the set colors (two or more) a scale of RGB values is created between the smallest and the largest number. The smallest number is assigned to the first set color, the largest number to the last one. Any intermediate colors set are evenly spread in between. The scale creates all possible shades of the colors set in the class. (The use of Marker images instead of colors is not possible in this class type, due to logical reasons) |
The number values are assigned to groups with custom boundaries. The groups are defined by a minimum (smallest number in this group) and a related color/image or Marker size. Like this any number of groups can be configured. |
The difference between the smallest and the largest number is divided in as many equal groups, as there are records (colors/images or sizes) set in the class. |
The quantile mode sorts the numbers in ascending order and splits them into groups, each with the same amount (!) of numbers in them. The numerical values themselves are irrelevant in this case. The records (colors/images or sizes) set in the class define the number of groups being created. |
example |
The following example is about 100 customers (Markers) in the US (states = Polygons) with sales between about $ 50,000 and $ 900,000. |
|||
This class type turns out clearly that California is the best selling state, although more "green" and good customers are located in the eastern states. Looks like the turnover correlates with the population. |
Here you can see at a glance that the three major customers are located along the east cost. Two out of the four smallest turnovers are located in the two best selling states California and Texas. |
This map shows that most of all states are not selling more than about two million dollars. The business could be focused on the five most worthwhile states. |
The Markers on this map show clearly, that the better 50% of customers live in the eastern part of the US. The south west coast is still the best selling region at all. |
|
explanation |
The Even Gradient assigns every number to an individual color or size value. Therefore more subtle differences appear and outliers can be detected very easily. |
When the numbers are known, one advantage of the Fixed Range is to show "nice" and rounded numbers in the legend. Another advantage is to configure the steps and intervals of the ranges individually. This is what makes it the most flexible class type. |
When the numbers could change dynamically or are simply unknown, the system can do the work for you and divide them up into equal units, just as they come. |
Using the Quantile Range reveals percentage insights, because this type doesn't refer to the number values, but just to the amount and position of them. Depending on how many segments are set it shows thirds, quarters and so on. |
As you can add and configure as many classes as you need by using the existing ones as templates, this table shows the most essential technical indications for each type:
type |
default name (ID) |
useable for |
requirements |
calculation basis |
type = 1 |
sizes only (Markers) |
a minimum size and |
The even gradient assigns every object (its number value) to a individual size. The smallest number is assigned to the first set Marker size, the largest number to the second one. In between the Marker sizes are spread continuously and evenly. |
|
type = 2 |
colors only (Polygons und Markers) |
two or more colors |
The even gradient assigns every object (its number value) to a individual color. Based on the set colors (two or more) a scale of RGB values is created between the smallest and the largest number. The smallest number is assigned to the first set color, the largest number to the last one. Any intermediate colors set are evenly spread in between. The scale creates all possible shades of the colors set in the class. Every object gets his own color shade - only identical number values get the same color. |
|
type = 3 |
each for colors and sizes (Polygons und Markers) |
for each group (range) a minimum number value (range start) and a color or size |
The number values are assigned to groups with custom boundaries. The groups are defined by a minimum (smallest number in this group) and a related color/image or Marker size. Like this any number of groups can be configured. |
|
type = 4 |
for each group (range) a color or size |
The difference between the smallest and the largest number is divided in as many equal groups, as there are records (colors/images or sizes) set in the class. |
||
type = 5 |
for each group (range) a color or size - the amount of color or size values define the type of quantile (thirds, quarters,...) |
The quantile mode sorts the numbers in ascending order and splits them into groups, each with the same amount (!) of numbers in them. The numerical values themselves are irrelevant in this case. The records (colors/images or sizes) set in the class define the number of groups being created. |
Any number of Classes can be set in this this fx‑editor by using the types and requirements in the table above.
All eight possible Classes (each four for colors and sizes) are already in the dialog by default and can be used as templates.
From here on begins the explanation of all the settings in this fx‑editor:
COLOR & SIZE CLASSES |
||||
---|---|---|---|---|
SETTING / VALUES |
EXPLANATION |
|||
|
||||
As soon an a Layer using classes is enabled, a Legend is displayed. (The Legend can be disabled individually or just hidden using the Layerswitcher.) Legends are not only for information, but a powerful analysis tool - they steer PopUpVariables, take Selections, change and recalculate dynamically and interact with the map using a Highlight effect. Tooltips show the amount of objects the Legend segments contain - if the cursor hovers over a caption, the Tooltip even sums up the amounts of the segments included. Legend segments of Cluster show both the amount of Clustermarkers or Hexagons and the amount of Markers clustered by them. |
||||
active 1 Legend is basically displayed (default) 0 Legend is not displayed |
Defines if Legend should be displayed basically or not. |
|||
dock 0 legend is freely movable (default) 1 legend docked on the right 2 legend docked on the left |
Docks the legend on the right or left side. As long as the legend is not docked, it may be dragged freely somewhere on the map. (The following feature can set a specific position on the map.) |
|||
opacity number Transparency of the symbols in the legend in percent % (default is 0) |
Defines the transparency of the color symbols in the legend. |
|||
character Currency symbol to be used in the legend (default is the Euro sign "€") |
Defines the used currency symbol in the legend. It defines which symbol would be used in the legend in general. It can be configured separately for each class, if a currency symbol should be displayed or not - see more further below at numberformat. |
|||
headerfont font Font of the legend header (default is Arial) |
Type, weight, color and size of the legend header font. |
|||
headerfontweight fontweight value Fontweight of the legend header (default is "bold") |
||||
headerfontcolor color Font color of the legend header (default is "#5a5a5a") |
||||
headerfontsize number Font size of the legend header (default is 20) |
||||
captionfont font Font of the legend captions (default is "Arial") |
Type, weight, color and size of the legend caption font. |
|||
captionfontweight fontweight value Font weight of the legend captions (no default value - font will be displayed like "normal") |
||||
captionfontcolor color Font color of the legend captions (default is "#5a5a5a") |
||||
captionfontsize number Font size of the legend captions (default is 18) |
||||
|
|
|
||
|
||||
color class name/ID image class name/ID MAP and LINE only: class name/ID LINE only: class name/ID MARKER only: class name/ID MARKER only: class name/ID MARKER only: class name/ID |
These settings assign a Class to an object. Enter the name (the ID) of the respective Class in these settings. This name can be changed as needed - it's just a variable to clearly assign the Classes to the objects. Make sure to use the same notation here and in the Class name/ID. Example: Classes may also be set for Simple Markers, Simple Maps and Cluster. Since especially the Simple objects can be differentiated (each Simple Block may use a different Class), the Class names/IDs are set in their respective dialogs. |
|||
|
|
|||
The following settings are the same for each Class. The "name"/ID of the Classes (default in capital letters, always at the beginning of a Class) may be changed at any time - it's just a variable to clearly assign a Class to an object. Beware to use the same ID and notation here and in the object settings. |
||||
number class type, default names in the same order as they appear in the dialog: EVEN_GRADIENT_COLOR CLUSTER_RANGE_SIZE CLUSTER_RANGE_COLOR |
The class type is like a mode - it defines the way the class works and calculates. |
|||
type |
default name |
short description |
||
type=1 |
EVEN_GRADIENT_SIZE |
Even gradient or uniform course from a minimum size to a maximum size. |
||
type=2 |
EVEN_GRADIENT_COLOR |
Even color gradient from one to an other color via any number of colors in between. |
||
type=3 |
FIXED_RANGE_COLOR FIXED_RANGE_SIZE |
Classification into groups with custom boundaries. |
||
type=4 |
EVEN_RANGE_COLOR EVEN_RANGE_SIZE |
Classification into groups with automatically even distributed boundaries. |
||
type=5 |
QUANTILE_RANGE_COLOR QUANTILE_RANGE_SIZE |
Classification into groups whose boundaries are set by the use of the Quantile* (also known as Percentile) |
||
|
CLUSTER_RANGE_SIZE CLUSTER_RANGE_COLOR |
The Cluster Classes both are actually just another Fixed Range, therefore they're as well type 3. |
||
All Classes in this dialog can be used as templates - you can copy and configure them as needed. The name (ID) of the classes (default in capital letters, always standing at the beginning of each class as a kind of caption) can be changed at any time as needed. It's just a variable to clearly assign the respective class to the objects above. Make sure to use the same notation here and above. More about quantile further above or at wikipedia.org/Quantil |
||||
showlayercaption true/false |
displayed in Legend header |
|||
text Heading displayed in the legend (default is the default class name above without underscores) |
Displayed as heading in the legend. |
|||
true This class will be displayed in the legend (default) false This class won't be displayed in the legend |
Defines if the respective class is displayed in the legend or not. Beware: If you really don't need the Legend, it's better to actually disable it here in order to increase performance - the Layerswitcher only hides, but the Legend will be calculated anyway. |
|||
false Legend segment is not collapsed (default) true Legend segment is collapsed |
Legend segments can be collapsed. |
|||
format Format and notation of numbers in the legend section of this class (default is 0,0 - that means with a thousand separator and no decimals) |
Configure here the format and notation of numbers displayed in the legend section of each class. comma , = thousand separator dollar sign $ = currency symbol In Addition space characters and other symbols can be used directly. Example (Screenshot on the right): "numberformat": "$ 0,000.00", Further examples: INPUT "numberformat": OUTPUT 1500.25 "0,0.00" 1.500,25 1500.25 "0" 1500 1500.25 "0,0.000" 1.500,250 1500.25 "$ 0,0.00" € 1.500,25 0.9 "0,0.00 %" 90,00 % 0.9 "0,0%" 90% |
|||
color |
display empty or null values in a specific color |
|||
From this point on all settings with different requirements depending on the class type are explained, in the same order as the classes are in the dialog. The explanations of the specific settings are combined with a short summary about how the class type works. EVEN_GRADIENT_COLOR EVEN_GRADIENT_SIZE The name (ID) of the classes (default in capital letters, always standing at the beginning of each class as a kind of caption) can be changed at any time as needed. It's just a variable to clearly assign the respective class to the objects above. Make sure to use the same notation here and above. |
||||
= Even color gradient from one to an other color via any number of colors in between. calculation basis: |
||||
values [color array] list of colors for an even gradient - two or more colors required |
At least two colors have to be set to create an even color gradient. You can list any number of colors in between. For the best result only set one shade per color (or of course two, if only one color is used) - for example from gray to blue. Don't set any shades of the same color in between like darkgrey - grey - lightgrey, because it would distort the equability of the calculated colors in a gradient. When setting colors you can use Hex-Codes, HTML color names or RGB For reasons of logic no images can be used with a gradient. |
|||
= Classification into color groups with automatically even distributed boundaries. calculation basis: |
||||
values [color array] list of colors/images for an even range - number of entries defines number of groups |
The number of set colors defines the number of created ranges/groups. When setting colors you can use Hex-Codes, HTML color names or RGB Instead of colors you may also set Images (only for Markers of course). They can be resized dynamically, just like Markers would. Example (file right in folder "image"): "values": "flag.png", Beispiel (file in sub folder "demo"): "values": "demo/airplane.png", Just try those examples by copy-paste in your app - the given images are included in NPGeoMap already! You can also use animated GIF files. |
|||
= Classification into color groups with custom boundaries. calculation basis: This class type turns out to be the only one keeping the same appearance for the objects, even if selections are taken - what makes it possible to create synthetic Legends. |
||||
ranges [range array] list of ranges/groups rangestart number minimum value in this range/group values color color/image for this range/group label text label for this range/group |
You can create as many ranges/groups as you need. When setting colors you can use Hex-Codes, HTML color names or RGB Instead of colors you may also set Images (only for Markers of course). They can be resized dynamically, just like Markers would. Example (file right in folder "image"): "values": "flag.png", Beispiel (file in sub folder "demo"): "values": "demo/airplane.png", Just try those examples by copy-paste in your app - the given images are included in NPGeoMap already! You can also use animated GIF files. Since objects with a Fixed Range always keep the same appearance (the same assigned color or image), even if selections are taken, labels/text can be displayed instead of the number values (see second screenshot on the right). |
|||
= Classification into color groups whose boundaries are set by the use of the Quantile* (also known as Percentile) - partitions the data in percentage groups. calculation basis: |
||||
values [color array] list of colors for an quantile range - number of colors defines number of groups (and type of quantile) |
So the quantile separates the data in percentage groups. 2 colors = median (50%-50%) 3 colors = tertiles (33%-33%-33%) 4 colors = quartiles (25%-25%-25%-25%) 5 colors = quintiles (20%-20%-20%-20%-20%) 10 colors = deciles (10%-10%-10%-10%-10%-10%-10%-10%-10%-10%) etc. More about quantile at wikipedia.org/Quantile When setting colors you can use Hex-Codes, HTML color names or RGB Instead of colors you may also set Images (only for Markers of course). They can be resized dynamically, just like Markers would. Example (file right in folder "image"): "values": "flag.png", Beispiel (file in sub folder "demo"): "values": "demo/airplane.png", Just try those examples by copy-paste in your app - the given images are included in NPGeoMap already! You can also use animated GIF files. |
|||
= Even gradient or uniform course from a minimum Marker size to a maximum Marker size. calculation basis: |
||||
legendsegments number number of segments displayed in legend |
The scaleminsize is the smallest Marker size, the scalemaxsize is the biggest one in the course. unit = pixel |
|||
scaleminsize number minimum Marker size |
||||
scalemaxsize number größte Marker-Größe |
||||
= Classification into Marker size groups with automatically even distributed boundaries. calculation basis: |
||||
values [number array] list of Marker sizes for an even range - amount of sizes defines amount of groups |
The amount of set Marker sizes defines the amount of created ranges/groups. |
|||
= Classification into Marker size groups with custom boundaries. calculation basis: This class type turns out to be the only one keeping the same appearance for the objects, even if selections are taken - what makes it possible to create synthetic Legends. |
||||
ranges [range array] list of ranges/groups rangestart number minimum value in this range/group values number Marker size for this range/group label text label for this range/group |
You can create as many ranges/groups as you need. unit = pixel Since Markers with a Fixed Range always keep the same appearance (the same assigned size), even if selections are taken, labels/text can be displayed instead of the number values (see second screenshot on the right). |
|||
= Classification into Marker size groups whose boundaries are set by the use of the Quantile* (also known as Percentile) - partitions the data in percentage groups. calculation basis: |
||||
values [number array] list of Marker sizes for an quantile range - amount of sizes defines amount of groups (and type of quantile) |
So the quantile separates the data in percentage groups. 2 Marker sizes = median (50%-50%) 3 Marker sizes = terciles (33%-33%-33%) 4 Marker sizes = quartiles (25%-25%-25%-25%) 5 Marker sizes = quintiles (20%-20%-20%-20%-20%) 10 Marker sizes = deciles (10%-10%-10%-10%-10%-10%-10%-10%-10%-10%) etc. More about quantile at wikipedia.org/Quantile unit = pixel |