2019-04-01 17:32:11 +02:00
[role="xpack"]
2019-03-04 20:18:20 +01:00
[[vector-style]]
2019-04-19 17:58:02 +02:00
=== Vector styling
2019-03-04 20:18:20 +01:00
2019-04-19 17:58:02 +02:00
When styling a vector layer, you can customize your data by property, such as size and color.
2019-06-19 14:13:55 +02:00
For each property, you can specify whether to use a constant or data driven value for the style.
2019-04-19 17:58:02 +02:00
2020-01-17 18:34:40 +01:00
2019-04-19 17:58:02 +02:00
[float]
[[maps-vector-style-static]]
==== Static styling
Use static styling to specificy a constant value for a style property.
2020-03-16 15:58:16 +01:00
This image shows an example of static styling using the <<add-sample-data, Kibana sample web logs>> data set.
2019-04-19 17:58:02 +02:00
The *kibana_sample_data_logs* layer uses static styling for all properties.
2019-03-04 20:18:20 +01:00
[role="screenshot"]
image::maps/images/vector_style_static.png[]
2020-01-17 18:34:40 +01:00
2019-04-19 17:58:02 +02:00
[float]
[[maps-vector-style-data-driven]]
==== Data driven styling
2020-01-17 18:34:40 +01:00
Use data driven styling to symbolize features by property values.
To enable data driven styling for a style property, change the selected value from *Fixed* or *Solid* to *By value*.
2020-03-16 15:58:16 +01:00
This image shows an example of data driven styling using the <<add-sample-data, Kibana sample web logs>> data set.
2020-01-17 18:34:40 +01:00
The *kibana_sample_data_logs* layer uses data driven styling for fill color and symbol size style properties.
* The `hour_of_day` property determines the fill color for each feature based on where the value fits on a linear scale.
Light green circles symbolize documents that occur earlier in the day, and dark green circles symbolize documents that occur later in the day.
* The `bytes` property determines the size of each symbol based on where the value fits on a linear scale.
Smaller circles symbolize documents with smaller payloads, and larger circles symbolize documents with larger payloads.
[role="screenshot"]
image::maps/images/vector_style_dynamic.png[]
[float]
[[maps-vector-style-quantitative-data-driven]]
==== Quantitative data driven styling
Quantitative data driven styling symbolizes features from a range of numeric property values.
2020-03-09 22:19:25 +01:00
Property values are fit from the domain range to the style range on a linear scale.
For example, let's symbolize <<add-sample-data, Kibana sample web log>> documents by size.
The sample web logs `bytes` field ranges from 0 to 18,000. This is the domain range.
The smallest feature has a symbol radius of 1, and the largest feature has a symbol radius of 24. This is the style range.
The `bytes` property value for each feature will fit on a linear scale from the range of 0 to 18,000 to the style range of 1 to 24.
2020-01-17 18:34:40 +01:00
2020-12-15 20:37:16 +01:00
For color styles, values are fit from the domain range to the color ramp with one of the following:
2020-01-17 18:34:40 +01:00
2020-12-15 20:37:16 +01:00
* *Interpolate (default)*. Interpolate values between min and max to a color band on a linear scale. The color ramp is divided into eight bands.
* *Percentiles*. Use percentiles to divide the color ramp into bands that map to values.
* *Custom*. Define custom color ramp bands and ranges.
2019-04-19 17:58:02 +02:00
2019-07-12 01:16:19 +02:00
When the property value is undefined for a feature:
* *Fill color* and *Border color* are set to transparent and are not visible.
* *Border width* and *Symbol size* are set to the minimum size.
* *Symbol orientation* is set to 0.
2020-01-17 18:34:40 +01:00
When the symbol range minimum and maximum are the same and there is no range:
2019-07-12 01:16:19 +02:00
* *Fill color* and *Border color* are set to last color in the color ramp.
* *Border width* and *Symbol size* are set to the maximum size.
2019-04-19 17:58:02 +02:00
2020-01-17 18:34:40 +01:00
[float]
[[maps-vector-style-qualitative-data-driven]]
==== Qualitative data driven styling
2019-04-19 17:58:02 +02:00
2020-04-06 16:17:50 +02:00
Qualitative data driven styling symbolizes properties, such as strings and IP addresses, by category.
2020-01-17 18:34:40 +01:00
Qualitative data driven styling is available for the following styling properties:
2020-04-06 16:17:50 +02:00
* *Icon*
2020-01-17 18:34:40 +01:00
* *Fill color*
* *Border color*
* *Label color*
* *Label border color*
2020-03-16 15:58:16 +01:00
This image shows an example of quantitative data driven styling using the <<add-sample-data, Kibana sample web logs>> data set.
2020-01-17 18:34:40 +01:00
The `machine.os.keyword` property determines the color of each symbol based on category.
2019-04-19 17:58:02 +02:00
2019-03-04 20:18:20 +01:00
[role="screenshot"]
2020-01-17 18:34:40 +01:00
image::maps/images/quantitative_data_driven_styling.png[]
2019-03-04 20:18:20 +01:00
2019-04-19 17:58:02 +02:00
[float]
[[maps-vector-style-class]]
==== Class styling
Class styling symbolizes features by class and requires multiple layers.
Use <<maps-layer-based-filtering, layer filtering>> to define the class for each layer, and <<maps-vector-style-static, static styling>> to symbolize each class.
2020-03-16 15:58:16 +01:00
This image shows an example of class styling using the <<add-sample-data, Kibana sample web logs>> data set.
2019-04-19 17:58:02 +02:00
* The *Mac OS requests* layer applies the filter `machine.os : osx` so the layer only contains Mac OS requests.
The fill color is a static value of green.
* The *Window OS requests* layer applies the filter `machine.os : win*` so the layer only contains Window OS requests.
The fill color is a static value of red.
[role="screenshot"]
image::maps/images/vector_style_class.png[]