From a654baaa5becae6ff8c001bebe4f618cf82f904b Mon Sep 17 00:00:00 2001 From: Chintan Sudani <46838508+csudani7@users.noreply.github.com> Date: Wed, 25 Jan 2023 19:55:33 +0530 Subject: [PATCH] fix: graph flickering issue on trace page (#2120) * fix: Removed Strict mode to stop render twice * fix: graph flickering issue on trace page --- frontend/src/components/Graph/Plugin/Legend.ts | 8 ++++---- frontend/src/components/Graph/styles.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/Graph/Plugin/Legend.ts b/frontend/src/components/Graph/Plugin/Legend.ts index ec4d3f1d55..787933f442 100644 --- a/frontend/src/components/Graph/Plugin/Legend.ts +++ b/frontend/src/components/Graph/Plugin/Legend.ts @@ -59,7 +59,7 @@ export const legend = (id: string, isLonger: boolean): Plugin => ({ li.style.cursor = 'pointer'; li.style.display = 'flex'; li.style.marginLeft = '10px'; - li.style.marginTop = '5px'; + // li.style.marginTop = '5px'; li.onclick = (): void => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -83,9 +83,9 @@ export const legend = (id: string, isLonger: boolean): Plugin => ({ boxSpan.style.borderColor = `${item?.strokeStyle}`; boxSpan.style.borderWidth = `${item.lineWidth}px`; boxSpan.style.display = 'inline-block'; - boxSpan.style.minHeight = '20px'; - boxSpan.style.marginRight = '10px'; - boxSpan.style.minWidth = '20px'; + boxSpan.style.minHeight = '0.75rem'; + boxSpan.style.marginRight = '0.5rem'; + boxSpan.style.minWidth = '0.75rem'; boxSpan.style.borderRadius = '50%'; if (item.text) { diff --git a/frontend/src/components/Graph/styles.ts b/frontend/src/components/Graph/styles.ts index 89b220150e..2cbe302815 100644 --- a/frontend/src/components/Graph/styles.ts +++ b/frontend/src/components/Graph/styles.ts @@ -2,7 +2,7 @@ import { themeColors } from 'constants/theme'; import styled from 'styled-components'; export const LegendsContainer = styled.div` - height: 15%; + height: 10%; * { ::-webkit-scrollbar {