question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stretch the graph over the width of the page

See original GitHub issue

Is your feature request related to a problem? Please describe. When displaying a tall graph using the dagre layout with many nodes and few steps, the labels on the links between nodes overlap and labels on them become unreadable.

Describe the solution you’d like The ability to stretch the graph over the width of the page.

Describe alternatives you’ve considered I could use Orientation.TOP_TO_BOTTOM but this would make the link labels difficult to read as the are mostly vertical. It would also not fit on the page well because the labels in the nodes are quite long. Maybe there are some things I missed, do you have any tips to make this readable?

Additional context Current issue: image

Alternative solution: image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
marjan-georgievcommented, Jul 9, 2020

Interesting. When removing the view attribute, the graph is actually not resized in regards to the parent container. Is his expected? As the documentation says that this should be the case.

The parent element of the component needs to have a width and height set on it, so the graph component can fill it.

See how the ‘.page’ div on this demo does it:

.page {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

https://stackblitz.com/edit/ngx-graph-demo?file=src%2Fapp%2Fapp.component.scss

0reactions
Ionarucommented, Jun 27, 2020

I played with the settings in an attempt to get something readable and eventually settled on this:

export class IndustryGraphLayout extends DagreLayout {
    settings: DagreSettings = {
        orientation: Orientation.TOP_TO_BOTTOM,
        ranker: 'network-simplex',
        rankPadding: 300,
    };
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Horizontal Stretch - Properties, Graph, & Examples
Horizontal stretches happen when a base graph is widened along the x-axis and away from the y-axis. Learning how we can stretch graphs...
Read more >
Scale a worksheet - Microsoft Support
Follow these steps: Click the Page Layout tab on the ribbon. In the Scale to Fit group, in the Width box, select 1...
Read more >
Vertical Stretches and Shrinks - The Biology Project
When a graph is stretched or shrunk vertically, the x -intercepts act as anchors and do not change under the transformation. Definition. For...
Read more >
How to stretch a chart by width in BIRT - Stack Overflow
Seems like setting charts size in %'s makes it default to the embed element. Try providing the actual value: .chart { border-style: solid; ......
Read more >
Math 30-1: RF3 - Horizontal and Vertical Stretches - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found