) (#212013)
# Backport
This will backport the following commits from `main` to `8.x`:
- [[ES|QL][Lens] Keeps the chart configuration when possible
(#210780)](#210780)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-02-21T08:24:00Z","message":"[ES|QL][Lens]
Keeps the chart configuration when possible (#210780)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/186366\n\n\n\n\nIt
keeps the chart configuration when the user is doing actions\ncompatible
with the current query such as:\n\n- Adding a where filter\n- Changing
to a compatible chart type (from example from bar to line or\npie to
treemap)\n- In general changing the query that doesnt affect the
generated columns\nmapped to a chart.\n\n### Release notes\n\nKeeps the
chart configuration changes done by the user when changing the\nquery
whenever it is possible.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"cb77b978877443cdce12f00a42e54609c0b36dbc","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:Visualizations","Feature:Lens","Feature:ES|QL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL][Lens]
Keeps the chart configuration when
possible","number":210780,"url":"https://github.com/elastic/kibana/pull/210780","mergeCommit":{"message":"[ES|QL][Lens]
Keeps the chart configuration when possible (#210780)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/186366\n\n\n\n\nIt
keeps the chart configuration when the user is doing actions\ncompatible
with the current query such as:\n\n- Adding a where filter\n- Changing
to a compatible chart type (from example from bar to line or\npie to
treemap)\n- In general changing the query that doesnt affect the
generated columns\nmapped to a chart.\n\n### Release notes\n\nKeeps the
chart configuration changes done by the user when changing the\nquery
whenever it is possible.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"cb77b978877443cdce12f00a42e54609c0b36dbc"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210780","number":210780,"mergeCommit":{"message":"[ES|QL][Lens]
Keeps the chart configuration when possible (#210780)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/186366\n\n\n\n\nIt
keeps the chart configuration when the user is doing actions\ncompatible
with the current query such as:\n\n- Adding a where filter\n- Changing
to a compatible chart type (from example from bar to line or\npie to
treemap)\n- In general changing the query that doesnt affect the
generated columns\nmapped to a chart.\n\n### Release notes\n\nKeeps the
chart configuration changes done by the user when changing the\nquery
whenever it is possible.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"cb77b978877443cdce12f00a42e54609c0b36dbc"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Summary
Closes #186366
It keeps the chart configuration when the user is doing actions compatible with the current query such as:
Release notes
Keeps the chart configuration changes done by the user when changing the query whenever it is possible.
Checklist
release_note:*label is applied per the guidelines