Skip to content

Commit

Permalink
[APM] Fix obscured service map connections (elastic#67129)
Browse files Browse the repository at this point in the history
* Closes elastic#67126 by increasing spacingFactor in the cytoscape layout from 0.85 -> 1.2

* - prevents labels from hiding when nodes get a bit smaller
- also bump the label font size
  • Loading branch information
ogupte committed May 21, 2020
1 parent f3a6655 commit 7a42470
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function getLayoutOptions(
roots: selectedRoots.length ? selectedRoots : undefined,
fit: true,
padding: nodeHeight,
spacingFactor: 0.85,
spacingFactor: 1.2,
// @ts-ignore
// Rotate nodes counter-clockwise to transform layout from top→bottom to left→right.
// The extra 5° achieves the effect of separating overlapping taxi-styled edges.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const style: cytoscape.Stylesheet[] = [
// theme.euiFontFamily doesn't work here for some reason, so we're just
// specifying a subset of the fonts for the label text.
'font-family': 'Inter UI, Segoe UI, Helvetica, Arial, sans-serif',
'font-size': theme.euiFontSizeXS,
'font-size': theme.euiFontSizeS,
ghost: 'yes',
'ghost-offset-x': 0,
'ghost-offset-y': 2,
Expand All @@ -127,7 +127,7 @@ const style: cytoscape.Stylesheet[] = [
isService(el)
? el.data(SERVICE_NAME)
: el.data(SPAN_DESTINATION_SERVICE_RESOURCE),
'min-zoomed-font-size': parseInt(theme.euiSizeL, 10),
'min-zoomed-font-size': parseInt(theme.euiSizeS, 10),
'overlay-opacity': 0,
shape: (el: cytoscape.NodeSingular) =>
isService(el) ? (isIE11 ? 'rectangle' : 'ellipse') : 'diamond',
Expand Down

0 comments on commit 7a42470

Please sign in to comment.