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

Move vis_type_xy enablement config to advanced settings #77186

Closed
nickofthyme opened this issue Sep 10, 2020 · 1 comment · Fixed by #78154
Closed

Move vis_type_xy enablement config to advanced settings #77186

nickofthyme opened this issue Sep 10, 2020 · 1 comment · Fixed by #78154
Assignees
Labels
Feature:NP Migration Feature:Vislib Vislib chart implementation Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@nickofthyme
Copy link
Contributor

nickofthyme commented Sep 10, 2020

Describe the feature:
Currently the vis_type_xy plugin is enabled via a kibana.yml config value.

export const config = {
schema: schema.object({ enabled: schema.boolean({ defaultValue: false }) }),
};

Then used in the vis_type_vislib plugin setup to prevent registering the corresponding vislib type (i.e. line, area, histogram).

// if visTypeXy plugin is disabled it's config will be undefined
if (!visTypeXy) {
const convertedTypes: any[] = [];
const convertedFns: any[] = [];
// Register legacy vislib types that have been converted
convertedFns.forEach(expressions.registerFunction);
convertedTypes.forEach((vis) =>
visualizations.createBaseVisualization(vis(visualizationDependencies))
);
}

Note: The empty array for future convertedTypes

Block registration of vis types in vis_type_xy plugin

const visTypeDefinitions: any[] = [];
const visFunctions: any = [];
visFunctions.forEach((fn: any) => expressions.registerFunction(fn));
visTypeDefinitions.forEach((vis: any) =>
visualizations.createBaseVisualization(vis(visualizationDependencies))
);

Instead, this logic should be driven from advanced settings.

Description of advanced setting should include lack of support for split chart aggregations.

Additional Context
This replacement of vislib will not be changing the existing visualization saved objects and hence both vis_type_vislib and vis_type_xy cannot register the same three visualization types (i.e. line, area, histogram).

@nickofthyme nickofthyme added Feature:Vislib Vislib chart implementation Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:NP Migration labels Sep 10, 2020
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:NP Migration Feature:Vislib Vislib chart implementation Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants