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

[Feature Anywhere] Add a vis_layers expression function type #2894

Closed
ohltyler opened this issue Nov 18, 2022 · 1 comment
Closed

[Feature Anywhere] Add a vis_layers expression function type #2894

ohltyler opened this issue Nov 18, 2022 · 1 comment
Labels
feature-anywhere unified visualization UX v2.5.0 'Issues and PRs related to version v2.5.0' visualizations Issues and PRs related to visualizations

Comments

@ohltyler
Copy link
Member

ohltyler commented Nov 18, 2022

As part of #2880, we propose to have a standardized way for plugins to format their overlay data into a VisLayer that can be processed by the downstream visualizations for rendering this additional data. For more information on the VisLayer overlay data model, see #2882.

To accomplish this, we can introduce a vis_layers expression function type, and allow plugins to register their own functions of this type. During the visualization rendering process, all relevant expression functions can be fetched via saved objects (see #2893 for details on the saved objects design), and built into a single pipeline that can be ran to compile an array of VisLayers. The visualization can then process these VisLayers accordingly, and render the additional data.

The I/O of this new expression function will be the same - an array of VisLayers. The purpose of the function itself will be to take in the array, construct a VisLayer of their own using their own data, append it to the array, and pass it on as output. This design allows for an arbitrary number of these function types to be executed in an arbitrary order, allowing any plugin to add any number of VisLayers to a particular visualization.

We can illustrate how this may work with a simple example:
[] -> plugin-1-expr-fn -> [vis-layer-1] -> plugin-2-expr-fn -> [vis-layer-1, vis-layer-2]

Open questions:

  1. Similar to [Feature Anywhere] Add a augment-vis saved object type #2893, where should this function be maintained & registered inside of OpenSearch Dashboards? My preferred solution is that this is maintained in a standalone feature-anywhere plugin
@ohltyler
Copy link
Member Author

Closing via #3108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-anywhere unified visualization UX v2.5.0 'Issues and PRs related to version v2.5.0' visualizations Issues and PRs related to visualizations
Projects
None yet
Development

No branches or pull requests

2 participants