Skip to content

Commit b6c3224

Browse files
florent-leborgnecursoragentleemthompo
authored
docs: document Use global filters option for ES|QL layers (#6351) (#7037)
## Summary This PR addresses #6351 by documenting the new per-layer **Use global filters** option for ES|QL visualizations, added in 9.5.0 and serverless ([elastic/kibana#264613](elastic/kibana#264613)). The same Kibana PR renamed the Lens layer settings action and panel title from **Layer settings** to **Settings** (9.5+), so this PR also brings the existing references up to date. - **`explore-analyze/visualize/esorql.md`**: adds an `Ignore dashboard filters` section explaining that, by default, an ES|QL visualization applies the dashboard filters and the KQL or Lucene query, and that turning off **Use global filters** in the {icon}`gear` **Settings** panel makes a layer run its query independently of them. Clarifies that this covers the dashboard's filter pills and search bar query, while the time range always applies. - **`explore-analyze/visualize/lens.md`**, **`explore-analyze/visualize/charts/pie-charts.md`**, **`explore-analyze/visualize/charts/waffle-charts.md`**: update the Lens layer settings references to the slash form **Settings**/**Layer settings** (so both labels are covered without extra `applies_to` badges), and correct the layer-settings icon from `app_management` to {icon}`gear`. The 9.0-9.2 kebab-menu steps and the separate Maps "Layer settings" label are left unchanged. The ES|QL setting is layer-specific, so it's documented on the dedicated ES|QL visualizations page (narrower scope) rather than the broader Lens page, which already links to it. ### Verified against source at HEAD - Toggle label **Use global filters** (`xpack.lens.layerSettings.ignoreGlobalFilters`) and the **Settings** panel label + {icon}`gear` gear icon (`xpack.lens.layerActions.layerSettingsAction`, `icon: 'gear'`). Confirmed the label was **Layer settings** on the `9.4` branch and **Settings** at HEAD, with the icon `gear` in both. - Default is on: `LENS_IGNORE_GLOBAL_FILTERS_DEFAULT_VALUE = false`, so dashboard filters apply unless the option is turned off. - Turning it off makes the layer ignore the dashboard filter pills and the KQL/Lucene query, but the time range still applies (the time filter is added unconditionally in `esql.ts`; confirmed by tests). ## Resolves Closes #6351 --- > **AI-generated draft** — created with Claude Opus 4.8. > Review all generated content for factual accuracy before merging. --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Liam Thompson <leemthompo@gmail.com>
1 parent cc84480 commit b6c3224

4 files changed

Lines changed: 20 additions & 8 deletions

File tree

explore-analyze/visualize/charts/pie-charts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ This is useful when:
221221
This example uses the **Kibana Sample Data Logs** data set and groups requests by file extension to approximate resource usage: `.zip` files map to processing time, `.gz` files map to bandwidth, and `.rpm` files map to memory usage.
222222

223223
1. Create a **Pie** chart and remove any existing **Slice by** dimension.
224-
2. Open **Layer settings**:
225-
* {applies_to}`serverless: ga` {applies_to}`stack: ga 9.3` Select {icon}`app_management` **Layer settings**.
224+
2. Open the layer settings:
225+
* {applies_to}`serverless: ga` {applies_to}`stack: ga 9.3` Select {icon}`gear` **Settings**/**Layer settings**.
226226
* {applies_to}`stack: ga 9.0-9.2` Select {icon}`boxes_vertical`, then select **Layer settings**.
227-
3. Select **Multiple metrics**, then close the **Layer settings** menu.
227+
3. Select **Multiple metrics**, then close the layer settings menu.
228228
4. Add metrics for each resource type:
229229

230230
| Slice | Metric configuration | Filter |

explore-analyze/visualize/charts/waffle-charts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ You can use **Multiple metrics** to show progress toward a goal, with filled squ
8585
This example uses the **Kibana Sample Data eCommerce** data set. If you haven't installed it yet, refer to [Sample data](/manage-data/ingest/sample-data.md) for instructions.
8686

8787
1. Create a **Waffle** chart using the **Kibana Sample Data eCommerce** {{data-source}}.
88-
2. Open **Layer settings**:
89-
* {applies_to}`serverless: ga` {applies_to}`stack: ga 9.3` Select {icon}`app_management` **Layer settings**.
88+
2. Open the layer settings:
89+
* {applies_to}`serverless: ga` {applies_to}`stack: ga 9.3` Select {icon}`gear` **Settings**/**Layer settings**.
9090
* {applies_to}`stack: ga 9.0-9.2` Select {icon}`boxes_horizontal`, then select **Layer settings**.
9191
3. Select **Multiple metrics**, then close the layer settings.
9292
4. Add two metrics:

explore-analyze/visualize/esorql.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,18 @@ serverless: ga
130130

131131
Drilldowns can only be triggered from values backed by a field that exists in the underlying index. Values produced by {{esql}} commands like `EVAL` or `STATS` are not backed by an index field, so the drilldown option is not available when you click on those columns or series. For more information, refer to [Add pills by interacting with visualizations](../dashboards/using.md#_add_pills_by_interacting_with_visualizations).
132132

133+
## Ignore dashboard filters [esql-viz-ignore-dashboard-filters]
134+
```{applies_to}
135+
stack: ga 9.5
136+
serverless: ga
137+
```
138+
139+
By default, an {{esql}} visualization applies the filters and the KQL or Lucene query set at the dashboard level. To force a layer to run its query without these filters:
140+
1. Select the {icon}`gear` **Settings** icon on the layer header.
141+
2. Turn off **Use global filters**.
142+
143+
This option covers the dashboard's filter pills and the query from the search bar. The dashboard time range is a separate control that always applies, whether or not the option is turned on.
144+
133145
## Create an alert from your {{esql}} visualization
134146
```{applies_to}
135147
stack: ga 9.1

explore-analyze/visualize/lens.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ To create partition charts, such as pie charts, configure one or more **Slice by
274274

275275
For detailed instructions on creating pie charts, including best practices and configuration options, refer to [Build pie charts with {{kib}}](/explore-analyze/visualize/charts/pie-charts.md).
276276

277-
1. In the layer pane, click ![Actions menu for the partition visualization layer](/explore-analyze/images/kibana-lens_layerActions_8.5.0.png ""), then select **Layer settings**.
277+
1. In the layer pane, click ![Actions menu for the partition visualization layer](/explore-analyze/images/kibana-lens_layerActions_8.5.0.png ""), then select **Settings**/**Layer settings**.
278278
2. Select **Multiple metrics**.
279279
3. Click **X**.
280280

@@ -284,7 +284,7 @@ For detailed instructions on creating pie charts, including best practices and c
284284
stack: preview
285285
```
286286

287-
Data sampling allows you to improve the visualization loading time. When you can create your visualization, click the **Layer settings** icon {icon}`app_management` and use the slider to adjust the **Sampling** percentage. For example, on large datasets, you can decrease the loading time by using a lower sampling percentage. This increases performance but lowers the accuracy.
287+
Data sampling allows you to improve the visualization loading time. When you create your visualization, click the **Settings**/**Layer settings** icon {icon}`gear` and use the slider to adjust the **Sampling** percentage. For example, on large datasets, you can decrease loading time by using a lower sampling percentage. This increases performance but reduces accuracy.
288288

289289

290290
### Add annotations [add-annotations]
@@ -299,7 +299,7 @@ Click the **Add layer** icon {icon}`plus_square` , select **Annotations** and se
299299
1. Select the {{data-source}} for the annotation.
300300
2. From the fields list, drag a field to the **Horizontal axis** field.
301301

302-
To use global filters in the annotation, click the **Layer settings** icon {icon}`app_management` on the annotations layer, and select **Use global filters**.
302+
To use global filters in the annotation, click the **Settings**/**Layer settings** icon {icon}`gear` on the annotations layer, and select **Use global filters**.
303303

304304
From the annotation panel, you can choose the type of placement and adjust the its appearance.
305305

0 commit comments

Comments
 (0)