Open flash1293 opened 3 years ago
Pinging @elastic/kibana-app-services (Team:AppServices)
would that mean we get rid of the range select action completely ? should we simplify the typing then and say that we always do range selection, but possibly startdate === enddate
for the case of simple value click ?
No strong opinion on how the API is going to look like
i would suggest something like this:
export interface ValueClickContext<T extends IEmbeddable = IEmbeddable> {
embeddable?: T;
data: {
data: Array<{
table: Pick<Datatable, 'rows' | 'columns'>;
column: number;
range: number[];
value: any;
}>;
timeFieldName?: string;
negate?: boolean;
};
}
if range.from === range.to then its a simple click
Pinging @elastic/appex-sharedux (Team:SharedUX)
Pinging @elastic/kibana-visualizations (Team:Visualizations)
This is now possible to implement in the tooltip actions, we can add a function that says filter both time and selected series.
Right now it's either possible to emit an ui action for the
VALUE_CLICK_TRIGGER
orSELECT_RANGE_TRIGGER
for chart interactions because our chart types allowed these two things.However the elastic-charts heatmap allows selecting a rectangle of cells at the same time - if one of the axes is a histogram axis, this is basically a click and select range action at the same time:
This should show the filter selection modal with three lines:
gz
css
I suggest extending the value click trigger for this to handle ranges as well:
Current state:
Extension:
This is basically pulling the range context
data
into the value click context.What do you think @ppisljar ?