Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Set a max size for scatter chart #1963

Merged
merged 1 commit into from Oct 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/JaegerIntegration/JaegerScatter.tsx
Expand Up @@ -26,8 +26,8 @@ interface JaegerScatterProps {
}

const ONE_MILLISECOND = 1000000;

const MINIMAL_SIZE = 2;
const MAXIMAL_SIZE = 30;

type JaegerLineInfo = LineInfo & { id: string };
type Datapoint = VCDataPoint & JaegerLineInfo;
Expand Down Expand Up @@ -73,7 +73,7 @@ class JaegerScatter extends React.Component<JaegerScatterProps> {
color: isSelected ? PfColors.Blue500 : PfColors.Blue200,
unit: 'seconds',
id: trace.traceID,
size: trace.spans.length + MINIMAL_SIZE
size: Math.min(MAXIMAL_SIZE, trace.spans.length + MINIMAL_SIZE)
};
if (traceError) {
traceItem.color = isSelected ? PfColors.Red500 : PfColors.Red200;
Expand Down