Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak formatting so that more nodes have text visible in them #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rwarren
Copy link

@rwarren rwarren commented Jun 19, 2020

This commit makes node text a bit smaller, with information spread across three lines rather than two. Intent being to reduce the number of empty/blank rectangles displayed.

An example subsection of what it looks likes for a few nodes is here:

image

Previously the second node would have been blank (and so would many more in the full chart).


More detail...

Prior to this commit, text displayed in the node was quite wide, causing a large number of nodes to be blank (forcing use of hover text).

This commit makes more nodes have text by doing the following:

  1. uses a smaller font by default for nodes
  2. splits node info across 3 lines instead of 2
    • function location and name are split into two lines (with parens removed)
  3. tweaks text offsets to maintain vertical centering of text in the node

These tweaks still fit perfectly when rendering 20 deep.

NOTE: This could probably have been done earlier in the code (rather than cutting up display_name while generating the svg), but the end result is effective and this was quick to do. :)

Prior to this commit, text displayed in the node was quite wide, causing a HUGE
number of nodes to be blank (forcing use of hover text).

This commit makes more nodes have text by doing the following:
  1. uses a smaller font by default for nodes
  2. splits node info across 3 lines instead of 2
    - function location and name are split into two lines (with parens removed)
  3. tweaks text offsets to maintain vertical centering of text in the node

These tweaks still fit perfectly when rendering 20 deep.
@rwarren
Copy link
Author

rwarren commented Jun 19, 2020

Below is another example, but with depth set to 20. This is just a subsection of the overall chart. The vast majority of nodes wouldn't have any text in them without the changes in the pull request.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant