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

Drilldowns for TSVB #69634

Closed
wants to merge 7 commits into from
Closed

Drilldowns for TSVB #69634

wants to merge 7 commits into from

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Jun 21, 2020

Closes: #60611

Summary

We need to make TSVB range brushing work with Drilldowns. TSVB does not support click events but it has brushing support, which we can use in Drilldowns.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp alexwizp self-assigned this Jun 22, 2020
@alexwizp alexwizp added v7.9.0 v8.0.0 Feature:Drilldowns Embeddable panel Drilldowns Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:enhancement labels Jun 22, 2020
@alexwizp alexwizp requested a review from ppisljar June 22, 2020 09:19
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp alexwizp marked this pull request as ready for review June 23, 2020 07:13
@alexwizp alexwizp requested a review from a team June 23, 2020 07:13
@alexwizp alexwizp requested a review from a team as a code owner June 23, 2020 07:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@botelastic botelastic bot added the Feature:Embedding Embedding content via iFrame label Jun 23, 2020
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@streamich streamich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Checked on Mac/Chrome.

@streamich
Copy link
Contributor

streamich commented Jun 23, 2020

From AppArch sync, maybe this unified type for both brush triggers could work:

interface RangeSelectTriggerEvent {
  table?: KibanaDatatable;
  column?: number;
  range: Range;
  timeFieldName?: string;
}

interface Range {
  from: number;
  to: number;
}

@alexwizp
Copy link
Contributor Author

@streamich @ppisljar Could you please explain your proposal cause it's not too clear for me? But firstly let me give you some context.

The main problem is that we need to generate a RangeFilter (it's not a Range). Currently it's possible on by calling esFilters.buildRangeFilter from data plugin.

Interface of that methods looks like:

export const buildRangeFilter = (
  field: IFieldType,
  params: RangeFilterParams,
  indexPattern: IIndexPattern,
  formattedValue?: string
): RangeFilter => {

Now let's go to you proposal and try to generate RangeFilter using your interface.
As we see above it's not enough to pass only RangeFilterParams. With params we also need to pass required field and indexPattern. We can probably do it only using table (KibanaDatatable) field. But how to create that object from TSVB cause TSVB doesn't use KibanaDatatable and AggConfigs at all.

From my point of view the right interface for Brush (and probably click) event should look like:

interface RangeSelectTriggerEvent {
  timeRangeFilter: RangeFilter;
  filters: Filter[];
  timeFieldName: string;  // < not sure about it cause  timeRangeFilter already has this data
}

If you agree with this, then this PR step in the right direction =)

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@timroes
Copy link
Contributor

timroes commented Jun 25, 2020

After discussions with @ppisljar we decided to put this on hold for now, since the drilldowns infrastructure is too tightly coupled with the "classical visualizations" infrastructure. We'll need to address the alignment of data tables (#68457) across Kibana first (which will make the required metadata a high level concept of those data structures), and then App Arch needs to cleanup the trigger parameters to be less visualization specific.

@flash1293
Copy link
Contributor

flash1293 commented Jun 26, 2020

@alexwizp As this is on hold for now, can we close the PR or put it back into draft mode? It's kicking off automation about PRs requiring review for me.

Edit: Closed accidentally, I'll leave it up to you :)

@flash1293 flash1293 closed this Jun 26, 2020
@flash1293 flash1293 reopened this Jun 26, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@alexwizp alexwizp closed this Jun 29, 2020
@streamich streamich mentioned this pull request Aug 13, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Drilldowns Embeddable panel Drilldowns Feature:Embedding Embedding content via iFrame Feature:TSVB TSVB (Time Series Visual Builder) release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drilldowns for TSVB
6 participants