SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix: Changed Legends UI & Scrollable (#2078)
Chintan Sudani186632af6909
diff --git a/frontend/src/components/Graph/Plugin/Legend.ts b/frontend/src/components/Graph/Plugin/Legend.tsindex b1e9befffd..6d12812ff1 100644--- a/frontend/src/components/Graph/Plugin/Legend.ts+++ b/frontend/src/components/Graph/Plugin/Legend.ts@@ -22,6 +22,7 @@ const getOrCreateLegendList = (listContainer.style.height = '100%';listContainer.style.flexWrap = 'wrap';listContainer.style.justifyContent = 'center';+ listContainer.style.fontSize = '0.75rem';legendContainer?.appendChild(listContainer);}@@ -59,7 +60,7 @@ export const legend = (id: string, isLonger: boolean): Plugin<ChartType> => {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 +84,9 @@ export const legend = (id: string, isLonger: boolean): Plugin<ChartType> => {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/index.tsx b/frontend/src/components/Graph/index.tsxindex fe2b5928e2..b51772d62d 100644--- a/frontend/src/components/Graph/index.tsx+++ b/frontend/src/components/Graph/index.tsx@@ -330,7 +330,7 @@ Graph.defaultProps = {yAxisUnit: undefined,forceReRender: undefined,staticLine: undefined,- containerHeight: '85%',+ containerHeight: '90%',onDragSelect: undefined,dragSelectColor: undefined,};diff --git a/frontend/src/components/Graph/styles.ts b/frontend/src/components/Graph/styles.tsindex e0fa56dee1..89b220150e 100644--- a/frontend/src/components/Graph/styles.ts+++ b/frontend/src/components/Graph/styles.ts@@ -1,3 +1,4 @@+import { themeColors } from 'constants/theme';import styled from 'styled-components';export const LegendsContainer = styled.div`@@ -5,10 +6,17 @@ export const LegendsContainer = styled.div`* {::-webkit-scrollbar {- display: none !important;+ width: 0.5rem;+ }+ ::-webkit-scrollbar-track {+ background: transparent;+ }+ ::-webkit-scrollbar-thumb {+ background: ${themeColors.royalGrey};+ border-radius: 0.625rem;+ }+ ::-webkit-scrollbar-thumb:hover {+ background: ${themeColors.matterhornGrey};}-- -ms-overflow-style: none !important; /* IE and Edge */- scrollbar-width: none !important; /* Firefox */}`;diff --git a/frontend/src/constants/theme.ts b/frontend/src/constants/theme.tsindex 18f1076cf9..7e3bb042f8 100644--- a/frontend/src/constants/theme.ts+++ b/frontend/src/constants/theme.ts@@ -33,6 +33,8 @@ const themeColors = {rust: '#B33300',},errorColor: '#d32f2f',+ royalGrey: '#888888',+ matterhornGrey: '#555555',whiteCream: '#ffffffd5',black: '#000000',};