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 <fbaligand@gmail.com>

Signed-off-by: fbaligand <fbaligand@gmail.com>
(cherry picked from commit 140c56f)
  • Loading branch information
fbaligand authored and joshuarrrr committed Sep 6, 2022
1 parent a543bc3 commit 39f0d13
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 39f0d13

Please sign in to comment.