Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Axis filters are not consistently applied in drilldown actions for filtered axes #195859

Open
simonhearne opened this issue Oct 11, 2024 · 1 comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Drilldowns Embeddable panel Drilldowns Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@simonhearne
Copy link

Kibana version: 8.15.2

**Elasticsearch version:**8.15.2

Server OS version: N/A

Browser version: N/A

Browser OS version: N/A

Original install method (e.g. download page, yum, from source, etc.): ESS

Describe the bug:
When creating custom bar charts using filters, these filters are not applied in drilldown actions such as Open in Discover and Apply filter to current view.

Steps to reproduce:

  1. Load Sample Ecommerce Data
  2. Create a new dashboard with a bar chart with at least two vertical axes defined by filters (e.g. Ecommerce Sample Data / filter by customer_gender : "MALE|FEMALE"). Set horizontal axis to filters.
  3. Create a drilldown action to open in discover with filters
  4. Note that applying filter to view only applies the horizontal axis filter
  5. Note that the drilldown action to open in discover applies all axis filters with an OR operator

Expected behavior:

  1. Apply filter to current view should apply the horizontal and vertical axis filters
  2. Open in discover should apply horizontal and selected vertical axis filters

Screenshots (if relevant):
Image
Image
Image

Dashboard JSON

{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"alias\":\"\\\"category.keyword\\\" : *\",\"type\":\"custom\",\"key\":\"query\",\"disabled\":false,\"negate\":false,\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"bool\":{\"must\":[],\"filter\":[{\"bool\":{\"should\":[{\"exists\":{\"field\":\"category.keyword\"}}],\"minimum_should_match\":1}}],\"should\":[],\"must_not\":[]}},\"$state\":{\"store\":\"appState\"}}]}"},"optionsJSON":"{\"useMargins\":true,\"syncColors\":false,\"syncCursor\":true,\"syncTooltips\":false,\"hidePanelTitles\":false}","panelsJSON":"[{\"type\":\"lens\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"c466059f-6818-4223-95d1-95fbd7ac3dba\"},\"panelIndex\":\"c466059f-6818-4223-95d1-95fbd7ac3dba\",\"embeddableConfig\":{\"attributes\":{\"title\":\"Glencore Test\",\"description\":\"\",\"visualizationType\":\"lnsXY\",\"type\":\"lens\",\"references\":[{\"type\":\"index-pattern\",\"id\":\"ff959d40-b880-11e8-a6d9-e546fe2bba5f\",\"name\":\"indexpattern-datasource-layer-cd4a46f7-b890-4b23-b355-3effd1c5610c\"}],\"state\":{\"visualization\":{\"legend\":{\"isVisible\":true,\"position\":\"right\"},\"valueLabels\":\"hide\",\"fittingFunction\":\"None\",\"axisTitlesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"tickLabelsVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"labelsOrientation\":{\"x\":0,\"yLeft\":0,\"yRight\":0},\"gridlinesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"preferredSeriesType\":\"bar\",\"layers\":[{\"layerId\":\"cd4a46f7-b890-4b23-b355-3effd1c5610c\",\"accessors\":[\"6ec7d4ff-7cef-4abc-9b8e-1adcdb44d4af\",\"63c5196e-feab-431c-ab78-c47cbeab1c43\"],\"position\":\"top\",\"seriesType\":\"bar\",\"showGridlines\":false,\"layerType\":\"data\",\"colorMapping\":{\"assignments\":[],\"specialAssignments\":[{\"rule\":{\"type\":\"other\"},\"color\":{\"type\":\"loop\"},\"touched\":false}],\"paletteId\":\"eui_amsterdam_color_blind\",\"colorMode\":{\"type\":\"categorical\"}},\"xAccessor\":\"e84f582d-15a5-4b71-b7f6-361814be347f\"}]},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filters\":[],\"datasourceStates\":{\"formBased\":{\"layers\":{\"cd4a46f7-b890-4b23-b355-3effd1c5610c\":{\"columns\":{\"6ec7d4ff-7cef-4abc-9b8e-1adcdb44d4af\":{\"label\":\"Men\",\"dataType\":\"number\",\"operationType\":\"count\",\"isBucketed\":false,\"scale\":\"ratio\",\"sourceField\":\"___records___\",\"filter\":{\"query\":\"customer_gender : \\\"MALE\\\" \",\"language\":\"kuery\"},\"params\":{\"emptyAsNull\":true},\"customLabel\":true},\"e84f582d-15a5-4b71-b7f6-361814be347f\":{\"label\":\"Genders\",\"dataType\":\"string\",\"operationType\":\"filters\",\"scale\":\"ordinal\",\"isBucketed\":true,\"params\":{\"filters\":[{\"label\":\"\",\"input\":{\"query\":\"\\\"category.keyword\\\" : *\",\"language\":\"kuery\"}}]},\"customLabel\":true},\"63c5196e-feab-431c-ab78-c47cbeab1c43\":{\"label\":\"Women\",\"dataType\":\"number\",\"operationType\":\"count\",\"isBucketed\":false,\"scale\":\"ratio\",\"sourceField\":\"category.keyword\",\"filter\":{\"query\":\"customer_gender : \\\"FEMALE\\\" \",\"language\":\"kuery\"},\"params\":{\"emptyAsNull\":true},\"customLabel\":true}},\"columnOrder\":[\"e84f582d-15a5-4b71-b7f6-361814be347f\",\"6ec7d4ff-7cef-4abc-9b8e-1adcdb44d4af\",\"63c5196e-feab-431c-ab78-c47cbeab1c43\"],\"incompleteColumns\":{},\"sampling\":1}}},\"indexpattern\":{\"layers\":{}},\"textBased\":{\"layers\":{}}},\"internalReferences\":[],\"adHocDataViews\":{}}},\"enhancements\":{\"dynamicActions\":{\"events\":[{\"eventId\":\"4a95e1af-f3ed-4ebc-95e5-1ba5a05df28d\",\"triggers\":[\"FILTER_TRIGGER\"],\"action\":{\"factoryId\":\"OPEN_IN_DISCOVER_DRILLDOWN\",\"name\":\"Open in Discover\",\"config\":{\"openInNewTab\":true}}}]}},\"description\":\"\"},\"title\":\"Filters Test\"}]","timeRestore":false,"title":"Filters Test","version":2},"coreMigrationVersion":"8.8.0","created_at":"2024-10-11T08:11:22.587Z","created_by":"u_Cl0X07Gfgvg0DTl3YJqp6GtK2Lm9cb2eztknHx1bLko_0","id":"bc167db1-dc92-4c8e-a8b7-70a9b42fbb15","managed":false,"references":[{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"},{"id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","name":"c466059f-6818-4223-95d1-95fbd7ac3dba:indexpattern-datasource-layer-cd4a46f7-b890-4b23-b355-3effd1c5610c","type":"index-pattern"}],"type":"dashboard","typeMigrationVersion":"10.2.0","updated_at":"2024-10-11T08:22:45.032Z","updated_by":"u_Cl0X07Gfgvg0DTl3YJqp6GtK2Lm9cb2eztknHx1bLko_0","version":"WzE0NzY4LDY1XQ=="}
{"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]}
@simonhearne simonhearne added the bug Fixes for quality problems that affect the customer experience label Oct 11, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 11, 2024
@markov00 markov00 added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens Feature:Drilldowns Embeddable panel Drilldowns labels Oct 11, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Drilldowns Embeddable panel Drilldowns Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants