-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
Describe the feature:
Currently the vis_type_xy plugin is enabled via a kibana.yml config value.
kibana/src/plugins/vis_type_xy/server/index.ts
Lines 22 to 24 in 100afab
| 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).
kibana/src/plugins/vis_type_vislib/public/plugin.ts
Lines 95 to 105 in 100afab
| // 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
kibana/src/plugins/vis_type_xy/public/plugin.ts
Lines 73 to 79 in 100afab
| 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).