elastic / elastic/docs-content

Bind dashboard ES|QL variables in Vega visualizations

Open
#8,132 1 comment 0 reactions 1 assignee Claimed by @florent-leborgne View on GitHub
Feature: Visualizations Team:SKI
Dominant language
No language data
Stars
47
Forks
261
Avg merge
3d 21h
Merged PRs (30d)
141

Description

## Summary

Vega panels that use an ES|QL data source now bind dashboard variable controls. Dashboard values merge with any `data.url.params` in the spec, and the dashboard value wins when names collide. The legacy Visualize editor still errors if the query has variables and the spec has no matching params. Canvas has the same limitation. On a dashboard, clicking a control label now highlights related Vega panels.

**Why this needs docs:** Published Vega and dashboard-control pages document ES|QL params and variable controls, but they omit Vega binding, dashboard precedence, and the Visualize/Canvas caveats.

## Resources

- PR [#285778](https://github.com/elastic/kibana/pull/285778) — [Vega] Support ES|QL variables

## Availability

| Channel | Details |
|---------|---------|
| **Stack** | v9.6.0 |
| **Serverless** | Aug 31–Sep 4 |
| **Feature flag** | None — active by default |

---
*Created with [Docs Quest Scanner](https://github.com/florent-leborgne/docs-quest-scanner) by @florent-leborgne*

## Suggested edits

[Custom visualizations with Vega](https://www.elastic.co/docs/explore-analyze/visualize/custom-visualizations-with-vega) > Writing ES|QL queries in Vega
- **What the docs say:** The url object lists a params parameter as an array of named parameter objects to substitute into the query. It does not mention dashboard variable controls.
- **What to add:** Add that dashboard ES|QL variable controls bind to `?name` and `??name` in the query. Say spec `params` merge with dashboard variables, and the dashboard value wins on a name collision. Note that the Visualize library editor and Canvas error if the query has variables and the spec has no matching params. Applies from 9.6.0 and in serverless.

[Dashboard controls](https://www.elastic.co/docs/explore-analyze/visualize/dashboard-controls) > Scope by control type
- **What the docs say:** Variable controls affect only the ES|QL visualizations whose query references the control's variable. They don't filter other panels.
- **What to add:** Widen the scope sentence so Vega panels with an ES|QL data source also bind when the query references the variable. Keep the note that selecting the control label highlights related panels. Applies from 9.6.0 and in serverless.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.