From c56b3388b2d7c47a3e62cd1eabd55a049353512d Mon Sep 17 00:00:00 2001 From: Ramneet Chopra Date: Mon, 12 Sep 2022 12:32:50 +0000 Subject: [PATCH] tooltip for multiple traces: fixed Signed-off-by: Ramneet Chopra --- .../public/components/visualizations/charts/lines/line.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboards-observability/public/components/visualizations/charts/lines/line.tsx b/dashboards-observability/public/components/visualizations/charts/lines/line.tsx index 80c22b8e8..f008f2c51 100644 --- a/dashboards-observability/public/components/visualizations/charts/lines/line.tsx +++ b/dashboards-observability/public/components/visualizations/charts/lines/line.tsx @@ -57,7 +57,7 @@ export const Line = ({ visualizations, layout, config }: any) => { const lastIndex = fields.length - 1; - let visType: string = visualizations.vis.name; + const visType: string = visualizations.vis.name; const mode = dataConfig?.chartStyles?.style || (visType === visChartTypes.Line ? DefaultModeLine : DefaultModeScatter); @@ -128,7 +128,7 @@ export const Line = ({ visualizations, layout, config }: any) => { size: labelSize, }), }, - overlaying: 'y', + ...(index > 0 && { overlaying: 'y' }), side: field.side, }, }; @@ -154,7 +154,7 @@ export const Line = ({ visualizations, layout, config }: any) => { }; }); - let layoutForBarMode = { + const layoutForBarMode = { barmode: 'group', }; const mergedLayout = {