# The config block

The config block contains configuration options for a given visualization.

These are the fields that each config block can contain:

| Field name             | Description                                                                                                                                                                                                                                  |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `band`                 | Optional. Used in raster numeric visualizations. The raster band that we’ll use to get the data from.                                                                                                                                        |
| `categoricalAttribute` | Mandatory for categorical visualizations. The attribute that contains the categorical attributes that will be used.                                                                                                                          |
| `categories`           | Mandatory for a categorical visualization. An array of the values that will be used as categories. Categories will be rendered from top to bottom following the definition order.                                                            |
| `labelAttribute`       | Optional. Defines which dataset attribute or attributes to use for labeling. If multiple values are provided, the first available one will be used.                                                                                          |
| `method`               | Optional. Used in raster algebra numeric visualizations. The type of operation and the bands used for it.                                                                                                                                    |
| `noData`               | Optional. Used in raster visualizations. Defines values that won’t be shown                                                                                                                                                                  |
| `numericAttribute`     | Mandatory for a numeric visualization. The attribute that contains the numeric values used.                                                                                                                                                  |
| `otherOrder`           | Optional. Used in categorical visualizations. It can be set to either “below” or “above” to make features that do not match any of the defined categories render below or above the other ones. The default position is “below”.             |
| `rasterResampling`     | Optional. Used on raster data visualizations. It can be set to either “nearest” or “linear”. Defaults to “nearest”                                                                                                                           |
| `showOther`            | Optional. Used in categorical visualizations. If this field is set to true it will show all features that do not match any of the defined categories and add an extra entry as the last item in the legend.                                  |
| `steps`                | Mandatory for a numeric visualization. An array of values that are either step based depending on the classification method and number of steps chosen or, for a continuous visualization, the min and max values from the numericAttribute. |

## Default Values

<table><thead><tr><th width="287">Name</th><th>Points</th><th>Polygons</th><th>Lines</th><th>Raster</th></tr></thead><tbody><tr><td><code>rasterResampling</code></td><td>-</td><td>-</td><td>-</td><td>“nearest”</td></tr><tr><td><code>highlightColor</code></td><td>"#EA3891"</td><td>"#EA3891"</td><td>"#EA3891"</td><td>-</td></tr><tr><td><code>highlightStrokeColor</code></td><td>"#EA3891"</td><td>"#EA3891"</td><td>"#EA3891"</td><td>-</td></tr><tr><td><code>dashArray</code></td><td>-</td><td>-</td><td></td><td>-</td></tr><tr><td><code>lineCap</code></td><td>-</td><td>-</td><td>"round"</td><td>-</td></tr><tr><td><code>lineJoin</code></td><td>-</td><td>-</td><td>"round"</td><td>-</td></tr><tr><td><code>opacity</code></td><td>0.9</td><td>0.8</td><td>1</td><td>-</td></tr><tr><td><code>isSandwiched</code></td><td>-</td><td>false</td><td>-</td><td>-</td></tr><tr><td><code>size</code></td><td>4</td><td>-</td><td>2</td><td>-</td></tr><tr><td><code>strokeColor</code></td><td>"#F9F8Fb"</td><td>"#777777"</td><td>-</td><td>-</td></tr><tr><td><code>strokeWidth</code></td><td>1</td><td>1</td><td>-</td><td>-</td></tr></tbody></table>

## Examples

{% code title="Example of a categorical config block" %}

```jsx
"config": [
	{
    "labelAttribute": ["Wikipedia", "faa"],
		"categoricalAttribute": "faa",
		"categories": ["faa-code-1", "faa-code-2", "faa-code-3"],
		"showOther": true,
		"otherOrder": "above"
	}
]
```

{% endcode %}

{% code title="Example of a vector numeric config block" %}

```jsx
"config": [
	{
    "labelAttribute": ["Wikipedia", "faa"],
		"numericAttribute": "percentage",
		"steps": [1, 25, 50, 75, 100]
	}
]
```

{% endcode %}

{% code title="Example of a raster numeric config block" %}

```jsx
"config": {
  "band": 1,
  "method": {"NDVI": {"NIR": 1, "R": 2}},
  "steps": [-0.5, 0.5]
},
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.felt.com/felt-style-language/style-definition-blocks/the-config-block.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
