From 81f70e6f8fbc95fd1940defeb053ef6207ee1e47 Mon Sep 17 00:00:00 2001 From: Bena Kansara Date: Mon, 16 Sep 2024 13:31:54 +0200 Subject: [PATCH 1/4] hide x-axis --- .../public/items/embeddable_item/register_embeddable_item.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx b/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx index 3be16c83c8018..5a9936f881939 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx @@ -89,6 +89,7 @@ function LegacyEmbeddable({ type, config, timeRange: { from, to }, savedObjectId from, to, }, + overrides: { axisX: { hide: true } }, }; if (savedObjectId) { @@ -188,7 +189,7 @@ export function registerEmbeddableItem({ grow={true} className={css` > div { - height: 196px; + height: 128px; } `} > From e646ce5b0b526ebd904ca5306641979dd894811c Mon Sep 17 00:00:00 2001 From: Bena Kansara Date: Mon, 16 Sep 2024 15:45:51 +0200 Subject: [PATCH 2/4] hide y-axis labels --- .../public/items/embeddable_item/register_embeddable_item.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx b/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx index 5a9936f881939..93e258e7b03cc 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx @@ -89,7 +89,7 @@ function LegacyEmbeddable({ type, config, timeRange: { from, to }, savedObjectId from, to, }, - overrides: { axisX: { hide: true } }, + overrides: { axisX: { hide: true }, axisLeft: { style: { axisTitle: { visible: false } } } }, }; if (savedObjectId) { From 896fa8a07704f26f506acf63f44803f4a49e288a Mon Sep 17 00:00:00 2001 From: Bena Kansara Date: Mon, 16 Sep 2024 15:48:17 +0200 Subject: [PATCH 3/4] hide y-axis labels --- .../items/embeddable_item/register_embeddable_item.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx b/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx index 93e258e7b03cc..6927d52d39f0f 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx @@ -89,7 +89,10 @@ function LegacyEmbeddable({ type, config, timeRange: { from, to }, savedObjectId from, to, }, - overrides: { axisX: { hide: true }, axisLeft: { style: { axisTitle: { visible: false } } } }, + overrides: { + axisX: { hide: true }, + axisLeft: { style: { axisTitle: { visible: false } } }, + }, }; if (savedObjectId) { From c08262bc2efc57d82ae0798f518ce59a4e06b6fc Mon Sep 17 00:00:00 2001 From: Bena Kansara Date: Mon, 16 Sep 2024 16:18:17 +0200 Subject: [PATCH 4/4] user overrides --- .../register_embeddable_item.tsx | 1 + .../items/esql_item/register_esql_item.tsx | 17 +++++++++++++++-- .../items/lens_item/register_lens_item.tsx | 17 +++++------------ .../utils/get_lens_attrs_for_suggestion.ts | 13 ------------- 4 files changed, 21 insertions(+), 27 deletions(-) diff --git a/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx b/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx index 6927d52d39f0f..8ebf3829b073d 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/items/embeddable_item/register_embeddable_item.tsx @@ -92,6 +92,7 @@ function LegacyEmbeddable({ type, config, timeRange: { from, to }, savedObjectId overrides: { axisX: { hide: true }, axisLeft: { style: { axisTitle: { visible: false } } }, + settings: { showLegend: false }, }, }; diff --git a/x-pack/plugins/observability_solution/investigate_app/public/items/esql_item/register_esql_item.tsx b/x-pack/plugins/observability_solution/investigate_app/public/items/esql_item/register_esql_item.tsx index 5f2f95807b4e0..2537922a1f35e 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/items/esql_item/register_esql_item.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/items/esql_item/register_esql_item.tsx @@ -128,7 +128,16 @@ export function EsqlWidget({ suggestion, dataView, esqlQuery, dateHistogramResul if (previewInput.error) { innerElement = ; } else if (previewInput.value) { - innerElement = ; + innerElement = ( + + ); } else { innerElement = ; } @@ -153,7 +162,11 @@ export function EsqlWidget({ suggestion, dataView, esqlQuery, dateHistogramResul ); diff --git a/x-pack/plugins/observability_solution/investigate_app/public/items/lens_item/register_lens_item.tsx b/x-pack/plugins/observability_solution/investigate_app/public/items/lens_item/register_lens_item.tsx index 3f2b1d9f9c1bf..2896719a49e20 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/items/lens_item/register_lens_item.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/items/lens_item/register_lens_item.tsx @@ -178,17 +178,6 @@ export function LensWidget({ const attributesLens = new LensAttributesBuilder({ visualization: new XYChart({ - visualOptions: { - axisTitlesVisibilitySettings: { - x: false, - yLeft: false, - yRight: false, - }, - legend: { - isVisible: false, - position: 'right', - }, - }, layers, formulaAPI: formulaAsync.value.formula, dataView, @@ -227,7 +216,11 @@ export function LensWidget({ query={(searchConfiguration?.query as Query) || defaultQuery} disableTriggers={true} filters={filters} - overrides={{ axisX: { hide: true } }} + overrides={{ + axisX: { hide: true }, + axisLeft: { style: { axisTitle: { visible: false } } }, + settings: { showLegend: false }, + }} /> ); diff --git a/x-pack/plugins/observability_solution/investigate_app/public/utils/get_lens_attrs_for_suggestion.ts b/x-pack/plugins/observability_solution/investigate_app/public/utils/get_lens_attrs_for_suggestion.ts index 79693ff2941aa..0483d771954c0 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/utils/get_lens_attrs_for_suggestion.ts +++ b/x-pack/plugins/observability_solution/investigate_app/public/utils/get_lens_attrs_for_suggestion.ts @@ -32,19 +32,6 @@ export function getLensAttrsForSuggestion({ dataView, }) as TypedLensByValueInput['attributes']; - attrs.state.visualization = { - ...(attrs.state.visualization as any), - axisTitlesVisibilitySettings: { - x: false, - yLeft: false, - yRight: false, - }, - legend: { - isVisible: false, - position: 'right', - }, - }; - const lensEmbeddableInput: TypedLensByValueInput = { attributes: attrs, id: v4(),