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

Cannot render graph #247

Open
soccerdroid opened this issue May 30, 2019 · 2 comments
Open

Cannot render graph #247

soccerdroid opened this issue May 30, 2019 · 2 comments

Comments

@soccerdroid
Copy link

soccerdroid commented May 30, 2019

I have just found this library, but I cannot get to render a simple graph from the readme example. I am not using any web framework. Here is my code:
`

<script src="./VivaGraphJS/dist/vivagraph.min.js"></script>

</head>
<body>
</body>
<script type='text/javascript'>
	var graph = Viva.Graph.graph();
	graph.addLink(1, 2);
	var graphics = Viva.Graph.View.svgGraphics();
	var renderer = Viva.Graph.View.renderer(graph, {
		graphics : graphics
	});
	renderer.run();
		
</script>
`
@soccerdroid
Copy link
Author

Ok so the graph was there, but it is so tiny I hade to make a 400%zoom to see it a little bit. How can I set the container size?

@vincenzopalazzo
Copy link

vincenzopalazzo commented Oct 16, 2019

@soccerdroid if you use the SVG, add the CSS in your code

html, body, svg { 
   width: 100%; 
   height: 100%;
}

The example contains the CSS

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

No branches or pull requests

2 participants