-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Enable fitering multi values with tooltip actions #150304
Comments
Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations) |
We discussed about it and decided to change the way that the left click and tooltip actions work in our charts. Specifically:
|
Also add telemetry for the tooltip actions |
It would be great if we can consider adding a way to describe what will happen when clicking on the chart. |
@mbondyra the idea is that if we make the left click apply all the filters with AND by default (no modal) then we should enrich the tooltip actions with more options so:
So right now, it works as expected because in the tooltip actions we only added the ORs. Now we want to extend it with more capabilities. We can sync if you have more questions about it! |
## Summary The breaking tests have nothing to do with this PR. I ran the [test PR and it broke too.](https://github.com/elastic/kibana/pull/163229/files) ### Functionality changes #### XY Chart Adds tooltip action for x series if it exists. The copy is different for time and categorical series. https://github.com/elastic/kibana/assets/4283304/2a043e04-c5b1-480d-be10-ae618145fb65 <img width="246" alt="Screenshot 2023-08-04 at 17 37 39" src="https://github.com/elastic/kibana/assets/4283304/d3e4b7ae-cace-444e-8c86-c210ca1be2ee"> <img width="222" alt="Screenshot 2023-08-04 at 17 37 57" src="https://github.com/elastic/kibana/assets/4283304/dd44cc10-d4bd-4b5d-a6bb-856e48a77f34"> When filtering by one time interval we create a time picker filter and not regular filter now. #### Partition Chart Adds tooltip actions filters. Doesn't add them if we only have metric dimensions. https://github.com/elastic/kibana/assets/4283304/c4d427c3-fb81-4f9d-b4be-dcb5ba872fdb #### Heat map Chart Adds tooltip actions filters https://github.com/elastic/kibana/assets/4283304/68795a02-8d40-47af-8366-d7c4f88c6ce3 ### Code changes #### Changes to `MultiValueClickContext` 1. I changed the interface to: ``` export interface MultiValueClickContext { {...} data: { data: Array<{ cells: Array<{ column: number; row: number; }>; table: Pick<Datatable, 'rows' | 'columns' | 'meta'>; relation?: BooleanRelation; }>; {...} }; } ``` The important changes are accepting the array of data (this way we can pass multiple tables for different dataviews, for example for different layers for xy chart and we don't have run separate handlers for separate layers). Also we don't pass a single column and array of values (that then we have to convert to multiple rows inside of the functions) but a `cells` array. This way we can pass values that belong to different rows and columns. I also added a `relation` param so user can control if they prefer to use `AND` or `OR` relation for combined filter. If none is used, the filters are separate. Fixes #150304 --------- Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
## Summary The breaking tests have nothing to do with this PR. I ran the [test PR and it broke too.](https://github.com/elastic/kibana/pull/163229/files) ### Functionality changes #### XY Chart Adds tooltip action for x series if it exists. The copy is different for time and categorical series. https://github.com/elastic/kibana/assets/4283304/2a043e04-c5b1-480d-be10-ae618145fb65 <img width="246" alt="Screenshot 2023-08-04 at 17 37 39" src="https://github.com/elastic/kibana/assets/4283304/d3e4b7ae-cace-444e-8c86-c210ca1be2ee"> <img width="222" alt="Screenshot 2023-08-04 at 17 37 57" src="https://github.com/elastic/kibana/assets/4283304/dd44cc10-d4bd-4b5d-a6bb-856e48a77f34"> When filtering by one time interval we create a time picker filter and not regular filter now. #### Partition Chart Adds tooltip actions filters. Doesn't add them if we only have metric dimensions. https://github.com/elastic/kibana/assets/4283304/c4d427c3-fb81-4f9d-b4be-dcb5ba872fdb #### Heat map Chart Adds tooltip actions filters https://github.com/elastic/kibana/assets/4283304/68795a02-8d40-47af-8366-d7c4f88c6ce3 ### Code changes #### Changes to `MultiValueClickContext` 1. I changed the interface to: ``` export interface MultiValueClickContext { {...} data: { data: Array<{ cells: Array<{ column: number; row: number; }>; table: Pick<Datatable, 'rows' | 'columns' | 'meta'>; relation?: BooleanRelation; }>; {...} }; } ``` The important changes are accepting the array of data (this way we can pass multiple tables for different dataviews, for example for different layers for xy chart and we don't have run separate handlers for separate layers). Also we don't pass a single column and array of values (that then we have to convert to multiple rows inside of the functions) but a `cells` array. This way we can pass values that belong to different rows and columns. I also added a `relation` param so user can control if they prefer to use `AND` or `OR` relation for combined filter. If none is used, the filters are separate. Fixes elastic#150304 --------- Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Describe the feature:
On 8.7 we enabled the multivalue filtering on the XY charts. We would like to enable it for the rest of the charts as it is supported everywhere https://elastic.github.io/elastic-charts/?path=/story/components-tooltip--cartesian-charts&globals=theme:light
Specifically we want to enable it for:
Here is the PR that enables it for XY. It adds the basic functionality so adding this on the other chart types should be easy.
The text was updated successfully, but these errors were encountered: