Skip to content

Commit

Permalink
[Visualizations] Adds visConfig.title and uiState to build pipeline f…
Browse files Browse the repository at this point in the history
…unction (#2192)

In pipeline building, this PR adds `visConfig.title` and `uiState` properties for "visualization" function.

This aims 2 goals:
-    To be consistent with pipelines built with "buildPipelineVisFunction".
-    To provide "title" and "uiState" informations for visualizations.

This is currently a missing information for community plugins.

Signed-off-by: fbaligand <[email protected]>

Signed-off-by: fbaligand <[email protected]>
  • Loading branch information
fbaligand authored Sep 6, 2022
1 parent 763b7f0 commit 140c56f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/visualizations/public/legacy/build_pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,10 @@ export const buildPipeline = async (vis: Vis, params: BuildPipelineParams) => {
} else {
const visConfig = { ...vis.params };
visConfig.dimensions = schemas;
visConfig.title = title;
pipeline += `visualization type='${vis.type.name}'
${prepareJson('visConfig', visConfig)}
${prepareJson('uiState', uiState)}
metricsAtAllLevels=${vis.isHierarchical()}
partialRows=${vis.params.showPartialRows || false} `;
if (indexPattern) {
Expand Down

0 comments on commit 140c56f

Please sign in to comment.